]> err.no Git - linux-2.6/commitdiff
[PATCH] Restore channel setting after scan.
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 23 Mar 2006 14:03:00 +0000 (14:03 +0000)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 23 Mar 2006 21:18:47 +0000 (16:18 -0500)
After a scan, we weren't switching back to the original channel if we
were associated with an AP. So NetworkManager's periodic scans would
disrupt connectivity until the ESSID was manually set again. Fix that.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/ieee80211/softmac/ieee80211softmac_scan.c

index 290ddb0951d64b303209b6d7c3a1fac33f037e30..bb9ab8b45d09fde0898f3e19ee2fbf9d6726152b 100644 (file)
@@ -232,6 +232,13 @@ void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm)
        sm->scanning = 0;
        spin_unlock_irqrestore(&sm->lock, flags);
        
+       if (sm->associnfo.bssvalid) {
+               struct ieee80211softmac_network *net;
+
+               net = ieee80211softmac_get_network_by_bssid(sm, sm->associnfo.bssid);
+               if (net)
+                       sm->set_channel(sm->dev, net->channel);
+       }
        ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL);
 }
 EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);