diff options
Diffstat (limited to 'net/mac80211/ieee80211.c')
-rw-r--r-- | net/mac80211/ieee80211.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 50d7af3018ea..5d5034f36fde 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -890,7 +890,7 @@ static void ieee80211_remove_tx_extra(struct ieee80211_local *local, | |||
890 | if (!key) | 890 | if (!key) |
891 | goto no_key; | 891 | goto no_key; |
892 | 892 | ||
893 | switch (key->alg) { | 893 | switch (key->conf.alg) { |
894 | case ALG_WEP: | 894 | case ALG_WEP: |
895 | iv_len = WEP_IV_LEN; | 895 | iv_len = WEP_IV_LEN; |
896 | mic_len = WEP_ICV_LEN; | 896 | mic_len = WEP_ICV_LEN; |
@@ -907,7 +907,8 @@ static void ieee80211_remove_tx_extra(struct ieee80211_local *local, | |||
907 | goto no_key; | 907 | goto no_key; |
908 | } | 908 | } |
909 | 909 | ||
910 | if (skb->len >= mic_len && key->force_sw_encrypt) | 910 | if (skb->len >= mic_len && |
911 | (key->conf.flags & IEEE80211_KEY_FORCE_SW_ENCRYPT)) | ||
911 | skb_trim(skb, skb->len - mic_len); | 912 | skb_trim(skb, skb->len - mic_len); |
912 | if (skb->len >= iv_len && skb->len > hdrlen) { | 913 | if (skb->len >= iv_len && skb->len > hdrlen) { |
913 | memmove(skb->data + iv_len, skb->data, hdrlen); | 914 | memmove(skb->data + iv_len, skb->data, hdrlen); |