diff options
author | David Spinadel <david.spinadel@intel.com> | 2016-11-21 16:58:40 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-01-12 10:15:18 +0100 |
commit | cef0acd4d7d4811d2d19cd0195031bf0dfe41249 (patch) | |
tree | d240324b4bbfb68400c3ea1508c9a5b84746256f /net/mac80211/wpa.c | |
parent | 93be2b74279c15c2844684b1a027fdc71dd5d9bf (diff) | |
download | linux-cef0acd4d7d4811d2d19cd0195031bf0dfe41249.tar.bz2 |
mac80211: Add RX flag to indicate ICV stripped
Add a flag that indicates that the WEP ICV was stripped from an
RX packet, allowing the device to not transfer that if it's
already checked.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/wpa.c')
-rw-r--r-- | net/mac80211/wpa.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c index 8af6dd388d11..c1ef22df865f 100644 --- a/net/mac80211/wpa.c +++ b/net/mac80211/wpa.c @@ -294,7 +294,8 @@ ieee80211_crypto_tkip_decrypt(struct ieee80211_rx_data *rx) return RX_DROP_UNUSABLE; /* Trim ICV */ - skb_trim(skb, skb->len - IEEE80211_TKIP_ICV_LEN); + if (!(status->flag & RX_FLAG_ICV_STRIPPED)) + skb_trim(skb, skb->len - IEEE80211_TKIP_ICV_LEN); /* Remove IV */ memmove(skb->data + IEEE80211_TKIP_IV_LEN, skb->data, hdrlen); |