aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2005-07-13 12:24:51 -0500
committerJames Ketrenos <jketreno@linux.intel.com>2005-11-07 17:50:14 -0600
commita2d73e60bb018da74ba508943c79c83659f3a883 (patch)
treef657e3b54634c5b05f100ed8df7f47a8f3b2ff39 /drivers/net
parentafbf30a2b78cac38e6ddae10a73063943b4783ee (diff)
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ipw2200.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 1b6f0277a3e..8f7e9ac37f8 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -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;