1
0
Fork 0

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: dfdfc2beb0 ("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>
hifive-unleashed-5.1
Felix Fietkau 2016-03-02 15:54:51 +01:00 committed by Johannes Berg
parent f66b60f652
commit 07310a6314
1 changed files with 3 additions and 0 deletions

View File

@ -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);