aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c49
1 files changed, 1 insertions, 48 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index a864890e4d03..13a6697651ad 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -652,7 +652,7 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
652 set_release_timer: 652 set_release_timer:
653 653
654 mod_timer(&tid_agg_rx->reorder_timer, 654 mod_timer(&tid_agg_rx->reorder_timer,
655 tid_agg_rx->reorder_time[j] + 655 tid_agg_rx->reorder_time[j] + 1 +
656 HT_RX_REORDER_BUF_TIMEOUT); 656 HT_RX_REORDER_BUF_TIMEOUT);
657 } else { 657 } else {
658 del_timer(&tid_agg_rx->reorder_timer); 658 del_timer(&tid_agg_rx->reorder_timer);
@@ -2368,47 +2368,6 @@ ieee80211_rx_h_mgmt(struct ieee80211_rx_data *rx)
2368 return RX_QUEUED; 2368 return RX_QUEUED;
2369} 2369}
2370 2370
2371static void ieee80211_rx_michael_mic_report(struct ieee80211_hdr *hdr,
2372 struct ieee80211_rx_data *rx)
2373{
2374 int keyidx;
2375 unsigned int hdrlen;
2376
2377 hdrlen = ieee80211_hdrlen(hdr->frame_control);
2378 if (rx->skb->len >= hdrlen + 4)
2379 keyidx = rx->skb->data[hdrlen + 3] >> 6;
2380 else
2381 keyidx = -1;
2382
2383 if (!rx->sta) {
2384 /*
2385 * Some hardware seem to generate incorrect Michael MIC
2386 * reports; ignore them to avoid triggering countermeasures.
2387 */
2388 return;
2389 }
2390
2391 if (!ieee80211_has_protected(hdr->frame_control))
2392 return;
2393
2394 if (rx->sdata->vif.type == NL80211_IFTYPE_AP && keyidx) {
2395 /*
2396 * APs with pairwise keys should never receive Michael MIC
2397 * errors for non-zero keyidx because these are reserved for
2398 * group keys and only the AP is sending real multicast
2399 * frames in the BSS.
2400 */
2401 return;
2402 }
2403
2404 if (!ieee80211_is_data(hdr->frame_control) &&
2405 !ieee80211_is_auth(hdr->frame_control))
2406 return;
2407
2408 mac80211_ev_michael_mic_failure(rx->sdata, keyidx, hdr, NULL,
2409 GFP_ATOMIC);
2410}
2411
2412/* TODO: use IEEE80211_RX_FRAGMENTED */ 2371/* TODO: use IEEE80211_RX_FRAGMENTED */
2413static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, 2372static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
2414 struct ieee80211_rate *rate) 2373 struct ieee80211_rate *rate)
@@ -2752,12 +2711,6 @@ static bool ieee80211_prepare_and_rx_handle(struct ieee80211_rx_data *rx,
2752 if (!prepares) 2711 if (!prepares)
2753 return false; 2712 return false;
2754 2713
2755 if (status->flag & RX_FLAG_MMIC_ERROR) {
2756 if (status->rx_flags & IEEE80211_RX_RA_MATCH)
2757 ieee80211_rx_michael_mic_report(hdr, rx);
2758 return false;
2759 }
2760
2761 if (!consume) { 2714 if (!consume) {
2762 skb = skb_copy(skb, GFP_ATOMIC); 2715 skb = skb_copy(skb, GFP_ATOMIC);
2763 if (!skb) { 2716 if (!skb) {