aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-09-24 05:21:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-09-27 15:57:53 -0400
commit4080c7cdc23f26c6e6166a70f50fa43814552d81 (patch)
tree3eb62b56b636e336033fece7b7089b1e28b254ad /net/mac80211/rx.c
parent4b0dd98e70b6516c2c26f28091c2fb09f0ecf215 (diff)
mac80211: fix release_reorder_timeout in scan
Even if the reorder timeout timer fires while scanning, the frames weren't received during scanning and therefore shouldn't be dropped. To implement this, changes to the passive scan RX handler simplify understanding it, because it currently checks HW_SCANNING independently of a packet's in-scan receive status (which doesn't make a big difference, since scan_rx() will only pick up probe responses and beacons, which can't be aggregated.) Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c22
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);