diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-11-21 22:29:48 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2014-11-21 22:29:48 +0000 |
commit | f80596c9df0be69a4a05398ffd2c32a82ebb98f1 (patch) | |
tree | 5004800748270fe57289b687c90c695a43437378 /package/kernel/mac80211/patches/322-mac80211-add-more-missing-checks-for-VHT-tx-rates.patch | |
parent | 6c1c3cac55a575d2d586168cc7109f0ed07ea4a8 (diff) | |
download | master-31e0f0ae-f80596c9df0be69a4a05398ffd2c32a82ebb98f1.tar.gz master-31e0f0ae-f80596c9df0be69a4a05398ffd2c32a82ebb98f1.tar.bz2 master-31e0f0ae-f80596c9df0be69a4a05398ffd2c32a82ebb98f1.zip |
mac80211: fix a crash on using VHT rates
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 43340
Diffstat (limited to 'package/kernel/mac80211/patches/322-mac80211-add-more-missing-checks-for-VHT-tx-rates.patch')
-rw-r--r-- | package/kernel/mac80211/patches/322-mac80211-add-more-missing-checks-for-VHT-tx-rates.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/322-mac80211-add-more-missing-checks-for-VHT-tx-rates.patch b/package/kernel/mac80211/patches/322-mac80211-add-more-missing-checks-for-VHT-tx-rates.patch new file mode 100644 index 0000000000..4d1465cabb --- /dev/null +++ b/package/kernel/mac80211/patches/322-mac80211-add-more-missing-checks-for-VHT-tx-rates.patch @@ -0,0 +1,34 @@ +From: Felix Fietkau <nbd@openwrt.org> +Date: Fri, 21 Nov 2014 23:27:33 +0100 +Subject: [PATCH] mac80211: add more missing checks for VHT tx rates + +Fixes a crash on attempting to calculate the frame duration for a VHT +packet (which needs to be handled by hw/driver instead). + +Reported-by: Jouni Malinen <j@w1.fi> +Signed-off-by: Felix Fietkau <nbd@openwrt.org> +--- + +--- a/net/mac80211/rate.c ++++ b/net/mac80211/rate.c +@@ -446,7 +446,8 @@ static void rate_fixup_ratelist(struct i + * + * XXX: Should this check all retry rates? + */ +- if (!(rates[0].flags & IEEE80211_TX_RC_MCS)) { ++ if (!(rates[0].flags & ++ (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS))) { + u32 basic_rates = vif->bss_conf.basic_rates; + s8 baserate = basic_rates ? ffs(basic_rates) - 1 : 0; + +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -60,7 +60,7 @@ static __le16 ieee80211_duration(struct + rcu_read_unlock(); + + /* assume HW handles this */ +- if (tx->rate.flags & IEEE80211_TX_RC_MCS) ++ if (tx->rate.flags & (IEEE80211_TX_RC_MCS | IEEE80211_TX_RC_VHT_MCS)) + return 0; + + /* uh huh? */ |