mac80211: Add RX flag to indicate ICV stripped
[platform/kernel/linux-exynos.git] / net / mac80211 / wep.c
index efa3f48..73e8f34 100644 (file)
@@ -293,7 +293,8 @@ ieee80211_crypto_wep_decrypt(struct ieee80211_rx_data *rx)
                        return RX_DROP_UNUSABLE;
                ieee80211_wep_remove_iv(rx->local, rx->skb, rx->key);
                /* remove ICV */
-               if (pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN))
+               if (!(status->flag & RX_FLAG_ICV_STRIPPED) &&
+                   pskb_trim(rx->skb, rx->skb->len - IEEE80211_WEP_ICV_LEN))
                        return RX_DROP_UNUSABLE;
        }