[<prev] [next>] [day] [month] [year] [list]
Message-ID:
<OSZPR01MB843401EAA1DA6BD7AEF356F298132@OSZPR01MB8434.jpnprd01.prod.outlook.com>
Date: Thu, 9 Jan 2025 19:04:35 +0800
From: Shengyu Qu <wiagn233@...look.com>
To: nbd@....name,
lorenzo@...nel.org,
ryder.lee@...iatek.com,
shayne.chen@...iatek.com,
sean.wang@...iatek.com,
kvalo@...nel.org,
matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com,
chui-hao.chiu@...iatek.com,
leitao@...ian.org,
chad@...roe.io,
Bo.Jiao@...iatek.com,
sujuan.chen@...iatek.com,
StanleyYP.Wang@...iatek.com,
evelyn.tsai@...iatek.com,
meichia.chiu@...iatek.com,
Money.Wang@...iatek.com,
linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Cc: Shengyu Qu <wiagn233@...look.com>
Subject: [PATCH v1 1/2] 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.
SDK patch: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/3627eb7e975959ed944e333e383e92f01ac5cdb9/autobuild/autobuild_5.4_mac80211_release/package/kernel/mt76/patches/0026-wifi-mt76-mt7915-fix-register-mapping.patch
Fixes: cd4c314a65d3 ("mt76: mt7915: refine register definition")
Signed-off-by: Peter Chiu <chui-hao.chiu@...iatek.com>
Signed-off-by: Shengyu Qu <wiagn233@...look.com>
---
drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
index 530182e20ce2..876f0692850a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
@@ -486,7 +486,7 @@ static u32 __mt7915_reg_addr(struct mt7915_dev *dev, u32 addr)
continue;
ofs = addr - dev->reg.map[i].phys;
- if (ofs > dev->reg.map[i].size)
+ if (ofs >= dev->reg.map[i].size)
continue;
return dev->reg.map[i].maps + ofs;
--
2.43.0
Powered by blists - more mailing lists