Merge branch 'for-next' into for-linus
[linux-2.6-block.git] / net / wireless / util.c
index 1f285b51502866439da976109764fbe4362bee60..39680e7bad45aedebf5e1eef1c62cb2f79c474df 100644 (file)
@@ -1557,10 +1557,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;
 }