diff options
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index f42d5060a7bb..a33f865807f9 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -820,7 +820,7 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx) | |||
820 | { | 820 | { |
821 | struct sk_buff *skb = rx->skb; | 821 | struct sk_buff *skb = rx->skb; |
822 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | 822 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |
823 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; | 823 | struct ieee80211_hdr *hdr; |
824 | int keyidx; | 824 | int keyidx; |
825 | int hdrlen; | 825 | int hdrlen; |
826 | ieee80211_rx_result result = RX_DROP_UNUSABLE; | 826 | ieee80211_rx_result result = RX_DROP_UNUSABLE; |
@@ -861,6 +861,11 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx) | |||
861 | if (!(rx->flags & IEEE80211_RX_RA_MATCH)) | 861 | if (!(rx->flags & IEEE80211_RX_RA_MATCH)) |
862 | return RX_CONTINUE; | 862 | return RX_CONTINUE; |
863 | 863 | ||
864 | if (skb_linearize(rx->skb)) | ||
865 | return RX_DROP_UNUSABLE; | ||
866 | |||
867 | hdr = (struct ieee80211_hdr *)skb->data; | ||
868 | |||
864 | /* start without a key */ | 869 | /* start without a key */ |
865 | rx->key = NULL; | 870 | rx->key = NULL; |
866 | 871 | ||
@@ -944,9 +949,6 @@ ieee80211_rx_h_decrypt(struct ieee80211_rx_data *rx) | |||
944 | return RX_DROP_MONITOR; | 949 | return RX_DROP_MONITOR; |
945 | } | 950 | } |
946 | 951 | ||
947 | if (skb_linearize(rx->skb)) | ||
948 | return RX_DROP_UNUSABLE; | ||
949 | |||
950 | /* Check for weak IVs if possible */ | 952 | /* Check for weak IVs if possible */ |
951 | if (rx->sta && rx->key->conf.alg == ALG_WEP && | 953 | if (rx->sta && rx->key->conf.alg == ALG_WEP && |
952 | ieee80211_is_data(hdr->frame_control) && | 954 | ieee80211_is_data(hdr->frame_control) && |