mac80211: always clear SDATA_STATE_OFFCHANNEL flag
[deliverable/linux.git] / net / mac80211 / offchannel.c
index e4330d843575321742d2a964fb60ed5a10551998..2948f8e2e67581c5b09529e5f24257de71326db4 100644 (file)
@@ -162,6 +162,9 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
 
        mutex_lock(&local->iflist_mtx);
        list_for_each_entry(sdata, &local->interfaces, list) {
+               if (sdata->vif.type != NL80211_IFTYPE_MONITOR)
+                       clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
+
                if (!ieee80211_sdata_running(sdata))
                        continue;
 
@@ -173,7 +176,6 @@ void ieee80211_offchannel_return(struct ieee80211_local *local,
                }
 
                if (sdata->vif.type != NL80211_IFTYPE_MONITOR) {
-                       clear_bit(SDATA_STATE_OFFCHANNEL, &sdata->state);
                        /*
                         * This may wake up queues even though the driver
                         * currently has them stopped. This is not very
This page took 0.025246 seconds and 5 git commands to generate.