lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID:
 <OSZPR01MB84344FEFF53004B5CF40BCC198132@OSZPR01MB8434.jpnprd01.prod.outlook.com>
Date: Thu,  9 Jan 2025 19:04:36 +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 2/2] wifi: mt76: mt7996: 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/+/1a559ba2935fcf54eb1867e6ecd1ef7a2d2d0af8/autobuild/unified/filogic/mac80211/24.10/files/package/kernel/mt76/patches/0008-mtk-mt76-mt7996-fix-register-mapping.patch

Fixes: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
Signed-off-by: Peter Chiu <chui-hao.chiu@...iatek.com>
Signed-off-by: Shengyu Qu <wiagn233@...look.com>
---
 drivers/net/wireless/mediatek/mt76/mt7996/mmio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
index f9aa12866a2e..9a65ddf8236a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
@@ -177,7 +177,7 @@ static u32 __mt7996_reg_addr(struct mt7996_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].mapped + ofs;
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ