From: David Woodhouse Date: Thu, 23 Mar 2006 14:03:00 +0000 (+0000) Subject: [PATCH] Restore channel setting after scan. X-Git-Tag: v2.6.17-rc1~994^2^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4edac92fcf5956b0ef52fb281207863902e430bc;p=linux-2.6 [PATCH] Restore channel setting after scan. 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 Signed-off-by: John W. Linville --- diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c index 290ddb0951..bb9ab8b45d 100644 --- a/net/ieee80211/softmac/ieee80211softmac_scan.c +++ b/net/ieee80211/softmac/ieee80211softmac_scan.c @@ -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);