Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135264
b: refs/heads/master
c: af88b90
h: refs/heads/master
v: v3
  • Loading branch information
Helmut Schaa authored and John W. Linville committed Mar 16, 2009
1 parent 9aa5a81 commit 811bb26
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8830cb678b13004ab54f606345769f1e74e378c6
refs/heads/master: af88b9078d4aa31d667d2d82601ede9cae3bac37
1 change: 1 addition & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,7 @@ int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata,
char *ie, size_t len);

void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
void ieee80211_scan_failed(struct ieee80211_local *local);
int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata,
struct cfg80211_scan_request *req);
struct ieee80211_bss *
Expand Down
14 changes: 12 additions & 2 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,10 @@ static int ieee80211_sta_config_auth(struct ieee80211_sub_if_data *sdata)
local->int_scan_req.ssids[0].ssid_len = 0;
else
local->int_scan_req.ssids[0].ssid_len = ifmgd->ssid_len;
ieee80211_start_scan(sdata, &local->int_scan_req);

if (ieee80211_start_scan(sdata, &local->int_scan_req))
ieee80211_scan_failed(local);

ifmgd->state = IEEE80211_STA_MLME_AUTHENTICATE;
set_bit(IEEE80211_STA_REQ_AUTH, &ifmgd->request);
} else {
Expand Down Expand Up @@ -1757,7 +1760,14 @@ static void ieee80211_sta_work(struct work_struct *work)
ifmgd->state != IEEE80211_STA_MLME_AUTHENTICATE &&
ifmgd->state != IEEE80211_STA_MLME_ASSOCIATE &&
test_and_clear_bit(IEEE80211_STA_REQ_SCAN, &ifmgd->request)) {
ieee80211_start_scan(sdata, local->scan_req);
/*
* The call to ieee80211_start_scan can fail but ieee80211_request_scan
* (which queued ieee80211_sta_work) did not return an error. Thus, call
* ieee80211_scan_failed here if ieee80211_start_scan fails in order to
* notify the scan requester.
*/
if (ieee80211_start_scan(sdata, local->scan_req))
ieee80211_scan_failed(local);
return;
}

Expand Down
12 changes: 12 additions & 0 deletions trunk/net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,18 @@ ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
return RX_QUEUED;
}

void ieee80211_scan_failed(struct ieee80211_local *local)
{
if (WARN_ON(!local->scan_req))
return;

/* notify cfg80211 about the failed scan */
if (local->scan_req != &local->int_scan_req)
cfg80211_scan_done(local->scan_req, true);

local->scan_req = NULL;
}

void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
{
struct ieee80211_local *local = hw_to_local(hw);
Expand Down

0 comments on commit 811bb26

Please sign in to comment.