diff options
Diffstat (limited to 'net/mac80211/rx.c')
| -rw-r--r-- | net/mac80211/rx.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index b04a4378adcc..81241e18f3a4 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -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 | ||
| 2371 | static 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 */ |
| 2413 | static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | 2372 | static 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) { |
