]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/mac80211/main.c
mac80211: Only flush workqueue when last interface was removed
[mv-sheeva.git] / net / mac80211 / main.c
index 915afadb06028b270e7229074a325c66836a3e85..df0836ff1a206c4cfaf25d5ba602ed5496a95b89 100644 (file)
@@ -511,6 +511,7 @@ static int ieee80211_stop(struct net_device *dev)
        case IEEE80211_IF_TYPE_STA:
        case IEEE80211_IF_TYPE_IBSS:
                sdata->u.sta.state = IEEE80211_DISABLED;
+               memset(sdata->u.sta.bssid, 0, ETH_ALEN);
                del_timer_sync(&sdata->u.sta.timer);
                /*
                 * When we get here, the interface is marked down.
@@ -529,8 +530,6 @@ static int ieee80211_stop(struct net_device *dev)
                                local->sta_hw_scanning = 0;
                }
 
-               flush_workqueue(local->hw.workqueue);
-
                sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
                kfree(sdata->u.sta.extra_ie);
                sdata->u.sta.extra_ie = NULL;
@@ -554,6 +553,8 @@ static int ieee80211_stop(struct net_device *dev)
 
                ieee80211_led_radio(local, 0);
 
+               flush_workqueue(local->hw.workqueue);
+
                tasklet_disable(&local->tx_pending_tasklet);
                tasklet_disable(&local->tasklet);
        }
@@ -1313,7 +1314,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local,
        /*
         * Clear the TX filter mask for this STA when sending the next
         * packet. If the STA went to power save mode, this will happen
-        * happen when it wakes up for the next time.
+        * when it wakes up for the next time.
         */
        sta->flags |= WLAN_STA_CLEAR_PS_FILT;