]> git.karo-electronics.de Git - linux-beck.git/commitdiff
wlcore: clear roc_vif on iface removal
authorArik Nemtsov <arik@wizery.com>
Tue, 27 Nov 2012 06:44:48 +0000 (08:44 +0200)
committerLuciano Coelho <coelho@ti.com>
Tue, 4 Dec 2012 15:05:52 +0000 (17:05 +0200)
When removing an interface currently performing a ROC operation, clear
the current ROC state. This is useful especially during recovery and
keeps mac80211 in sync to our state.

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/main.c

index 1b42cb3d472af35bd3a2b42dca6e1f3e9af6c467..33392168bf395293c9ff381f3c20519459516e3b 100644 (file)
@@ -2414,6 +2414,11 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl,
                wl->sched_vif = NULL;
        }
 
+       if (wl->roc_vif == vif) {
+               wl->roc_vif = NULL;
+               ieee80211_remain_on_channel_expired(wl->hw);
+       }
+
        if (!test_bit(WL1271_FLAG_RECOVERY_IN_PROGRESS, &wl->flags)) {
                /* disable active roles */
                ret = wl1271_ps_elp_wakeup(wl);