]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he()
authorJohn Crispin <john@phrozen.org>
Thu, 23 May 2019 08:27:24 +0000 (10:27 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 24 May 2019 09:26:44 +0000 (11:26 +0200)
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 <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c

index cf63b635afc098eeafe7462bd41b86a7e433b85c..b9d8ceb21327729889cc19f2fc4b8e0c3ff60865 100644 (file)
@@ -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)