mt76: mt7921: fix survey-dump reporting
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>
This commit is contained in:
parent
adedbc643f
commit
64ed76d118
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue