diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-12-23 07:15:32 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:54:51 -0500 |
commit | a80f7c0b088187c8471b441d461e937991870661 (patch) | |
tree | f673c08009a03f2e988a638510b112a5584bea11 /net/mac80211/scan.c | |
parent | 9607e6b66a0d25ca63b70d54a4283fa13d8f7c9d (diff) |
mac80211: introduce flush operation
We've long lacked a good confirmation that frames
have really gone out, e.g. before going off-channel
for a scan. Add a flush() operation that drivers
can implement to provide that confirmation, and use
it in a few places:
* before scanning sends the nullfunc frames
* after scanning sends the nullfunc frames, if any
* when going idle, to send any pending frames
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/scan.c')
-rw-r--r-- | net/mac80211/scan.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index ae1830056521..d98c45e5528b 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -418,9 +418,10 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | |||
418 | local->next_scan_state = SCAN_DECISION; | 418 | local->next_scan_state = SCAN_DECISION; |
419 | local->scan_channel_idx = 0; | 419 | local->scan_channel_idx = 0; |
420 | 420 | ||
421 | drv_flush(local, false); | ||
422 | |||
421 | ieee80211_configure_filter(local); | 423 | ieee80211_configure_filter(local); |
422 | 424 | ||
423 | /* TODO: start scan as soon as all nullfunc frames are ACKed */ | ||
424 | ieee80211_queue_delayed_work(&local->hw, | 425 | ieee80211_queue_delayed_work(&local->hw, |
425 | &local->scan_work, | 426 | &local->scan_work, |
426 | IEEE80211_CHANNEL_TIME); | 427 | IEEE80211_CHANNEL_TIME); |
@@ -584,8 +585,16 @@ static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *loca | |||
584 | 585 | ||
585 | __set_bit(SCAN_OFF_CHANNEL, &local->scanning); | 586 | __set_bit(SCAN_OFF_CHANNEL, &local->scanning); |
586 | 587 | ||
588 | /* | ||
589 | * What if the nullfunc frames didn't arrive? | ||
590 | */ | ||
591 | drv_flush(local, false); | ||
592 | if (local->ops->flush) | ||
593 | *next_delay = 0; | ||
594 | else | ||
595 | *next_delay = HZ / 10; | ||
596 | |||
587 | /* advance to the next channel to be scanned */ | 597 | /* advance to the next channel to be scanned */ |
588 | *next_delay = HZ / 10; | ||
589 | local->next_scan_state = SCAN_SET_CHANNEL; | 598 | local->next_scan_state = SCAN_SET_CHANNEL; |
590 | } | 599 | } |
591 | 600 | ||