diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-10-17 16:23:33 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-10-17 16:23:33 -0400 |
commit | 290eddc4b3661dc4dfa95d199e0be5788928b3b1 (patch) | |
tree | 2130a4aab73e43e08b6566b06211069a96a2ff22 /net/mac80211/wpa.c | |
parent | 8f7b8db6e0557c8437adf9371e020cd89a7e85dc (diff) | |
parent | 3a40414f826a8f1096d9b94c4a53ef91b25ba28d (diff) | |
download | linux-290eddc4b3661dc4dfa95d199e0be5788928b3b1.tar.bz2 |
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.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index e72562a18bad..8bd2f5c6a56e 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); } |