Skip to contentSkip to conversation

ath9k: discard undersized packets

PATCH In review Felix Fietkau 2 participants 2 messages Jan 17, 2018 – Jan 25, 2018 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/wireless/ath/ath9k/recv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath9k/recv.c +2 -2
index 2197aee2bb72..a8ac42c96d71 100644
@@ -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;
 	}
Signature · 1 line
2.14.2
#1 lore raw
Quoted 6 lines · Felix Fietkau

Sometimes the hardware will push small packets that trigger a WARN_ON in mac80211. Discard them early to avoid this issue.

Patch applied to ath-next branch of ath.git, thanks.

3c0efb745a17 ath9k: discard undersized packets

Signature · 3 lines
https://patchwork.kernel.org/patch/10168963/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches