diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-08-17 10:16:53 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:35:58 -0400 |
commit | 3ac64beecd27400d12cc7afb4108eef26c499f6a (patch) | |
tree | da0220085f68e30fe61ba9b8833dc6311d6dc25e /net/mac80211/scan.c | |
parent | ea416a793d2b611f22b42ba094fd2e5bd30fff43 (diff) |
mac80211: allow configure_filter callback to sleep
Over time, a whole bunch of drivers have come up
with their own scheme to delay the configure_filter
operation to a workqueue. To be able to simplify
things, allow configure_filter to sleep, and add
a new prepare_multicast callback that drivers that
need the multicast address list implement. This new
callback must be atomic, but most drivers either
don't care or just calculate a hash which can be
done atomically and then uploaded to the hardware
non-atomically.
A cursory look suggests that at76c50x-usb, ar9170,
mwl8k (which is actually very broken now), rt2x00,
wl1251, wl1271 and zd1211 should make use of this
new capability.
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 | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index e091cbc3434f..1e04be6b9129 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -292,13 +292,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted) | |||
292 | if (was_hw_scan) | 292 | if (was_hw_scan) |
293 | goto done; | 293 | goto done; |
294 | 294 | ||
295 | spin_lock_bh(&local->filter_lock); | 295 | ieee80211_configure_filter(local); |
296 | local->filter_flags &= ~FIF_BCN_PRBRESP_PROMISC; | ||
297 | drv_configure_filter(local, FIF_BCN_PRBRESP_PROMISC, | ||
298 | &local->filter_flags, | ||
299 | local->mc_count, | ||
300 | local->mc_list); | ||
301 | spin_unlock_bh(&local->filter_lock); | ||
302 | 296 | ||
303 | drv_sw_scan_complete(local); | 297 | drv_sw_scan_complete(local); |
304 | 298 | ||
@@ -376,13 +370,7 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local) | |||
376 | local->next_scan_state = SCAN_DECISION; | 370 | local->next_scan_state = SCAN_DECISION; |
377 | local->scan_channel_idx = 0; | 371 | local->scan_channel_idx = 0; |
378 | 372 | ||
379 | spin_lock_bh(&local->filter_lock); | 373 | ieee80211_configure_filter(local); |
380 | local->filter_flags |= FIF_BCN_PRBRESP_PROMISC; | ||
381 | drv_configure_filter(local, FIF_BCN_PRBRESP_PROMISC, | ||
382 | &local->filter_flags, | ||
383 | local->mc_count, | ||
384 | local->mc_list); | ||
385 | spin_unlock_bh(&local->filter_lock); | ||
386 | 374 | ||
387 | /* TODO: start scan as soon as all nullfunc frames are ACKed */ | 375 | /* TODO: start scan as soon as all nullfunc frames are ACKed */ |
388 | ieee80211_queue_delayed_work(&local->hw, | 376 | ieee80211_queue_delayed_work(&local->hw, |