Skip to content

Commit dd1649e

Browse files
Peter Chiunbd168
authored andcommitted
wifi: mt76: mt7915: fix register mapping
Bypass the entry when ofs is equal to dev->reg.map[i].size. Without this patch, it would get incorrect register mapping when the CR address is located at the boundary of an entry. Fixes: cd4c314 ("mt76: mt7915: refine register definition") Signed-off-by: Peter Chiu <[email protected]> Signed-off-by: Shengyu Qu <[email protected]> Link: https://patch.msgid.link/OSZPR01MB843401EAA1DA6BD7AEF356F298132@OSZPR01MB8434.jpnprd01.prod.outlook.com Signed-off-by: Felix Fietkau <[email protected]>
1 parent e48da5c commit dd1649e

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7915

1 file changed

+1
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt7915/mmio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ static u32 __mt7915_reg_addr(struct mt7915_dev *dev, u32 addr)
486486
continue;
487487

488488
ofs = addr - dev->reg.map[i].phys;
489-
if (ofs > dev->reg.map[i].size)
489+
if (ofs >= dev->reg.map[i].size)
490490
continue;
491491

492492
return dev->reg.map[i].maps + ofs;

0 commit comments

Comments
 (0)