diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2009-07-23 06:14:04 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-27 15:24:16 -0400 |
commit | fbe9c429f195111bbf7f1630efa19aee295fd8e7 (patch) | |
tree | 80556ac48bfa0e7d60db63e6c71b0bbf58143263 /net/mac80211/rx.c | |
parent | 2fb3f028a9a46bd344329766257699b4acb36525 (diff) |
mac80211: Replace {sw, hw}_scanning variables with a bitfield
Use a bitfield to store the current scan mode instead of two boolean
variables {sw,hw}_scanning. This patch does not introduce functional
changes but allows us to enhance the scan flags later (for example
for background scanning).
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index d9df819eef3b..9c1679d124ba 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -418,10 +418,10 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx) | |||
418 | struct ieee80211_local *local = rx->local; | 418 | struct ieee80211_local *local = rx->local; |
419 | struct sk_buff *skb = rx->skb; | 419 | struct sk_buff *skb = rx->skb; |
420 | 420 | ||
421 | if (unlikely(local->hw_scanning)) | 421 | if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning))) |
422 | return ieee80211_scan_rx(rx->sdata, skb); | 422 | return ieee80211_scan_rx(rx->sdata, skb); |
423 | 423 | ||
424 | if (unlikely(local->sw_scanning)) { | 424 | if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning))) { |
425 | /* drop all the other packets during a software scan anyway */ | 425 | /* drop all the other packets during a software scan anyway */ |
426 | if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED) | 426 | if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED) |
427 | dev_kfree_skb(skb); | 427 | dev_kfree_skb(skb); |
@@ -2136,7 +2136,7 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw, | |||
2136 | return; | 2136 | return; |
2137 | } | 2137 | } |
2138 | 2138 | ||
2139 | if (unlikely(local->sw_scanning || local->hw_scanning)) | 2139 | if (unlikely(local->scanning)) |
2140 | rx.flags |= IEEE80211_RX_IN_SCAN; | 2140 | rx.flags |= IEEE80211_RX_IN_SCAN; |
2141 | 2141 | ||
2142 | ieee80211_parse_qos(&rx); | 2142 | ieee80211_parse_qos(&rx); |