xref: /linux/drivers/net/wireless/mediatek/mt76/mt7925/mac.h (revision 6e7fd890f1d6ac83805409e9c346240de2705584)
1 /* SPDX-License-Identifier: ISC */
2 /* Copyright (C) 2023 MediaTek Inc. */
3 
4 #ifndef __MT7925_MAC_H
5 #define __MT7925_MAC_H
6 
7 #include "../mt76_connac3_mac.h"
8 
9 #define MT_WTBL_TXRX_CAP_RATE_OFFSET	7
10 #define MT_WTBL_TXRX_RATE_G2_HE		24
11 #define MT_WTBL_TXRX_RATE_G2		12
12 
13 #define MT_WTBL_AC0_CTT_OFFSET		20
14 
15 static inline u32 mt7925_mac_wtbl_lmac_addr(struct mt792x_dev *dev, u16 wcid, u8 dw)
16 {
17 	mt76_wr(dev, MT_WTBLON_TOP_WDUCR,
18 		FIELD_PREP(MT_WTBLON_TOP_WDUCR_GROUP, (wcid >> 7)));
19 
20 	return MT_WTBL_LMAC_OFFS(wcid, dw);
21 }
22 
23 #endif
24