mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: fix wtbl3/4 offsets
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
+12
-6
@@ -106,12 +106,18 @@ void mt7603_wtbl_init(struct mt7603_dev *dev, int idx, const u8 *mac_addr)
|
||||
|
||||
void mt7603_wtbl_clear(struct mt7603_dev *dev, int idx)
|
||||
{
|
||||
int wtbl2_frame = (idx * MT_WTBL2_SIZE) / MT_PSE_PAGE_SIZE;
|
||||
int wtbl2_entry = (idx * MT_WTBL2_SIZE) % MT_PSE_PAGE_SIZE;
|
||||
int wtbl3_frame = (idx * MT_WTBL3_SIZE) / MT_PSE_PAGE_SIZE;
|
||||
int wtbl3_entry = ((idx * MT_WTBL3_SIZE) % MT_PSE_PAGE_SIZE) * 2;
|
||||
int wtbl4_frame = (idx * MT_WTBL4_SIZE) / MT_PSE_PAGE_SIZE;
|
||||
int wtbl4_entry = (idx * MT_WTBL4_SIZE) % MT_PSE_PAGE_SIZE;
|
||||
int wtbl2_offset = idx * MT_WTBL2_SIZE;
|
||||
int wtbl2_frame = wtbl2_offset / MT_PSE_PAGE_SIZE;
|
||||
int wtbl2_entry = wtbl2_offset % MT_PSE_PAGE_SIZE;
|
||||
|
||||
int wtbl3_offset = idx * MT_WTBL3_SIZE + MT_WTBL3_OFFSET;
|
||||
int wtbl3_frame = wtbl3_offset / MT_PSE_PAGE_SIZE;
|
||||
int wtbl3_entry = (wtbl3_offset % MT_PSE_PAGE_SIZE) * 2;
|
||||
|
||||
int wtbl4_offset = idx * MT_WTBL4_SIZE + MT_WTBL4_OFFSET;
|
||||
int wtbl4_frame = wtbl4_offset / MT_PSE_PAGE_SIZE;
|
||||
int wtbl4_entry = wtbl4_offset % MT_PSE_PAGE_SIZE;
|
||||
|
||||
u32 addr = MT_WTBL1_BASE + idx * MT_WTBL1_SIZE;
|
||||
int i;
|
||||
|
||||
|
||||
@@ -349,7 +349,10 @@
|
||||
|
||||
#define MT_WTBL1_SIZE (8 * 4)
|
||||
#define MT_WTBL2_SIZE (16 * 4)
|
||||
#define MT_WTBL3_OFFSET (MT7603_WTBL_SIZE * MT_WTBL2_SIZE)
|
||||
#define MT_WTBL3_SIZE (16 * 4)
|
||||
#define MT_WTBL4_OFFSET (MT7603_WTBL_SIZE * MT_WTBL3_SIZE + \
|
||||
MT_WTBL3_OFFSET)
|
||||
#define MT_WTBL4_SIZE (8 * 4)
|
||||
|
||||
#define MT_WTBL1_W0_ADDR_HI GENMASK(15, 0)
|
||||
|
||||
Reference in New Issue
Block a user