[PATCH] softmac: dont send out packets while scanning
authorjohannes@sipsolutions.net <johannes@sipsolutions.net>
Tue, 11 Apr 2006 08:58:07 +0000 (10:58 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 19 Apr 2006 21:25:39 +0000 (17:25 -0400)
Seems we forgot to stop the queue while scanning. Better do that so we
don't transmit packets all the time during background scanning.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/softmac/ieee80211softmac_scan.c

index bb9ab8b45d09fde0898f3e19ee2fbf9d6726152b..2b9e7edfa3ce4719d5783bd1b822bd825c763cce 100644 (file)
@@ -47,6 +47,7 @@ ieee80211softmac_start_scan(struct ieee80211softmac_device *sm)
        sm->scanning = 1;
        spin_unlock_irqrestore(&sm->lock, flags);
 
+       netif_tx_disable(sm->ieee->dev);
        ret = sm->start_scan(sm->dev);
        if (ret) {
                spin_lock_irqsave(&sm->lock, flags);
@@ -239,6 +240,7 @@ void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm)
                if (net)
                        sm->set_channel(sm->dev, net->channel);
        }
+       netif_wake_queue(sm->ieee->dev);
        ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL);
 }
 EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);