diff options
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 674eac1f996c..0011ac815097 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -995,8 +995,9 @@ ieee80211_rx_h_check(struct ieee80211_rx_data *rx) | |||
995 | rx->sta->num_duplicates++; | 995 | rx->sta->num_duplicates++; |
996 | } | 996 | } |
997 | return RX_DROP_UNUSABLE; | 997 | return RX_DROP_UNUSABLE; |
998 | } else | 998 | } else if (!(status->flag & RX_FLAG_AMSDU_MORE)) { |
999 | rx->sta->last_seq_ctrl[rx->seqno_idx] = hdr->seq_ctrl; | 999 | rx->sta->last_seq_ctrl[rx->seqno_idx] = hdr->seq_ctrl; |
1000 | } | ||
1000 | } | 1001 | } |
1001 | 1002 | ||
1002 | if (unlikely(rx->skb->len < 16)) { | 1003 | if (unlikely(rx->skb->len < 16)) { |
@@ -2402,7 +2403,8 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2402 | return RX_DROP_UNUSABLE; | 2403 | return RX_DROP_UNUSABLE; |
2403 | 2404 | ||
2404 | if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC && | 2405 | if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC && |
2405 | mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED) | 2406 | mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED && |
2407 | mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT) | ||
2406 | return RX_DROP_UNUSABLE; | 2408 | return RX_DROP_UNUSABLE; |
2407 | 2409 | ||
2408 | if (!(status->rx_flags & IEEE80211_RX_RA_MATCH)) | 2410 | if (!(status->rx_flags & IEEE80211_RX_RA_MATCH)) |
@@ -2566,31 +2568,46 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
2566 | 2568 | ||
2567 | goto queue; | 2569 | goto queue; |
2568 | case WLAN_CATEGORY_SPECTRUM_MGMT: | 2570 | case WLAN_CATEGORY_SPECTRUM_MGMT: |
2569 | if (status->band != IEEE80211_BAND_5GHZ) | ||
2570 | break; | ||
2571 | |||
2572 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
2573 | break; | ||
2574 | |||
2575 | /* verify action_code is present */ | 2571 | /* verify action_code is present */ |
2576 | if (len < IEEE80211_MIN_ACTION_SIZE + 1) | 2572 | if (len < IEEE80211_MIN_ACTION_SIZE + 1) |
2577 | break; | 2573 | break; |
2578 | 2574 | ||
2579 | switch (mgmt->u.action.u.measurement.action_code) { | 2575 | switch (mgmt->u.action.u.measurement.action_code) { |
2580 | case WLAN_ACTION_SPCT_MSR_REQ: | 2576 | case WLAN_ACTION_SPCT_MSR_REQ: |
2577 | if (status->band != IEEE80211_BAND_5GHZ) | ||
2578 | break; | ||
2579 | |||
2581 | if (len < (IEEE80211_MIN_ACTION_SIZE + | 2580 | if (len < (IEEE80211_MIN_ACTION_SIZE + |
2582 | sizeof(mgmt->u.action.u.measurement))) | 2581 | sizeof(mgmt->u.action.u.measurement))) |
2583 | break; | 2582 | break; |
2583 | |||
2584 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | ||
2585 | break; | ||
2586 | |||
2584 | ieee80211_process_measurement_req(sdata, mgmt, len); | 2587 | ieee80211_process_measurement_req(sdata, mgmt, len); |
2585 | goto handled; | 2588 | goto handled; |
2586 | case WLAN_ACTION_SPCT_CHL_SWITCH: | 2589 | case WLAN_ACTION_SPCT_CHL_SWITCH: { |
2587 | if (sdata->vif.type != NL80211_IFTYPE_STATION) | 2590 | u8 *bssid; |
2591 | if (len < (IEEE80211_MIN_ACTION_SIZE + | ||
2592 | sizeof(mgmt->u.action.u.chan_switch))) | ||
2593 | break; | ||
2594 | |||
2595 | if (sdata->vif.type != NL80211_IFTYPE_STATION && | ||
2596 | sdata->vif.type != NL80211_IFTYPE_ADHOC) | ||
2588 | break; | 2597 | break; |
2589 | 2598 | ||
2590 | if (!ether_addr_equal(mgmt->bssid, sdata->u.mgd.bssid)) | 2599 | if (sdata->vif.type == NL80211_IFTYPE_STATION) |
2600 | bssid = sdata->u.mgd.bssid; | ||
2601 | else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) | ||
2602 | bssid = sdata->u.ibss.bssid; | ||
2603 | else | ||
2604 | break; | ||
2605 | |||
2606 | if (!ether_addr_equal(mgmt->bssid, bssid)) | ||
2591 | break; | 2607 | break; |
2592 | 2608 | ||
2593 | goto queue; | 2609 | goto queue; |
2610 | } | ||
2594 | } | 2611 | } |
2595 | break; | 2612 | break; |
2596 | case WLAN_CATEGORY_SA_QUERY: | 2613 | case WLAN_CATEGORY_SA_QUERY: |