aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-mac80211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-06 16:30:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 13:51:47 -0500
commit0692fe41b36159be5d8c7d4eef0699e79c383c85 (patch)
treec529bc1099c2a9bcba981845248571a8b02d3c25 /drivers/net/wireless/iwlwifi/iwl-mac80211.c
parente19918855dc4822a24787a6d0048205b011e5ecb (diff)
iwlwifi: split out firmware store
Through the driver, struct iwl_fw will store the firmware. Split this out into a separate file, iwl-fw.h, and make all other code use it. To do this, also move the log pointers into it, and remove the knowledge of "nic" from everything. Now the op_mode has a fw pointer, and (unfortunately) for now the shared data also needs to keep one for the transport to access dump the error log -- I think that will move later. Since I wanted to constify the firmware pointers, some more changes were needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-mac80211.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-mac80211.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
index 37330addce79..3bcd2a766074 100644
--- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c
+++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c
@@ -42,7 +42,6 @@
42 42
43#include <asm/div64.h> 43#include <asm/div64.h>
44 44
45#include "iwl-ucode.h"
46#include "iwl-eeprom.h" 45#include "iwl-eeprom.h"
47#include "iwl-wifi.h" 46#include "iwl-wifi.h"
48#include "iwl-dev.h" 47#include "iwl-dev.h"
@@ -136,7 +135,7 @@ iwlagn_iface_combinations_p2p[] = {
136 * other mac80211 functions grouped here. 135 * other mac80211 functions grouped here.
137 */ 136 */
138int iwlagn_mac_setup_register(struct iwl_priv *priv, 137int iwlagn_mac_setup_register(struct iwl_priv *priv,
139 struct iwl_ucode_capabilities *capa) 138 const struct iwl_ucode_capabilities *capa)
140{ 139{
141 int ret; 140 int ret;
142 struct ieee80211_hw *hw = priv->hw; 141 struct ieee80211_hw *hw = priv->hw;
@@ -195,7 +194,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv,
195 WIPHY_FLAG_DISABLE_BEACON_HINTS | 194 WIPHY_FLAG_DISABLE_BEACON_HINTS |
196 WIPHY_FLAG_IBSS_RSN; 195 WIPHY_FLAG_IBSS_RSN;
197 196
198 if (nic(priv)->fw.ucode_wowlan.code.len && 197 if (priv->fw->ucode_wowlan.code.len &&
199 trans(priv)->ops->wowlan_suspend && 198 trans(priv)->ops->wowlan_suspend &&
200 device_can_wakeup(trans(priv)->dev)) { 199 device_can_wakeup(trans(priv)->dev)) {
201 hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | 200 hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT |
@@ -456,17 +455,16 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
456 455
457#ifdef CONFIG_IWLWIFI_DEBUGFS 456#ifdef CONFIG_IWLWIFI_DEBUGFS
458 if (ret == 0) { 457 if (ret == 0) {
459 struct iwl_nic *nic = nic(priv);
460 if (!priv->wowlan_sram) 458 if (!priv->wowlan_sram)
461 priv->wowlan_sram = 459 priv->wowlan_sram =
462 kzalloc(nic->fw.ucode_wowlan.data.len, 460 kzalloc(priv->fw->ucode_wowlan.data.len,
463 GFP_KERNEL); 461 GFP_KERNEL);
464 462
465 if (priv->wowlan_sram) 463 if (priv->wowlan_sram)
466 _iwl_read_targ_mem_words( 464 _iwl_read_targ_mem_words(
467 trans(priv), 0x800000, 465 trans(priv), 0x800000,
468 priv->wowlan_sram, 466 priv->wowlan_sram,
469 nic->fw.ucode_wowlan.data.len / 4); 467 priv->fw->ucode_wowlan.data.len / 4);
470 } 468 }
471#endif 469#endif
472 } 470 }