Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150263
b: refs/heads/master
c: 99c84cb
h: refs/heads/master
i:
  150261: 06e7fff
  150259: 51ae268
  150255: df9b95e
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 11, 2009
1 parent 2aa4d6f commit 4a58497
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 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: f2ca3ea484a51dc7ea5b738510fd03cb6ca7e2e2
refs/heads/master: 99c84cb0692729088788d8e1d1cee670154176e4
31 changes: 23 additions & 8 deletions trunk/net/mac80211/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,24 +559,39 @@ void ieee80211_scan_work(struct work_struct *work)
if (skip)
break;

next_delay = IEEE80211_PROBE_DELAY +
usecs_to_jiffies(local->hw.channel_change_time);
/*
* Probe delay is used to update the NAV, cf. 11.1.3.2.2
* (which unfortunately doesn't say _why_ step a) is done,
* but it waits for the probe delay or until a frame is
* received - and the received frame would update the NAV).
* For now, we do not support waiting until a frame is
* received.
*
* In any case, it is not necessary for a passive scan.
*/
if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN ||
!local->scan_req->n_ssids) {
next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
break;
}

next_delay = IEEE80211_PROBE_DELAY;
local->scan_state = SCAN_SEND_PROBE;
break;
case SCAN_SEND_PROBE:
next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
local->scan_state = SCAN_SET_CHANNEL;

if (local->scan_channel->flags & IEEE80211_CHAN_PASSIVE_SCAN ||
!local->scan_req->n_ssids)
break;
for (i = 0; i < local->scan_req->n_ssids; i++)
ieee80211_send_probe_req(
sdata, NULL,
local->scan_req->ssids[i].ssid,
local->scan_req->ssids[i].ssid_len,
local->scan_req->ie, local->scan_req->ie_len);

/*
* After sending probe requests, wait for probe responses
* on the channel.
*/
next_delay = IEEE80211_CHANNEL_TIME;
local->scan_state = SCAN_SET_CHANNEL;
break;
}

Expand Down

0 comments on commit 4a58497

Please sign in to comment.