summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2013-09-09 17:48:59 +0400
committerArik Nemtsov <arik@wizery.com>2013-09-09 17:49:44 +0400
commitb64e36c2f24ac524f05c114904886cd364dd02b7 (patch)
treeed164441c457e2738d556b3248f10640e9a0a37e
parent3d0b546eebfc9993c74acc8f127812c8456af3f5 (diff)
downloadwl18xx-b64e36c2f24ac524f05c114904886cd364dd02b7.tar.xz
wlcore: don't switch channels on disconnected STA vifs
Sending the FW a channel switch command on a disconnected vif may result in a beacon loss event. Avoid this edge case. Signed-off-by: Arik Nemtsov <arik@wizery.com>
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index c34fee007aa..c824824921c 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5318,6 +5318,10 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
if (unlikely(wl->state == WLCORE_STATE_OFF)) {
wl12xx_for_each_wlvif_sta(wl, wlvif) {
struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
+
+ if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
+ continue;
+
ieee80211_chswitch_done(vif, false);
}
goto out;
@@ -5336,6 +5340,9 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
if (wl12xx_wlvif_to_vif(wlvif)->dummy_p2p)
continue;
+ if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
+ continue;
+
ret = wl->ops->channel_switch(wl, wlvif, ch_switch);
if (ret)
goto out_sleep;