]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mwifiex: correction in mcs index check
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 12 Jul 2012 01:12:57 +0000 (18:12 -0700)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 2 Aug 2012 13:37:47 +0000 (14:37 +0100)
commit fe020120cb863ba918c6d603345342a880272c4d upstream.

mwifiex driver supports 2x2 chips as well. Hence valid mcs values
are 0 to 15. The check for mcs index is corrected in this patch.

For example: if 40MHz is enabled and mcs index is 11, "iw link"
command would show "tx bitrate: 108.0 MBit/s" without this patch.
Now it shows "tx bitrate: 108.0 MBit/s MCS 11 40Mhz" with the patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/net/wireless/mwifiex/cfg80211.c

index 01dcb1a7db4f5808ead97ce2d06717c4b3cd4e03..727c12966d1d9c24aaf7fce043560f67556a6916 100644 (file)
@@ -545,9 +545,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv,
 
        /*
         * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid
-        * MCS index values for us are 0 to 7.
+        * MCS index values for us are 0 to 15.
         */
-       if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 8)) {
+       if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 16)) {
                sinfo->txrate.mcs = priv->tx_rate;
                sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
                /* 40MHz rate */