aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-01-10 17:55:33 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-16 09:18:37 -0500
commitd888130a024d1d1e8b2c3d0c9841a218fc0aed9e (patch)
tree144b2d1f832670a42578e827ab5c2b5a86d8e458 /net/mac80211/util.c
parent0ae997dc75efb60d47f0c71890f1e972f7d462c1 (diff)
mac80211: fix resume from WoWLAN
My commit 529ba6e9313dbe60dab7e72c6fdf647a012e9f5b ("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: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 1b9420730d8c..0ad51e14f3c8 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1358,8 +1358,9 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1358 struct ieee80211_chanctx *ctx; 1358 struct ieee80211_chanctx *ctx;
1359 struct sta_info *sta; 1359 struct sta_info *sta;
1360 int res, i; 1360 int res, i;
1361
1362#ifdef CONFIG_PM 1361#ifdef CONFIG_PM
1362 bool reconfig_due_to_wowlan = false;
1363
1363 if (local->suspended) 1364 if (local->suspended)
1364 local->resuming = true; 1365 local->resuming = true;
1365 1366
@@ -1377,6 +1378,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1377 * res is 1, which means the driver requested 1378 * res is 1, which means the driver requested
1378 * to go through a regular reset on wakeup. 1379 * to go through a regular reset on wakeup.
1379 */ 1380 */
1381 reconfig_due_to_wowlan = true;
1380 } 1382 }
1381#endif 1383#endif
1382 /* everything else happens only if HW was up & running */ 1384 /* everything else happens only if HW was up & running */
@@ -1527,7 +1529,7 @@ int ieee80211_reconfig(struct ieee80211_local *local)
1527 BSS_CHANGED_TXPOWER; 1529 BSS_CHANGED_TXPOWER;
1528 1530
1529#ifdef CONFIG_PM 1531#ifdef CONFIG_PM
1530 if (local->resuming) 1532 if (local->resuming && !reconfig_due_to_wowlan)
1531 sdata->vif.bss_conf = sdata->suspend_bss_conf; 1533 sdata->vif.bss_conf = sdata->suspend_bss_conf;
1532#endif 1534#endif
1533 1535