]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
[PATCH] mac80211: Don't stop tx queue on master device while scanning.
authorMattias Nissler <mattias.nissler@gmx.de>
Fri, 8 Jun 2007 13:31:13 +0000 (15:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 12 Jun 2007 00:29:11 +0000 (20:29 -0400)
mac80211 stops the tx queues during scans. This is wrong with respect
to the master deivce tx queue, since stopping it prevents any probes
from being sent during the scan. Instead, they accumulate in the queue
and are only sent after the scan is finished, which is obviously
wrong.

Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/ieee80211_sta.c

index 9f30ae4c2ab3e4be6f97f05d816528bb3e411a2c..91b545c144c1d957e0127169b3bdc8e6edfa8a15 100644 (file)
@@ -2592,11 +2592,17 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw)
 
        read_lock(&local->sub_if_lock);
        list_for_each_entry(sdata, &local->sub_if_list, list) {
+
+               /* No need to wake the master device. */
+               if (sdata->dev == local->mdev)
+                       continue;
+
                if (sdata->type == IEEE80211_IF_TYPE_STA) {
                        if (sdata->u.sta.associated)
                                ieee80211_send_nullfunc(local, sdata, 0);
                        ieee80211_sta_timer((unsigned long)sdata);
                }
+
                netif_wake_queue(sdata->dev);
        }
        read_unlock(&local->sub_if_lock);
@@ -2738,6 +2744,12 @@ static int ieee80211_sta_start_scan(struct net_device *dev,
 
        read_lock(&local->sub_if_lock);
        list_for_each_entry(sdata, &local->sub_if_list, list) {
+
+               /* Don't stop the master interface, otherwise we can't transmit
+                * probes! */
+               if (sdata->dev == local->mdev)
+                       continue;
+
                netif_stop_queue(sdata->dev);
                if (sdata->type == IEEE80211_IF_TYPE_STA &&
                    sdata->u.sta.associated)