summaryrefslogtreecommitdiffstats
path: root/net/mac80211/wpa.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-10-17 16:23:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-17 16:23:33 -0400
commit290eddc4b3661dc4dfa95d199e0be5788928b3b1 (patch)
tree2130a4aab73e43e08b6566b06211069a96a2ff22 /net/mac80211/wpa.c
parent8f7b8db6e0557c8437adf9371e020cd89a7e85dc (diff)
parent3a40414f826a8f1096d9b94c4a53ef91b25ba28d (diff)
downloadop-kernel-dev-290eddc4b3661dc4dfa95d199e0be5788928b3b1.zip
op-kernel-dev-290eddc4b3661dc4dfa95d199e0be5788928b3b1.tar.gz
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r--net/mac80211/wpa.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index e72562a1..8bd2f5c 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -546,14 +546,19 @@ ieee80211_crypto_ccmp_decrypt(struct ieee80211_rx_data *rx)
static void bip_aad(struct sk_buff *skb, u8 *aad)
{
+ __le16 mask_fc;
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
+
/* BIP AAD: FC(masked) || A1 || A2 || A3 */
/* FC type/subtype */
- aad[0] = skb->data[0];
/* Mask FC Retry, PwrMgt, MoreData flags to zero */
- aad[1] = skb->data[1] & ~(BIT(4) | BIT(5) | BIT(6));
+ mask_fc = hdr->frame_control;
+ mask_fc &= ~cpu_to_le16(IEEE80211_FCTL_RETRY | IEEE80211_FCTL_PM |
+ IEEE80211_FCTL_MOREDATA);
+ put_unaligned(mask_fc, (__le16 *) &aad[0]);
/* A1 || A2 || A3 */
- memcpy(aad + 2, skb->data + 4, 3 * ETH_ALEN);
+ memcpy(aad + 2, &hdr->addr1, 3 * ETH_ALEN);
}
OpenPOWER on IntegriCloud