Skip to content

Commit

Permalink
mac80211: internally clear failed scans properly
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 6, 2009
1 parent 9ccebe6 commit 2d72289
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions net/mac80211/ibss.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,8 @@ static void ieee80211_sta_merge_ibss(struct ieee80211_sub_if_data *sdata)
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)
Expand Down Expand Up @@ -560,7 +561,8 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata)
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;

Expand Down

0 comments on commit 2d72289

Please sign in to comment.