diff options
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/pci.c b/drivers/net/wireless/realtek/rtlwifi/pci.c index 6087ec7a90a6..f88d26535978 100644 --- a/drivers/net/wireless/realtek/rtlwifi/pci.c +++ b/drivers/net/wireless/realtek/rtlwifi/pci.c | |||
@@ -822,7 +822,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
822 | hdr = rtl_get_hdr(skb); | 822 | hdr = rtl_get_hdr(skb); |
823 | fc = rtl_get_fc(skb); | 823 | fc = rtl_get_fc(skb); |
824 | 824 | ||
825 | if (!stats.crc && !stats.hwerror) { | 825 | if (!stats.crc && !stats.hwerror && (skb->len > FCS_LEN)) { |
826 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, | 826 | memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, |
827 | sizeof(rx_status)); | 827 | sizeof(rx_status)); |
828 | 828 | ||
@@ -859,6 +859,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw) | |||
859 | _rtl_pci_rx_to_mac80211(hw, skb, rx_status); | 859 | _rtl_pci_rx_to_mac80211(hw, skb, rx_status); |
860 | } | 860 | } |
861 | } else { | 861 | } else { |
862 | /* drop packets with errors or those too short */ | ||
862 | dev_kfree_skb_any(skb); | 863 | dev_kfree_skb_any(skb); |
863 | } | 864 | } |
864 | new_trx_end: | 865 | new_trx_end: |