]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
mt76: mt7915: fix potential overflow of eeprom page index
authorShayne Chen <shayne.chen@mediatek.com>
Tue, 20 Jul 2021 02:48:32 +0000 (10:48 +0800)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:24 +0000 (09:48 +0100)
commit31bdff8564c16e2c3b45e9614b145093d60b5ef6
tree0e0003a2ad08ece0eccdf39d5145c7b88d520849
parent93d113a02978759b5c09c2a10a4de6a67943edc5
mt76: mt7915: fix potential overflow of eeprom page index

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit 82a980f82a511ce74ab57eb9f692d02225eb32f4 ]

If total eeprom size is divisible by per-page size, the i in for loop
will exceed max page index, which happens in our newer chipset.

Fixes: 26f18380e6ca ("mt76: mt7915: add support for flash mode")
Signed-off-by: Bo Jiao <bo.jiao@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c