aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2016-03-02 14:56:48 +0000
committerFelix Fietkau <nbd@openwrt.org>2016-03-02 14:56:48 +0000
commit806b68fc7744b61cbca7392532662bfe7b3f3f6e (patch)
treec36535ef0ec68e92d9321ea2baa7aecbc49e58b4 /package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch
parentcafc41ab0180afa3cb67c4e58b5bef6efe42ff3c (diff)
downloadupstream-806b68fc7744b61cbca7392532662bfe7b3f3f6e.tar.gz
upstream-806b68fc7744b61cbca7392532662bfe7b3f3f6e.tar.bz2
upstream-806b68fc7744b61cbca7392532662bfe7b3f3f6e.zip
mac80211: add a number of pending fixes
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 48883
Diffstat (limited to 'package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch')
-rw-r--r--package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch b/package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch
new file mode 100644
index 0000000000..d7452c29c1
--- /dev/null
+++ b/package/kernel/mac80211/patches/342-mac80211-do-not-pass-injected-frames-without-a-valid.patch
@@ -0,0 +1,23 @@
+From: Felix Fietkau <nbd@openwrt.org>
+Date: Wed, 2 Mar 2016 15:51:40 +0100
+Subject: [PATCH] mac80211: do not pass injected frames without a valid rate to
+ the driver
+
+Fall back to rate control if the requested bitrate was not found.
+
+Fixes: dfdfc2beb0dd ("mac80211: Parse legacy and HT rate in injected frames")
+Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+---
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -1837,6 +1837,9 @@ static bool ieee80211_parse_tx_radiotap(
+ }
+ }
+
++ if (info->control.rates[0].idx < 0)
++ info->control.flags &= ~IEEE80211_TX_CTRL_RATE_INJECT;
++
+ info->control.rates[0].flags = rate_flags;
+ info->control.rates[0].count = min_t(u8, rate_retries + 1,
+ local->hw.max_rate_tries);