aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index a7c773ebfe2f..e61a6c0dd0ff 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -543,12 +543,28 @@ mwifiex_dump_station_info(struct mwifiex_private *priv,
543 ret = -EFAULT; 543 ret = -EFAULT;
544 } 544 }
545 545
546 /*
547 * Bit 0 in tx_htinfo indicates that current Tx rate is 11n rate. Valid
548 * MCS index values for us are 0 to 7.
549 */
550 if ((priv->tx_htinfo & BIT(0)) && (priv->tx_rate < 8)) {
551 sinfo->txrate.mcs = priv->tx_rate;
552 sinfo->txrate.flags |= RATE_INFO_FLAGS_MCS;
553 /* 40MHz rate */
554 if (priv->tx_htinfo & BIT(1))
555 sinfo->txrate.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH;
556 /* SGI enabled */
557 if (priv->tx_htinfo & BIT(2))
558 sinfo->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI;
559 }
560
546 sinfo->rx_bytes = priv->stats.rx_bytes; 561 sinfo->rx_bytes = priv->stats.rx_bytes;
547 sinfo->tx_bytes = priv->stats.tx_bytes; 562 sinfo->tx_bytes = priv->stats.tx_bytes;
548 sinfo->rx_packets = priv->stats.rx_packets; 563 sinfo->rx_packets = priv->stats.rx_packets;
549 sinfo->tx_packets = priv->stats.tx_packets; 564 sinfo->tx_packets = priv->stats.tx_packets;
550 sinfo->signal = priv->qual_level; 565 sinfo->signal = priv->qual_level;
551 sinfo->txrate.legacy = rate.rate; 566 /* bit rate is in 500 kb/s units. Convert it to 100kb/s units */
567 sinfo->txrate.legacy = rate.rate * 5;
552 568
553 return ret; 569 return ret;
554} 570}