Commit d888130a authored by Johannes Berg's avatar Johannes Berg

mac80211: fix resume from WoWLAN

My commit 529ba6e9
("mac80211: clean up association better in suspend")
introduced a bug when resuming from WoWLAN when a
device reset is desired. This case must not use the
suspend_bss_conf as it hasn't been stored.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0ae997dc
...@@ -1358,8 +1358,9 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -1358,8 +1358,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
struct ieee80211_chanctx *ctx; struct ieee80211_chanctx *ctx;
struct sta_info *sta; struct sta_info *sta;
int res, i; int res, i;
#ifdef CONFIG_PM #ifdef CONFIG_PM
bool reconfig_due_to_wowlan = false;
if (local->suspended) if (local->suspended)
local->resuming = true; local->resuming = true;
...@@ -1377,6 +1378,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -1377,6 +1378,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
* res is 1, which means the driver requested * res is 1, which means the driver requested
* to go through a regular reset on wakeup. * to go through a regular reset on wakeup.
*/ */
reconfig_due_to_wowlan = true;
} }
#endif #endif
/* everything else happens only if HW was up & running */ /* everything else happens only if HW was up & running */
...@@ -1527,7 +1529,7 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -1527,7 +1529,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
BSS_CHANGED_TXPOWER; BSS_CHANGED_TXPOWER;
#ifdef CONFIG_PM #ifdef CONFIG_PM
if (local->resuming) if (local->resuming && !reconfig_due_to_wowlan)
sdata->vif.bss_conf = sdata->suspend_bss_conf; sdata->vif.bss_conf = sdata->suspend_bss_conf;
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment