Commit 91953dc5 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Ben Hutchings

mwifiex: correction in mcs index check

commit fe020120 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: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 216fce53
...@@ -545,9 +545,9 @@ mwifiex_dump_station_info(struct mwifiex_private *priv, ...@@ -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 * 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.mcs = priv->tx_rate;
sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS; sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
/* 40MHz rate */ /* 40MHz rate */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment