Skip to contentSkip to conversation

mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he()

PATCH Superseded John Crispin 1 participant 2 messages May 23, 2019 802.11 (including cfg80211/NL80211)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he()

The reported rate is not scaled done correctly. After applying this patch, the function will behave just like the v/ht equivalents.

---
 net/wireless/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/util.c +1 -1
index 75899b62bdc9..5a03f38788e7 100644
@@ -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)
Signature · 1 line
2.20.1
#1 lore raw
Quoted 2 lines · John Crispin

The reported rate is not scaled done correctly. After applying this patch, the function will behave just like the v/ht equivalents.

s/done/down/ ... sorry aspell obviously did not catch that one :-)

    John

Quoted 19 lines
---
  net/wireless/util.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/util.c +1 -1
index 75899b62bdc9..5a03f38788e7 100644
@@ -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)