summaryrefslogtreecommitdiff
path: root/package/kernel/mac80211/patches/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.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/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.patch
parentcafc41ab0180afa3cb67c4e58b5bef6efe42ff3c (diff)
downloadmtk-20170518-806b68fc7744b61cbca7392532662bfe7b3f3f6e.zip
mtk-20170518-806b68fc7744b61cbca7392532662bfe7b3f3f6e.tar.gz
mtk-20170518-806b68fc7744b61cbca7392532662bfe7b3f3f6e.tar.bz2
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/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.patch')
-rw-r--r--package/kernel/mac80211/patches/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.patch b/package/kernel/mac80211/patches/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.patch
new file mode 100644
index 0000000..de1b386
--- /dev/null
+++ b/package/kernel/mac80211/patches/340-mac80211-fix-parsing-of-40Mhz-in-injected-radiotap-h.patch
@@ -0,0 +1,36 @@
+From: Sven Eckelmann <sven@narfation.org>
+Date: Wed, 24 Feb 2016 16:25:49 +0100
+Subject: [PATCH] mac80211: fix parsing of 40Mhz in injected radiotap
+ header
+
+The MCS bandwidth part of the radiotap header is 2 bits wide. The full 2
+bit have to compared against IEEE80211_RADIOTAP_MCS_BW_40 and not only if
+the first bit is set. Otherwise IEEE80211_RADIOTAP_MCS_BW_40 can be
+confused with IEEE80211_RADIOTAP_MCS_BW_20U.
+
+Fixes: 5ec3aed9ba4c ("mac80211: Parse legacy and HT rate in injected frames")
+Signed-off-by: Sven Eckelmann <sven@narfation.org>
+---
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -1689,7 +1689,7 @@ static bool ieee80211_parse_tx_radiotap(
+ bool rate_found = false;
+ u8 rate_retries = 0;
+ u16 rate_flags = 0;
+- u8 mcs_known, mcs_flags;
++ u8 mcs_known, mcs_flags, mcs_bw;
+ int i;
+
+ info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
+@@ -1765,8 +1765,9 @@ static bool ieee80211_parse_tx_radiotap(
+ mcs_flags & IEEE80211_RADIOTAP_MCS_SGI)
+ rate_flags |= IEEE80211_TX_RC_SHORT_GI;
+
++ mcs_bw = mcs_flags & IEEE80211_RADIOTAP_MCS_BW_MASK;
+ if (mcs_known & IEEE80211_RADIOTAP_MCS_HAVE_BW &&
+- mcs_flags & IEEE80211_RADIOTAP_MCS_BW_40)
++ mcs_bw == IEEE80211_RADIOTAP_MCS_BW_40)
+ rate_flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
+ break;
+