wifi: mt76: mt7915: fix register mapping
authorPeter Chiu <chui-hao.chiu@mediatek.com>
Thu, 9 Jan 2025 11:04:35 +0000 (19:04 +0800)
committerFelix Fietkau <nbd@nbd.name>
Tue, 14 Jan 2025 12:42:29 +0000 (13:42 +0100)
commitdd1649ef966bb87053c17385ea2cfd1758f5385b
tree3270263883c0da36d76430923b3f3ef94339cc2e
parente48da5c9ca293d775a1dd35fe26d44418dbc6715
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: cd4c314a65d3 ("mt76: mt7915: refine register definition")
Signed-off-by: Peter Chiu <chui-hao.chiu@mediatek.com>
Signed-off-by: Shengyu Qu <wiagn233@outlook.com>
Link: https://patch.msgid.link/OSZPR01MB843401EAA1DA6BD7AEF356F298132@OSZPR01MB8434.jpnprd01.prod.outlook.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c