diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index 9212ee3bef9b..b6805f8e9a01 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -196,7 +196,7 @@ int iwlagn_mac_setup_register(struct iwl_priv *priv, | |||
196 | WIPHY_FLAG_DISABLE_BEACON_HINTS | | 196 | WIPHY_FLAG_DISABLE_BEACON_HINTS | |
197 | WIPHY_FLAG_IBSS_RSN; | 197 | WIPHY_FLAG_IBSS_RSN; |
198 | 198 | ||
199 | if (priv->fw->ucode_wowlan.code.len && | 199 | if (priv->fw->img[IWL_UCODE_WOWLAN].sec[0].len && |
200 | trans(priv)->ops->wowlan_suspend && | 200 | trans(priv)->ops->wowlan_suspend && |
201 | device_can_wakeup(trans(priv)->dev)) { | 201 | device_can_wakeup(trans(priv)->dev)) { |
202 | hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | | 202 | hw->wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT | |
@@ -437,6 +437,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
437 | unsigned long flags; | 437 | unsigned long flags; |
438 | u32 base, status = 0xffffffff; | 438 | u32 base, status = 0xffffffff; |
439 | int ret = -EIO; | 439 | int ret = -EIO; |
440 | const struct fw_img *img; | ||
440 | 441 | ||
441 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 442 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
442 | mutex_lock(&priv->mutex); | 443 | mutex_lock(&priv->mutex); |
@@ -457,16 +458,18 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
457 | 458 | ||
458 | #ifdef CONFIG_IWLWIFI_DEBUGFS | 459 | #ifdef CONFIG_IWLWIFI_DEBUGFS |
459 | if (ret == 0) { | 460 | if (ret == 0) { |
460 | if (!priv->wowlan_sram) | 461 | img = &(priv->fw->img[IWL_UCODE_WOWLAN]); |
462 | if (!priv->wowlan_sram) { | ||
461 | priv->wowlan_sram = | 463 | priv->wowlan_sram = |
462 | kzalloc(priv->fw->ucode_wowlan.data.len, | 464 | kzalloc(img->sec[IWL_UCODE_SECTION_DATA].len, |
463 | GFP_KERNEL); | 465 | GFP_KERNEL); |
466 | } | ||
464 | 467 | ||
465 | if (priv->wowlan_sram) | 468 | if (priv->wowlan_sram) |
466 | _iwl_read_targ_mem_words( | 469 | _iwl_read_targ_mem_words( |
467 | trans(priv), 0x800000, | 470 | trans(priv), 0x800000, |
468 | priv->wowlan_sram, | 471 | priv->wowlan_sram, |
469 | priv->fw->ucode_wowlan.data.len / 4); | 472 | img->sec[IWL_UCODE_SECTION_DATA].len / 4); |
470 | } | 473 | } |
471 | #endif | 474 | #endif |
472 | } | 475 | } |