diff options
-rw-r--r-- | net/mac80211/scan.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index e51b99b1473c..e65d74ba404b 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -559,24 +559,39 @@ void ieee80211_scan_work(struct work_struct *work) | |||
559 | if (skip) | 559 | if (skip) |
560 | break; | 560 | break; |
561 | 561 | ||
562 | next_delay = IEEE80211_PROBE_DELAY + | 562 | /* |
563 | usecs_to_jiffies(local->hw.channel_change_time); | 563 | * Probe delay is used to update the NAV, cf. 11.1.3.2.2 |
564 | * (which unfortunately doesn't say _why_ step a) is done, | ||
565 | * but it waits for the probe delay or until a frame is | ||
566 | * received - and the received frame would update the NAV). | ||
567 | * For now, we do not support waiting until a frame is | ||
568 | * received. | ||
569 | * | ||
570 | * In any case, it is not necessary for a passive scan. | ||
571 | */ | ||
572 | if (chan->flags & IEEE80211_CHAN_PASSIVE_SCAN || | ||
573 | !local->scan_req->n_ssids) { | ||
574 | next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; | ||
575 | break; | ||
576 | } | ||
577 | |||
578 | next_delay = IEEE80211_PROBE_DELAY; | ||
564 | local->scan_state = SCAN_SEND_PROBE; | 579 | local->scan_state = SCAN_SEND_PROBE; |
565 | break; | 580 | break; |
566 | case SCAN_SEND_PROBE: | 581 | case SCAN_SEND_PROBE: |
567 | next_delay = IEEE80211_PASSIVE_CHANNEL_TIME; | ||
568 | local->scan_state = SCAN_SET_CHANNEL; | ||
569 | |||
570 | if (local->scan_channel->flags & IEEE80211_CHAN_PASSIVE_SCAN || | ||
571 | !local->scan_req->n_ssids) | ||
572 | break; | ||
573 | for (i = 0; i < local->scan_req->n_ssids; i++) | 582 | for (i = 0; i < local->scan_req->n_ssids; i++) |
574 | ieee80211_send_probe_req( | 583 | ieee80211_send_probe_req( |
575 | sdata, NULL, | 584 | sdata, NULL, |
576 | local->scan_req->ssids[i].ssid, | 585 | local->scan_req->ssids[i].ssid, |
577 | local->scan_req->ssids[i].ssid_len, | 586 | local->scan_req->ssids[i].ssid_len, |
578 | local->scan_req->ie, local->scan_req->ie_len); | 587 | local->scan_req->ie, local->scan_req->ie_len); |
588 | |||
589 | /* | ||
590 | * After sending probe requests, wait for probe responses | ||
591 | * on the channel. | ||
592 | */ | ||
579 | next_delay = IEEE80211_CHANNEL_TIME; | 593 | next_delay = IEEE80211_CHANNEL_TIME; |
594 | local->scan_state = SCAN_SET_CHANNEL; | ||
580 | break; | 595 | break; |
581 | } | 596 | } |
582 | 597 | ||