aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-01-19 09:53:06 -0500
committerJohannes Berg <johannes.berg@intel.com>2015-01-19 12:59:20 -0500
commitc1e140bf79d817d4a7aa9932eb98b0359c87af33 (patch)
treed90a7716b7b994f00a3ce2c1ab8470b6c73822cc
parent6e9f3fa4f0401ad3a8fe4e5b1282d35539b58a0f (diff)
mac80211: delete the assoc/auth timer upon suspend
While suspending, we destroy the authentication / association that might be taking place. While doing so, we forgot to delete the timer which can be firing after local->suspended is already set, producing the warning below. Fix that by deleting the timer. [66722.825487] WARNING: CPU: 2 PID: 5612 at net/mac80211/util.c:755 ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211]() [66722.825487] queueing ieee80211 work while going to suspend [66722.825529] CPU: 2 PID: 5612 Comm: kworker/u16:69 Tainted: G W O 3.16.1+ #24 [66722.825537] Workqueue: events_unbound async_run_entry_fn [66722.825545] Call Trace: [66722.825552] <IRQ> [<ffffffff817edbb2>] dump_stack+0x4d/0x66 [66722.825556] [<ffffffff81075cad>] warn_slowpath_common+0x7d/0xa0 [66722.825572] [<ffffffffa06b5b90>] ? ieee80211_sta_bcn_mon_timer+0x50/0x50 [mac80211] [66722.825573] [<ffffffff81075d1c>] warn_slowpath_fmt+0x4c/0x50 [66722.825586] [<ffffffffa06977a2>] ieee80211_can_queue_work.isra.18+0x32/0x40 [mac80211] [66722.825598] [<ffffffffa06977d5>] ieee80211_queue_work+0x25/0x50 [mac80211] [66722.825611] [<ffffffffa06b5bac>] ieee80211_sta_timer+0x1c/0x20 [mac80211] [66722.825614] [<ffffffff8108655a>] call_timer_fn+0x8a/0x300 Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/mlme.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c0711082a2b8..1875181ebd94 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2453,6 +2453,12 @@ static void ieee80211_destroy_auth_data(struct ieee80211_sub_if_data *sdata,
2453 sdata_assert_lock(sdata); 2453 sdata_assert_lock(sdata);
2454 2454
2455 if (!assoc) { 2455 if (!assoc) {
2456 /*
2457 * we are not authenticated yet, the only timer that could be
2458 * running is the timeout for the authentication response which
2459 * which is not relevant anymore.
2460 */
2461 del_timer_sync(&sdata->u.mgd.timer);
2456 sta_info_destroy_addr(sdata, auth_data->bss->bssid); 2462 sta_info_destroy_addr(sdata, auth_data->bss->bssid);
2457 2463
2458 memset(sdata->u.mgd.bssid, 0, ETH_ALEN); 2464 memset(sdata->u.mgd.bssid, 0, ETH_ALEN);
@@ -2760,6 +2766,12 @@ static void ieee80211_destroy_assoc_data(struct ieee80211_sub_if_data *sdata,
2760 sdata_assert_lock(sdata); 2766 sdata_assert_lock(sdata);
2761 2767
2762 if (!assoc) { 2768 if (!assoc) {
2769 /*
2770 * we are not associated yet, the only timer that could be
2771 * running is the timeout for the association response which
2772 * which is not relevant anymore.
2773 */
2774 del_timer_sync(&sdata->u.mgd.timer);
2763 sta_info_destroy_addr(sdata, assoc_data->bss->bssid); 2775 sta_info_destroy_addr(sdata, assoc_data->bss->bssid);
2764 2776
2765 memset(sdata->u.mgd.bssid, 0, ETH_ALEN); 2777 memset(sdata->u.mgd.bssid, 0, ETH_ALEN);