linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: discard undersized packets
@ 2018-01-17 10:14 Felix Fietkau
  2018-01-25  5:31 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Felix Fietkau @ 2018-01-17 10:14 UTC (permalink / raw)
  To: linux-wireless; +Cc: kvalo, stijn

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>
---
 drivers/net/wireless/ath/ath9k/recv.c | 4 ++--
 1 file 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;
 	}
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: ath9k: discard undersized packets
  2018-01-17 10:14 [PATCH] ath9k: discard undersized packets Felix Fietkau
@ 2018-01-25  5:31 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2018-01-25  5:31 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, stijn

Felix Fietkau <nbd@nbd.name> wrote:

> 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>

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

3c0efb745a17 ath9k: discard undersized packets

-- 
https://patchwork.kernel.org/patch/10168963/

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-25  5:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-17 10:14 [PATCH] ath9k: discard undersized packets Felix Fietkau
2018-01-25  5:31 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).