Patch "wifi: mt76: mt7996: fix register mapping" has been added to the 6.12-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: mt76: mt7996: fix register mapping

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-mt76-mt7996-fix-register-mapping.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit e6354548c99c8dc0a5e356aa94c8ca10fd8b232d
Author: Peter Chiu <chui-hao.chiu@xxxxxxxxxxxx>
Date:   Thu Jan 9 19:04:36 2025 +0800

    wifi: mt76: mt7996: fix register mapping
    
    [ Upstream commit d07ecb4f7070e84de49e8fa4e5a83dd52716d805 ]
    
    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: 98686cd21624 ("wifi: mt76: mt7996: add driver for MediaTek Wi-Fi 7 (802.11be) devices")
    Signed-off-by: Peter Chiu <chui-hao.chiu@xxxxxxxxxxxx>
    Signed-off-by: Shengyu Qu <wiagn233@xxxxxxxxxxx>
    Link: https://patch.msgid.link/OSZPR01MB84344FEFF53004B5CF40BCC198132@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Felix Fietkau <nbd@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7996/mmio.c
index 40e45fb2b6260..442f72450352b 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;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux