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.2-rc6~33^2~21^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25d16d124a5e249e947c0487678b61dcff25cf8b;p=thirdparty%2Fkernel%2Flinux.git mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() 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 --- diff --git a/net/wireless/util.c b/net/wireless/util.c index cf63b635afc09..b9d8ceb213277 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1246,7 +1246,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)