diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-03-02 09:54:51 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2016-04-05 04:58:21 -0400 |
commit | 07310a63147164eaf44a68932fbe9dbbde0fa82b (patch) | |
tree | 26454bca9e77f0d39a4a63b8da58d1de5ca68f71 /net/mac80211 | |
parent | f66b60f6524c970d43af7a68dd50dcce289887e7 (diff) |
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>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 51e225e4b450..597c8fe672a3 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1839,6 +1839,9 @@ static bool ieee80211_parse_tx_radiotap(struct ieee80211_local *local, | |||
1839 | } | 1839 | } |
1840 | } | 1840 | } |
1841 | 1841 | ||
1842 | if (info->control.rates[0].idx < 0) | ||
1843 | info->control.flags &= ~IEEE80211_TX_CTRL_RATE_INJECT; | ||
1844 | |||
1842 | info->control.rates[0].flags = rate_flags; | 1845 | info->control.rates[0].flags = rate_flags; |
1843 | info->control.rates[0].count = min_t(u8, rate_retries + 1, | 1846 | info->control.rates[0].count = min_t(u8, rate_retries + 1, |
1844 | local->hw.max_rate_tries); | 1847 | local->hw.max_rate_tries); |