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.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index aa41e382bbb3..ac205a33690f 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -605,10 +605,8 @@ static void ieee80211_sta_reorder_release(struct ieee80211_hw *hw,
605 605
606#ifdef CONFIG_MAC80211_HT_DEBUG 606#ifdef CONFIG_MAC80211_HT_DEBUG
607 if (net_ratelimit()) 607 if (net_ratelimit())
608 printk(KERN_DEBUG "%s: release an RX reorder " 608 wiphy_debug(hw->wiphy,
609 "frame due to timeout on earlier " 609 "release an RX reorder frame due to timeout on earlier frames\n");
610 "frames\n",
611 wiphy_name(hw->wiphy));
612#endif 610#endif
613 ieee80211_release_reorder_frame(hw, tid_agg_rx, 611 ieee80211_release_reorder_frame(hw, tid_agg_rx,
614 j, frames); 612 j, frames);
@@ -1002,6 +1000,12 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx)
1002 case WLAN_CIPHER_SUITE_AES_CMAC: 1000 case WLAN_CIPHER_SUITE_AES_CMAC:
1003 result = ieee80211_crypto_aes_cmac_decrypt(rx); 1001 result = ieee80211_crypto_aes_cmac_decrypt(rx);
1004 break; 1002 break;
1003 default:
1004 /*
1005 * We can reach here only with HW-only algorithms
1006 * but why didn't it decrypt the frame?!
1007 */
1008 return RX_DROP_UNUSABLE;
1005 } 1009 }
1006 1010
1007 /* either the frame has been decrypted or will be dropped */ 1011 /* either the frame has been decrypted or will be dropped */
@@ -1523,7 +1527,7 @@ static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx, __le16 fc)
1523 * Allow EAPOL frames to us/the PAE group address regardless 1527 * Allow EAPOL frames to us/the PAE group address regardless
1524 * of whether the frame was encrypted or not. 1528 * of whether the frame was encrypted or not.
1525 */ 1529 */
1526 if (ehdr->h_proto == htons(ETH_P_PAE) && 1530 if (ehdr->h_proto == rx->sdata->control_port_protocol &&
1527 (compare_ether_addr(ehdr->h_dest, rx->sdata->vif.addr) == 0 || 1531 (compare_ether_addr(ehdr->h_dest, rx->sdata->vif.addr) == 0 ||
1528 compare_ether_addr(ehdr->h_dest, pae_group_addr) == 0)) 1532 compare_ether_addr(ehdr->h_dest, pae_group_addr) == 0))
1529 return true; 1533 return true;
@@ -2481,6 +2485,11 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
2481{ 2485{
2482 struct sk_buff_head frames; 2486 struct sk_buff_head frames;
2483 struct ieee80211_rx_data rx = { }; 2487 struct ieee80211_rx_data rx = { };
2488 struct tid_ampdu_rx *tid_agg_rx;
2489
2490 tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]);
2491 if (!tid_agg_rx)
2492 return;
2484 2493
2485 __skb_queue_head_init(&frames); 2494 __skb_queue_head_init(&frames);
2486 2495
@@ -2495,10 +2504,9 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
2495 test_bit(SCAN_OFF_CHANNEL, &sta->local->scanning))) 2504 test_bit(SCAN_OFF_CHANNEL, &sta->local->scanning)))
2496 rx.flags |= IEEE80211_RX_IN_SCAN; 2505 rx.flags |= IEEE80211_RX_IN_SCAN;
2497 2506
2498 spin_lock(&sta->ampdu_mlme.tid_rx[tid]->reorder_lock); 2507 spin_lock(&tid_agg_rx->reorder_lock);
2499 ieee80211_sta_reorder_release(&sta->local->hw, 2508 ieee80211_sta_reorder_release(&sta->local->hw, tid_agg_rx, &frames);
2500 sta->ampdu_mlme.tid_rx[tid], &frames); 2509 spin_unlock(&tid_agg_rx->reorder_lock);
2501 spin_unlock(&sta->ampdu_mlme.tid_rx[tid]->reorder_lock);
2502 2510
2503 ieee80211_rx_handlers(&rx, &frames); 2511 ieee80211_rx_handlers(&rx, &frames);
2504} 2512}
@@ -2698,10 +2706,9 @@ static void __ieee80211_rx_handle_packet(struct ieee80211_hw *hw,
2698 skb_new = skb_copy(skb, GFP_ATOMIC); 2706 skb_new = skb_copy(skb, GFP_ATOMIC);
2699 if (!skb_new) { 2707 if (!skb_new) {
2700 if (net_ratelimit()) 2708 if (net_ratelimit())
2701 printk(KERN_DEBUG "%s: failed to copy " 2709 wiphy_debug(local->hw.wiphy,
2702 "multicast frame for %s\n", 2710 "failed to copy multicast frame for %s\n",
2703 wiphy_name(local->hw.wiphy), 2711 prev->name);
2704 prev->name);
2705 goto next; 2712 goto next;
2706 } 2713 }
2707 ieee80211_invoke_rx_handlers(prev, &rx, skb_new); 2714 ieee80211_invoke_rx_handlers(prev, &rx, skb_new);