]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
wlcore: AP: don't start mac80211 PS on non-peer HLIDs
authorArik Nemtsov <arik@wizery.com>
Mon, 10 Feb 2014 11:47:20 +0000 (13:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 13 Feb 2014 20:20:14 +0000 (15:20 -0500)
It seems the wl18xx FW sometimes sends spurious changes on the PSM state
of the broadcast HLID. This causes us to search for a station on a
non-peer link and fail, causing warnings in our log.

Prevent the driver from considering PSM changes for any non-peer HLIDs.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ti/wlcore/ps.c

index 26bfc365ba70bf03e215ddc0be7df0d01c13512b..b52516eed7b20302b618fcbe4e7934651e12646e 100644 (file)
@@ -280,7 +280,11 @@ void wl12xx_ps_link_start(struct wl1271 *wl, struct wl12xx_vif *wlvif,
        struct ieee80211_sta *sta;
        struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
-       if (test_bit(hlid, &wl->ap_ps_map))
+       if (WARN_ON_ONCE(wlvif->bss_type != BSS_TYPE_AP_BSS))
+               return;
+
+       if (!test_bit(hlid, wlvif->ap.sta_hlid_map) ||
+           test_bit(hlid, &wl->ap_ps_map))
                return;
 
        wl1271_debug(DEBUG_PSM, "start mac80211 PSM on hlid %d pkts %d "