All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfg80211: cap 20MHz VHT bitrate at MCS 8
@ 2016-09-06 19:00 Thomas Pedersen
  2016-09-06 19:07 ` Ben Greear
  0 siblings, 1 reply; 14+ messages in thread
From: Thomas Pedersen @ 2016-09-06 19:00 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Thomas Pedersen

Some drivers (ath10k) report MCS 9 @ 20MHz, which
technically isn't allowed. To get more meaningful value
than 0 out of this however, just cap the bitrate for 20MHz
to MCS 8.

Signed-off-by: Thomas Pedersen <twp@qca.qualcomm.com>
---
 net/wireless/util.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 0675f51..5fb0249 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1157,7 +1157,9 @@ static u32 cfg80211_calculate_bitrate_vht(struct rate_info *rate)
 		   58500000,
 		   65000000,
 		   78000000,
-		   0,
+		   /* some drivers report MCS 9 for 20MHz anyway. Clip to MCS 8
+		    * bitrate as it's closer than 0 */
+		   78000000,
 		},
 		{  13500000,
 		   27000000,
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-10-13 12:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 19:00 [PATCH] cfg80211: cap 20MHz VHT bitrate at MCS 8 Thomas Pedersen
2016-09-06 19:07 ` Ben Greear
2016-09-07 18:20   ` Pedersen, Thomas
2016-09-12  6:43     ` Johannes Berg
2016-09-12 16:36       ` Ben Greear
2016-09-13 17:57       ` Pedersen, Thomas
2016-09-13 18:02         ` Johannes Berg
2016-09-16 18:31           ` Pedersen, Thomas
2016-09-19  9:00             ` Johannes Berg
2016-09-19  9:31               ` Arend Van Spriel
2016-09-19 16:19               ` Ben Greear
2016-10-04  9:32                 ` Johannes Berg
2016-10-04 16:31                   ` Ben Greear
2016-10-13 12:52                     ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.