Search Linux Wireless

[PATCH] mac80211: internally clear failed scans properly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When the IBSS code wants to scan, but that fails, we can
get stuck in a situation where you can never scan again.
Fix this by properly notifying ourselves when the scan
request has failed.

Signed-off-by: Johannes Berg <johannes@xxxxxxxxxxxxxxxx>
---
 net/mac80211/ibss.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- wireless-testing.orig/net/mac80211/ibss.c	2009-04-23 10:33:18.000000000 +0200
+++ wireless-testing/net/mac80211/ibss.c	2009-04-23 10:33:19.000000000 +0200
@@ -447,7 +447,8 @@ static void ieee80211_sta_merge_ibss(str
 	memcpy(sdata->local->int_scan_req.ssids[0].ssid,
 	       ifibss->ssid, IEEE80211_MAX_SSID_LEN);
 	sdata->local->int_scan_req.ssids[0].ssid_len = ifibss->ssid_len;
-	ieee80211_request_scan(sdata, &sdata->local->int_scan_req);
+	if (ieee80211_request_scan(sdata, &sdata->local->int_scan_req))
+		ieee80211_scan_failed(sdata->local);
 }
 
 static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
@@ -565,7 +566,8 @@ static void ieee80211_sta_find_ibss(stru
 		       ifibss->ssid, IEEE80211_MAX_SSID_LEN);
 		local->int_scan_req.ssids[0].ssid_len =
 			ifibss->ssid_len;
-		ieee80211_request_scan(sdata, &local->int_scan_req);
+		if (ieee80211_request_scan(sdata, &local->int_scan_req))
+			ieee80211_scan_failed(local);
 	} else if (ifibss->state != IEEE80211_IBSS_MLME_JOINED) {
 		int interval = IEEE80211_SCAN_INTERVAL;
 


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux