mac80211: make off-channel work generic
This changes mac80211 to allow being off-channel for
any type of work, not just the 'remain-on-channel'
work. This also helps fast transition to a BSS on a
different channel.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 32d6e66..72920ee 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1105,6 +1105,8 @@
else
ieee80211_set_wmm_default(sdata);
+ local->oper_channel = wk->chan;
+
if (elems.ht_info_elem && elems.wmm_param &&
(sdata->local->hw.queues >= 4) &&
!(ifmgd->flags & IEEE80211_STA_DISABLE_11N))
@@ -1797,15 +1799,6 @@
wk->sdata = sdata;
wk->done = ieee80211_probe_auth_done;
- /*
- * XXX: if still associated need to tell AP that we're going
- * to sleep and then change channel etc.
- * For now switch channel here, later will be handled
- * by submitting this as an off-channel work item.
- */
- sdata->local->oper_channel = req->bss->channel;
- ieee80211_hw_config(sdata->local, 0);
-
ieee80211_add_work(wk);
return 0;
}
@@ -1929,9 +1922,6 @@
else
ifmgd->flags &= ~IEEE80211_STA_CONTROL_PORT;
- sdata->local->oper_channel = req->bss->channel;
- ieee80211_hw_config(sdata->local, 0);
-
ieee80211_add_work(wk);
return 0;
}