mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
mt76: mt7921: fix survey-dump reporting
[ Upstream commit64ed76d118] Fix MIB tx-rx MIB counters for survey-dump reporting. Fixes:163f4d22c1("mt76: mt7921: add MAC support") Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a7afd7a5e6
commit
9fcee803e2
@@ -106,6 +106,10 @@ mt7921_mac_init_band(struct mt7921_dev *dev, u8 band)
|
||||
mt76_set(dev, MT_WF_RMAC_MIB_TIME0(band), MT_WF_RMAC_MIB_RXTIME_EN);
|
||||
mt76_set(dev, MT_WF_RMAC_MIB_AIRTIME0(band), MT_WF_RMAC_MIB_RXTIME_EN);
|
||||
|
||||
/* enable MIB tx-rx time reporting */
|
||||
mt76_set(dev, MT_MIB_SCR1(band), MT_MIB_TXDUR_EN);
|
||||
mt76_set(dev, MT_MIB_SCR1(band), MT_MIB_RXDUR_EN);
|
||||
|
||||
mt76_rmw_field(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_MAX_RX_LEN, 1536);
|
||||
/* disable rx rate report by default due to hw issues */
|
||||
mt76_clear(dev, MT_DMA_DCR0(band), MT_DMA_DCR0_RXD_G5_EN);
|
||||
|
||||
@@ -96,6 +96,10 @@
|
||||
#define MT_WF_MIB_BASE(_band) ((_band) ? 0xa4800 : 0x24800)
|
||||
#define MT_WF_MIB(_band, ofs) (MT_WF_MIB_BASE(_band) + (ofs))
|
||||
|
||||
#define MT_MIB_SCR1(_band) MT_WF_MIB(_band, 0x004)
|
||||
#define MT_MIB_TXDUR_EN BIT(8)
|
||||
#define MT_MIB_RXDUR_EN BIT(9)
|
||||
|
||||
#define MT_MIB_SDR3(_band) MT_WF_MIB(_band, 0x698)
|
||||
#define MT_MIB_SDR3_FCS_ERR_MASK GENMASK(31, 16)
|
||||
|
||||
@@ -108,9 +112,9 @@
|
||||
#define MT_MIB_SDR34(_band) MT_WF_MIB(_band, 0x090)
|
||||
#define MT_MIB_MU_BF_TX_CNT GENMASK(15, 0)
|
||||
|
||||
#define MT_MIB_SDR36(_band) MT_WF_MIB(_band, 0x098)
|
||||
#define MT_MIB_SDR36(_band) MT_WF_MIB(_band, 0x054)
|
||||
#define MT_MIB_SDR36_TXTIME_MASK GENMASK(23, 0)
|
||||
#define MT_MIB_SDR37(_band) MT_WF_MIB(_band, 0x09c)
|
||||
#define MT_MIB_SDR37(_band) MT_WF_MIB(_band, 0x058)
|
||||
#define MT_MIB_SDR37_RXTIME_MASK GENMASK(23, 0)
|
||||
|
||||
#define MT_MIB_DR8(_band) MT_WF_MIB(_band, 0x0c0)
|
||||
|
||||
Reference in New Issue
Block a user