提交 3c0efb74 编写于 作者: F Felix Fietkau 提交者: Kalle Valo

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: NStijn Tintel <stijn@linux-ipv6.be>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 ebdd7b49
...@@ -826,9 +826,9 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc, ...@@ -826,9 +826,9 @@ static int ath9k_rx_skb_preprocess(struct ath_softc *sc,
sc->rx.discard_next = false; 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); RX_STAT_INC(rx_len_err);
goto corrupt; goto corrupt;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册