mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 14:05:19 +08:00
Fix hardware encryption (both WEP and AES) doesn't work with fragmentation.
Firmware sends received packets with double sized ICV/MIC. Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
This commit is contained in:
parent
afbf30a2b7
commit
a2d73e60bb
@ -7587,6 +7587,9 @@ static void ipw_rebuild_decrypted_skb(struct ipw_priv *priv,
|
||||
memmove(skb->data + IEEE80211_3ADDR_LEN,
|
||||
skb->data + IEEE80211_3ADDR_LEN + 8,
|
||||
skb->len - IEEE80211_3ADDR_LEN - 8);
|
||||
if (fc & IEEE80211_FCTL_MOREFRAGS)
|
||||
skb_trim(skb, skb->len - 16); /* 2*MIC */
|
||||
else
|
||||
skb_trim(skb, skb->len - 8); /* MIC */
|
||||
break;
|
||||
case SEC_LEVEL_2:
|
||||
@ -7596,6 +7599,9 @@ static void ipw_rebuild_decrypted_skb(struct ipw_priv *priv,
|
||||
memmove(skb->data + IEEE80211_3ADDR_LEN,
|
||||
skb->data + IEEE80211_3ADDR_LEN + 4,
|
||||
skb->len - IEEE80211_3ADDR_LEN - 4);
|
||||
if (fc & IEEE80211_FCTL_MOREFRAGS)
|
||||
skb_trim(skb, skb->len - 8); /* 2*ICV */
|
||||
else
|
||||
skb_trim(skb, skb->len - 4); /* ICV */
|
||||
break;
|
||||
case SEC_LEVEL_0:
|
||||
|
Loading…
Reference in New Issue
Block a user