From: John Crispin Date: Thu, 23 May 2019 08:27:24 +0000 (+0200) Subject: mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() X-Git-Tag: v5.1.18~124 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=234d92fc85367f5655334711bba4546a2cfcb9ed;p=thirdparty%2Fkernel%2Fstable.git mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() [ Upstream commit 25d16d124a5e249e947c0487678b61dcff25cf8b ] The reported rate is not scaled down correctly. After applying this patch, the function will behave just like the v/ht equivalents. Signed-off-by: Shashidhar Lakkavalli Signed-off-by: John Crispin Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- diff --git a/net/wireless/util.c b/net/wireless/util.c index 75899b62bdc9e..5a03f38788e75 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1237,7 +1237,7 @@ static u32 cfg80211_calculate_bitrate_he(struct rate_info *rate) if (rate->he_dcm) result /= 2; - return result; + return result / 10000; } u32 cfg80211_calculate_bitrate(struct rate_info *rate)