[mac80211]: add add new firmware support and additional fixes for wl18xx
[openwrt/svn-archive/archive.git] / package / kernel / mac80211 / patches / 920-wlcore-don-t-switch-channels-on-disconnected-STA-vif.patch
1 From 4101e8dc540d19f1f6c24930629149191786e4cd Mon Sep 17 00:00:00 2001
2 From: Arik Nemtsov <arik@wizery.com>
3 Date: Mon, 9 Sep 2013 16:48:59 +0300
4 Subject: [PATCH 27/75] wlcore: don't switch channels on disconnected STA vifs
5
6 Sending the FW a channel switch command on a disconnected vif may result
7 in a beacon loss event. Avoid this edge case.
8
9 Signed-off-by: Arik Nemtsov <arik@wizery.com>
10 ---
11 drivers/net/wireless/ti/wlcore/main.c | 7 +++++++
12 1 file changed, 7 insertions(+)
13
14 diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
15 index 117e01e..a0c5a1e 100644
16 --- a/drivers/net/wireless/ti/wlcore/main.c
17 +++ b/drivers/net/wireless/ti/wlcore/main.c
18 @@ -5224,6 +5224,10 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
19 if (unlikely(wl->state == WLCORE_STATE_OFF)) {
20 wl12xx_for_each_wlvif_sta(wl, wlvif) {
21 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
22 +
23 + if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
24 + continue;
25 +
26 ieee80211_chswitch_done(vif, false);
27 }
28 goto out;
29 @@ -5239,6 +5243,9 @@ static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
30 wl12xx_for_each_wlvif_sta(wl, wlvif) {
31 unsigned long delay_usec;
32
33 + if (!test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags))
34 + continue;
35 +
36 ret = wl->ops->channel_switch(wl, wlvif, ch_switch);
37 if (ret)
38 goto out_sleep;
39 --
40 1.8.3.2
41