diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-01-22 07:00:16 +0100 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-25 06:30:49 +0100 |
commit | 3c0efb745a172bfe96459e20cbd37b0c945d5f8d (patch) | |
tree | 24c4444ab57333e7e93bb782d24716afd1a5f254 /drivers/net | |
parent | Merge branch 'mlxsw-Add-support-for-mirror-action-with-flower' (diff) | |
download | linux-3c0efb745a172bfe96459e20cbd37b0c945d5f8d.tar.xz linux-3c0efb745a172bfe96459e20cbd37b0c945d5f8d.zip |
ath9k: discard undersized packets
Sometimes the hardware will push small packets that trigger a WARN_ON
in mac80211. Discard them early to avoid this issue.
Reported-by: Stijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 2197aee2bb72..a8ac42c96d71 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c @@ -826,9 +826,9 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, sc->rx.discard_next = false; /* - * Discard zero-length packets. + * Discard zero-length packets and packets smaller than an ACK */ - if (!rx_stats->rs_datalen) { + if (rx_stats->rs_datalen < 10) { RX_STAT_INC(rx_len_err); goto corrupt; } |