Skip to content

Commit

Permalink
Fix hardware encryption (both WEP and AES) doesn't work with fragment…
Browse files Browse the repository at this point in the history
…ation.

Firmware sends received packets with double sized ICV/MIC.

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
  • Loading branch information
Zhu Yi authored and James Ketrenos committed Nov 7, 2005
1 parent afbf30a commit a2d73e6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions drivers/net/wireless/ipw2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit a2d73e6

Please sign in to comment.