On 09/06/2016 12:00 PM, Thomas Pedersen wrote:
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.
If it is actually reporting MCS9, why lie about it? Report it up the stack as a proper value instead of hiding the issue? Thanks, Ben
Signed-off-by: Thomas Pedersen <twp@xxxxxxxxxxxxxxxx> --- 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,
-- Ben Greear <greearb@xxxxxxxxxxxxxxx> Candela Technologies Inc http://www.candelatech.com