Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he()
@ 2019-05-23  8:03 John Crispin
  2019-05-23  8:27 ` John Crispin
  0 siblings, 1 reply; 2+ messages in thread
From: John Crispin @ 2019-05-23  8:03 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, John Crispin, Shashidhar Lakkavalli

The reported rate is not scaled done 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>
---
 net/wireless/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 75899b62bdc9..5a03f38788e7 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)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he()
  2019-05-23  8:03 [PATCH] mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() John Crispin
@ 2019-05-23  8:27 ` John Crispin
  0 siblings, 0 replies; 2+ messages in thread
From: John Crispin @ 2019-05-23  8:27 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Shashidhar Lakkavalli


On 23/05/2019 10:03, John Crispin wrote:
> 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



> Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
> Signed-off-by: John Crispin <john@phrozen.org>
> ---
>   net/wireless/util.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/wireless/util.c b/net/wireless/util.c
> index 75899b62bdc9..5a03f38788e7 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-23  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-23  8:03 [PATCH] mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() John Crispin
2019-05-23  8:27 ` John Crispin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox