diff options
-rw-r--r-- | net/mac80211/rx.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 2b6b4eab44dd..8c666e9e8fb0 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -389,24 +389,22 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx) | |||
389 | struct ieee80211_local *local = rx->local; | 389 | struct ieee80211_local *local = rx->local; |
390 | struct sk_buff *skb = rx->skb; | 390 | struct sk_buff *skb = rx->skb; |
391 | 391 | ||
392 | if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning))) | 392 | if (likely(!(rx->flags & IEEE80211_RX_IN_SCAN))) |
393 | return RX_CONTINUE; | ||
394 | |||
395 | if (test_bit(SCAN_HW_SCANNING, &local->scanning)) | ||
393 | return ieee80211_scan_rx(rx->sdata, skb); | 396 | return ieee80211_scan_rx(rx->sdata, skb); |
394 | 397 | ||
395 | if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning) && | 398 | if (test_bit(SCAN_SW_SCANNING, &local->scanning)) { |
396 | (rx->flags & IEEE80211_RX_IN_SCAN))) { | ||
397 | /* drop all the other packets during a software scan anyway */ | 399 | /* drop all the other packets during a software scan anyway */ |
398 | if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED) | 400 | if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED) |
399 | dev_kfree_skb(skb); | 401 | dev_kfree_skb(skb); |
400 | return RX_QUEUED; | 402 | return RX_QUEUED; |
401 | } | 403 | } |
402 | 404 | ||
403 | if (unlikely(rx->flags & IEEE80211_RX_IN_SCAN)) { | 405 | /* scanning finished during invoking of handlers */ |
404 | /* scanning finished during invoking of handlers */ | 406 | I802_DEBUG_INC(local->rx_handlers_drop_passive_scan); |
405 | I802_DEBUG_INC(local->rx_handlers_drop_passive_scan); | 407 | return RX_DROP_UNUSABLE; |
406 | return RX_DROP_UNUSABLE; | ||
407 | } | ||
408 | |||
409 | return RX_CONTINUE; | ||
410 | } | 408 | } |
411 | 409 | ||
412 | 410 | ||
@@ -2495,10 +2493,6 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) | |||
2495 | rx.queue = tid; | 2493 | rx.queue = tid; |
2496 | rx.flags |= IEEE80211_RX_RA_MATCH; | 2494 | rx.flags |= IEEE80211_RX_RA_MATCH; |
2497 | 2495 | ||
2498 | if (unlikely(test_bit(SCAN_HW_SCANNING, &sta->local->scanning) || | ||
2499 | test_bit(SCAN_OFF_CHANNEL, &sta->local->scanning))) | ||
2500 | rx.flags |= IEEE80211_RX_IN_SCAN; | ||
2501 | |||
2502 | spin_lock(&tid_agg_rx->reorder_lock); | 2496 | spin_lock(&tid_agg_rx->reorder_lock); |
2503 | ieee80211_sta_reorder_release(&sta->local->hw, tid_agg_rx, &frames); | 2497 | ieee80211_sta_reorder_release(&sta->local->hw, tid_agg_rx, &frames); |
2504 | spin_unlock(&tid_agg_rx->reorder_lock); | 2498 | spin_unlock(&tid_agg_rx->reorder_lock); |