aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-01-17 12:32:22 +0100
committerFelix Fietkau <nbd@nbd.name>2018-01-17 12:32:48 +0100
commite2c0e904c0e31f746d1e7b01f538b486f7ab510a (patch)
tree89586d157efd32d4bc085de856af5ac1aadf5543 /package/kernel/mac80211/patches
parentbdc412941aea6d9b1ff3f82b9541055dab77fb93 (diff)
downloadupstream-e2c0e904c0e31f746d1e7b01f538b486f7ab510a.tar.gz
upstream-e2c0e904c0e31f746d1e7b01f538b486f7ab510a.tar.bz2
upstream-e2c0e904c0e31f746d1e7b01f538b486f7ab510a.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>
Diffstat (limited to 'package/kernel/mac80211/patches')
-rw-r--r--package/kernel/mac80211/patches/322-ath9k-discard-undersized-packets.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/322-ath9k-discard-undersized-packets.patch b/package/kernel/mac80211/patches/322-ath9k-discard-undersized-packets.patch
new file mode 100644
index 0000000000..b2b2fcf4aa
--- /dev/null
+++ b/package/kernel/mac80211/patches/322-ath9k-discard-undersized-packets.patch
@@ -0,0 +1,25 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Wed, 17 Jan 2018 11:11:17 +0100
+Subject: [PATCH] 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>
+---
+
+--- 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(struc
+ 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;
+ }