From: Felix Fietkau Date: Wed, 2 Mar 2016 14:54:51 +0000 (+0100) Subject: mac80211: do not pass injected frames without a valid rate to the driver X-Git-Tag: v4.7-rc1~154^2~326^2~36 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07310a63147164eaf44a68932fbe9dbbde0fa82b;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Johannes Berg --- diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 51e225e..597c8fe 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, } } + 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);