diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 3a9fc905e6bc..244318af53fc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -29,12 +29,15 @@ | |||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/version.h> | 31 | #include <linux/version.h> |
32 | #include <net/mac80211.h> | ||
32 | 33 | ||
33 | struct iwl_priv; /* FIXME: remove */ | 34 | struct iwl_priv; /* FIXME: remove */ |
34 | #include "iwl-debug.h" | 35 | #include "iwl-debug.h" |
35 | #include "iwl-eeprom.h" | 36 | #include "iwl-eeprom.h" |
36 | #include "iwl-core.h" | 37 | #include "iwl-core.h" |
37 | 38 | ||
39 | #include "iwl-4965.h" /* FIXME: remove */ | ||
40 | |||
38 | MODULE_DESCRIPTION("iwl core"); | 41 | MODULE_DESCRIPTION("iwl core"); |
39 | MODULE_VERSION(IWLWIFI_VERSION); | 42 | MODULE_VERSION(IWLWIFI_VERSION); |
40 | MODULE_AUTHOR(DRV_COPYRIGHT); | 43 | MODULE_AUTHOR(DRV_COPYRIGHT); |
@@ -44,3 +47,27 @@ MODULE_LICENSE("GPL"); | |||
44 | u32 iwl_debug_level; | 47 | u32 iwl_debug_level; |
45 | EXPORT_SYMBOL(iwl_debug_level); | 48 | EXPORT_SYMBOL(iwl_debug_level); |
46 | #endif | 49 | #endif |
50 | |||
51 | /* This function both allocates and initializes hw and priv. */ | ||
52 | struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, | ||
53 | struct ieee80211_ops *hw_ops) | ||
54 | { | ||
55 | struct iwl_priv *priv; | ||
56 | |||
57 | /* mac80211 allocates memory for this device instance, including | ||
58 | * space for this driver's private structure */ | ||
59 | struct ieee80211_hw *hw = | ||
60 | ieee80211_alloc_hw(sizeof(struct iwl_priv), hw_ops); | ||
61 | if (hw == NULL) { | ||
62 | IWL_ERROR("Can not allocate network device\n"); | ||
63 | goto out; | ||
64 | } | ||
65 | |||
66 | priv = hw->priv; | ||
67 | priv->hw = hw; | ||
68 | |||
69 | out: | ||
70 | return hw; | ||
71 | } | ||
72 | EXPORT_SYMBOL(iwl_alloc_all); | ||
73 | |||