[PATCH] brcm80211: Allow scans after scanning for specific ssid

Sean Paul seanpaul at chromium.org
Wed May 11 21:16:48 UTC 2011


brcmfmac driver returned "busy" for all scan requests after a scan
request for a specific SSID. scan_request field was not being cleared
if the code path did not call wl_do_iscan(). Users can then not
reconnect to any SSID after disconnecting (unless they take the
interface down and then back up).

Tested on Nvidia Seaboard + BCM4329 + 2.6.38

Change-Id: I67332e17ed6f9f3f51df05e2ad4ba196efd5aa3f
Signed-off-by: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Grant Grundler <grundler at chromium.org>
---
 drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
index 555b056..7f4817d 100644
--- a/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c
@@ -828,21 +828,21 @@ __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
 		wl_set_mpc(ndev, 0);
 		err = wl_dev_ioctl(ndev, WLC_SCAN, &sr->ssid,
 				sizeof(sr->ssid));
-		if (err) {
+		if (!err) {
+			cfg80211_scan_done(wl->scan_request, false);
+		} else {
 			if (err == -EBUSY) {
 				WL_INFO("system busy : scan for \"%s\" canceled\n",
 					sr->ssid.SSID);
 			} else {
 				WL_ERR("WLC_SCAN error (%d)\n", err);
 			}
-			wl_set_mpc(ndev, 1);
 			goto scan_out;
 		}
 	}
 
-	return 0;
-
 scan_out:
+	wl_set_mpc(ndev, 1);
 	clear_bit(WL_STATUS_SCANNING, &wl->status);
 	wl->scan_request = NULL;
 	return err;
-- 
1.7.1




More information about the devel mailing list