openwrtv4/package/kernel/mac80211/patches/302-mac80211-trivial-fix-typo-in-starting-baserate-for-r.patch

21 lines
699 B
Diff
Raw Normal View History

From: Karl Beldan <karl.beldan@rivierawaves.com>
Date: Tue, 7 Oct 2014 15:53:38 +0200
Subject: [PATCH] mac80211/trivial: fix typo in starting baserate for
rts_cts_rate_idx
Fixes: 5253ffb8 ("mac80211: always pick a basic rate to tx RTS/CTS for pre-HT rates")
Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
---
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -448,7 +448,7 @@ static void rate_fixup_ratelist(struct i
*/
if (!(rates[0].flags & IEEE80211_TX_RC_MCS)) {
u32 basic_rates = vif->bss_conf.basic_rates;
- s8 baserate = basic_rates ? ffs(basic_rates - 1) : 0;
+ s8 baserate = basic_rates ? ffs(basic_rates) - 1 : 0;
rate = &sband->bitrates[rates[0].idx];