Message ID | 20190523080332.29173-1-john@phrozen.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Johannes Berg |
Headers | show |
Series | mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() | expand |
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)
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)