提交 fa67120b 编写于 作者: E Evelyn Tsai 提交者: Felix Fietkau

wifi: mt76: connac: update nss calculation in txs

The hardware reports the number of transmitting antennas not the actual
number of spatial streams
Co-developed-by: NPeter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: NPeter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: NEvelyn Tsai <evelyn.tsai@mediatek.com>
Signed-off-by: NFelix Fietkau <nbd@nbd.name>
上级 510ef226
...@@ -567,7 +567,7 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid, ...@@ -567,7 +567,7 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
struct mt76_phy *mphy; struct mt76_phy *mphy;
struct rate_info rate = {}; struct rate_info rate = {};
bool cck = false; bool cck = false;
u32 txrate, txs, mode; u32 txrate, txs, mode, stbc;
txs = le32_to_cpu(txs_data[0]); txs = le32_to_cpu(txs_data[0]);
...@@ -587,6 +587,10 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid, ...@@ -587,6 +587,10 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
rate.mcs = FIELD_GET(MT_TX_RATE_IDX, txrate); rate.mcs = FIELD_GET(MT_TX_RATE_IDX, txrate);
rate.nss = FIELD_GET(MT_TX_RATE_NSS, txrate) + 1; rate.nss = FIELD_GET(MT_TX_RATE_NSS, txrate) + 1;
stbc = FIELD_GET(MT_TX_RATE_STBC, txrate);
if (stbc && rate.nss > 1)
rate.nss >>= 1;
if (rate.nss - 1 < ARRAY_SIZE(stats->tx_nss)) if (rate.nss - 1 < ARRAY_SIZE(stats->tx_nss))
stats->tx_nss[rate.nss - 1]++; stats->tx_nss[rate.nss - 1]++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册