提交 a2d73e60 编写于 作者: Z Zhu Yi 提交者: James Ketrenos

Fix hardware encryption (both WEP and AES) doesn't work with fragmentation.

Firmware sends received packets with double sized ICV/MIC.
Signed-off-by: NJames Ketrenos <jketreno@linux.intel.com>
上级 afbf30a2
......@@ -7587,7 +7587,10 @@ 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);
skb_trim(skb, skb->len - 8); /* MIC */
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:
break;
......@@ -7596,7 +7599,10 @@ 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);
skb_trim(skb, skb->len - 4); /* ICV */
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:
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册