diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-04-23 04:38:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:14:29 -0400 |
commit | 2d72289095e9621158acf1d59a830cfe920fa93b (patch) | |
tree | bc5c975124e48e3ec8bbbc7c9e75f62c98504bb7 /net | |
parent | 9ccebe6148bcb0aba2d89743df2ff182ced505ec (diff) |
mac80211: internally clear failed scans properly
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@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ibss.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 895f4854760c..9fe1f937e0b4 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -439,7 +439,8 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata) | |||
439 | memcpy(sdata->local->int_scan_req.ssids[0].ssid, | 439 | memcpy(sdata->local->int_scan_req.ssids[0].ssid, |
440 | ifibss->ssid, IEEE80211_MAX_SSID_LEN); | 440 | ifibss->ssid, IEEE80211_MAX_SSID_LEN); |
441 | sdata->local->int_scan_req.ssids[0].ssid_len = ifibss->ssid_len; | 441 | sdata->local->int_scan_req.ssids[0].ssid_len = ifibss->ssid_len; |
442 | ieee80211_request_scan(sdata, &sdata->local->int_scan_req); | 442 | if (ieee80211_request_scan(sdata, &sdata->local->int_scan_req)) |
443 | ieee80211_scan_failed(sdata->local); | ||
443 | } | 444 | } |
444 | 445 | ||
445 | static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) | 446 | static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata) |
@@ -560,7 +561,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
560 | ifibss->ssid, IEEE80211_MAX_SSID_LEN); | 561 | ifibss->ssid, IEEE80211_MAX_SSID_LEN); |
561 | local->int_scan_req.ssids[0].ssid_len = | 562 | local->int_scan_req.ssids[0].ssid_len = |
562 | ifibss->ssid_len; | 563 | ifibss->ssid_len; |
563 | ieee80211_request_scan(sdata, &local->int_scan_req); | 564 | if (ieee80211_request_scan(sdata, &local->int_scan_req)) |
565 | ieee80211_scan_failed(local); | ||
564 | } else if (ifibss->state != IEEE80211_IBSS_MLME_JOINED) { | 566 | } else if (ifibss->state != IEEE80211_IBSS_MLME_JOINED) { |
565 | int interval = IEEE80211_SCAN_INTERVAL; | 567 | int interval = IEEE80211_SCAN_INTERVAL; |
566 | 568 | ||