summaryrefslogtreecommitdiffstats
path: root/net/wireless/util.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2022-11-11 02:43:53 +0100
committerJakub Kicinski <kuba@kernel.org>2022-11-11 02:43:53 +0100
commit966a9b49033b472dcfb453abdc34bca7df17adce (patch)
treec47919dd0be3db0d04bb272e39eee209de355eac /net/wireless/util.c
parentgenetlink: fix single op policy dump when do is present (diff)
parentMerge tag 'net-6.1-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/netd... (diff)
downloadlinux-966a9b49033b472dcfb453abdc34bca7df17adce.tar.xz
linux-966a9b49033b472dcfb453abdc34bca7df17adce.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/can/pch_can.c ae64438be192 ("can: dev: fix skb drop check") 1dd1b521be85 ("can: remove obsolete PCH CAN driver") https://lore.kernel.org/all/20221110102509.1f7d63cc@canb.auug.org.au/ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/wireless/util.c')
-rw-r--r--net/wireless/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index eb277105a878..8f403f9fe816 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -1559,10 +1559,12 @@ static u32 cfg80211_calculate_bitrate_eht(struct rate_info *rate)
tmp = result;
tmp *= SCALE;
do_div(tmp, mcs_divisors[rate->mcs]);
- result = tmp;
/* and take NSS */
- result = (result * rate->nss) / 8;
+ tmp *= rate->nss;
+ do_div(tmp, 8);
+
+ result = tmp;
return result / 10000;
}