wifi: mt76: connac: fix stats->tx_bytes calculation
[ Upstream commit c7ab7a29ef5c0779574120d922256ce4651555d3 ]
The stats->tx_bytes shall subtract retry byte from tx byte.
Fixes: 43eaa36895
("wifi: mt76: add PPDU based TxS support for WED device")
Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/b3cd45596943cf5a06b2e08e2fe732ab0b51311b.1682285873.git.ryder.lee@mediatek.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
ee1a221d94
commit
a16bf8f9c8
@ -163,7 +163,7 @@ enum {
|
||||
#define MT_TXS5_MPDU_TX_CNT GENMASK(31, 23)
|
||||
|
||||
#define MT_TXS6_MPDU_FAIL_CNT GENMASK(31, 23)
|
||||
|
||||
#define MT_TXS7_MPDU_RETRY_BYTE GENMASK(22, 0)
|
||||
#define MT_TXS7_MPDU_RETRY_CNT GENMASK(31, 23)
|
||||
|
||||
/* RXD DW1 */
|
||||
|
@ -570,7 +570,8 @@ bool mt76_connac2_mac_fill_txs(struct mt76_dev *dev, struct mt76_wcid *wcid,
|
||||
/* PPDU based reporting */
|
||||
if (FIELD_GET(MT_TXS0_TXS_FORMAT, txs) > 1) {
|
||||
stats->tx_bytes +=
|
||||
le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE);
|
||||
le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_BYTE) -
|
||||
le32_get_bits(txs_data[7], MT_TXS7_MPDU_RETRY_BYTE);
|
||||
stats->tx_packets +=
|
||||
le32_get_bits(txs_data[5], MT_TXS5_MPDU_TX_CNT);
|
||||
stats->tx_failed +=
|
||||
|
Loading…
Reference in New Issue
Block a user