diff options
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 5030a3c87509..46f35dc6accb 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -409,6 +409,19 @@ int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata, | |||
409 | return 0; | 409 | return 0; |
410 | } | 410 | } |
411 | 411 | ||
412 | /* | ||
413 | * Hardware/driver doesn't support hw_scan, so use software | ||
414 | * scanning instead. First send a nullfunc frame with power save | ||
415 | * bit on so that AP will buffer the frames for us while we are not | ||
416 | * listening, then send probe requests to each channel and wait for | ||
417 | * the responses. After all channels are scanned, tune back to the | ||
418 | * original channel and send a nullfunc frame with power save bit | ||
419 | * off to trigger the AP to send us all the buffered frames. | ||
420 | * | ||
421 | * Note that while local->sw_scanning is true everything else but | ||
422 | * nullfunc frames and probe requests will be dropped in | ||
423 | * ieee80211_tx_h_check_assoc(). | ||
424 | */ | ||
412 | local->sw_scanning = true; | 425 | local->sw_scanning = true; |
413 | if (local->ops->sw_scan_start) | 426 | if (local->ops->sw_scan_start) |
414 | local->ops->sw_scan_start(local_to_hw(local)); | 427 | local->ops->sw_scan_start(local_to_hw(local)); |