@@ -388,20 +388,20 @@ ieee80211_rx_h_passive_scan(struct ieee8
{
struct ieee80211_local *local = rx->local;
struct sk_buff *skb = rx->skb;
+ struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+ ieee80211_rx_result ret;
- if (unlikely(test_bit(SCAN_HW_SCANNING, &local->scanning)))
- return ieee80211_scan_rx(rx->sdata, skb);
-
- if (unlikely(test_bit(SCAN_SW_SCANNING, &local->scanning) &&
- (rx->flags & IEEE80211_RX_IN_SCAN))) {
- /* drop all the other packets during a software scan anyway */
- if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED)
- dev_kfree_skb(skb);
- return RX_QUEUED;
- }
+ if (likely(!(rx->flags & IEEE80211_RX_IN_SCAN)))
+ return RX_CONTINUE;
- if (unlikely(rx->flags & IEEE80211_RX_IN_SCAN)) {
- /* scanning finished during invoking of handlers */
+ ret = ieee80211_scan_rx(rx->sdata, skb);
+ if (ret != RX_CONTINUE)
+ return ret;
+
+ if (status->freq != local->oper_channel->center_freq &&
+ (!local->tmp_channel ||
+ status->freq != local->tmp_channel->center_freq)) {
+ /* ignore scan channel RX */
I802_DEBUG_INC(local->rx_handlers_drop_passive_scan);
return RX_DROP_UNUSABLE;
}
@@ -2500,10 +2500,6 @@ void ieee80211_release_reorder_timeout(s
rx.queue = tid;
rx.flags |= IEEE80211_RX_RA_MATCH;
- if (unlikely(test_bit(SCAN_HW_SCANNING, &sta->local->scanning) ||
- test_bit(SCAN_OFF_CHANNEL, &sta->local->scanning)))
- rx.flags |= IEEE80211_RX_IN_SCAN;
-
spin_lock(&tid_agg_rx->reorder_lock);
ieee80211_sta_reorder_release(&sta->local->hw, tid_agg_rx, &frames);
spin_unlock(&tid_agg_rx->reorder_lock);