aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-03-29 01:31:15 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-03-31 14:52:15 -0400
commite3efca0a63b4ac4d8849d37d082a95cf1a75162d (patch)
tree5c4e47e62d97fb16ce9447b9514d6773c347dcc0 /net/mac80211/rx.c
parent9fd1ea428590cf6e35e5a7df32ff6bccfd371db2 (diff)
mac80211: Fix drop_unencrypted for MFP with hwaccel
Commit bef5d1c70d132145c0fc75b3586a19841a9a82e4 split ieee80211_drop_unencrypted() into separate functions that are used for Data and Management frames. However, it did not handle the RX_FLAG_DECRYPTED correctly for Management frames: ieee80211_drop_unencrypted() can only return 0 for Management frames, so there is no point in calling it here. Instead, just check the status->flag directly. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index ea71e1abc4c8..14366d4afbed 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1408,12 +1408,15 @@ static int
1408ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx) 1408ieee80211_drop_unencrypted_mgmt(struct ieee80211_rx_data *rx)
1409{ 1409{
1410 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data; 1410 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
1411 struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
1411 __le16 fc = hdr->frame_control; 1412 __le16 fc = hdr->frame_control;
1412 int res;
1413 1413
1414 res = ieee80211_drop_unencrypted(rx, fc); 1414 /*
1415 if (unlikely(res)) 1415 * Pass through unencrypted frames if the hardware has
1416 return res; 1416 * decrypted them already.
1417 */
1418 if (status->flag & RX_FLAG_DECRYPTED)
1419 return 0;
1417 1420
1418 if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) { 1421 if (rx->sta && test_sta_flags(rx->sta, WLAN_STA_MFP)) {
1419 if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) && 1422 if (unlikely(ieee80211_is_unicast_robust_mgmt_frame(rx->skb) &&