]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: mt76: mt7921: prevent decap offload config before STA initialization
authorDeren Wu <deren.wu@mediatek.com>
Wed, 23 Jul 2025 18:27:51 +0000 (14:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 1 Aug 2025 08:47:32 +0000 (09:47 +0100)
commit034adb78fc4372f911c13eede924dce1c553f892
tree1a039fd8d4502288f9b63906b8bf5a26aa617212
parent79e2dd573116d3338507c311460da9669095c94d
wifi: mt76: mt7921: prevent decap offload config before STA initialization

[ Upstream commit 7035a082348acf1d43ffb9ff735899f8e3863f8f ]

The decap offload configuration should only be applied after the STA has
been successfully initialized. Attempting to configure it earlier can lead
to corruption of the MAC configuration in the chip's hardware state.

Add an early check for `msta->deflink.wcid.sta` to ensure the station peer
is properly initialized before proceeding with decapsulation offload
configuration.

Cc: stable@vger.kernel.org
Fixes: 24299fc869f7 ("mt76: mt7921: enable rx header traslation offload")
Signed-off-by: Deren Wu <deren.wu@mediatek.com>
Link: https://patch.msgid.link/f23a72ba7a3c1ad38ba9e13bb54ef21d6ef44ffb.1748149855.git.deren.wu@mediatek.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
[ Changed msta->deflink.wcid.sta to msta->wcid.sta ]
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/wireless/mediatek/mt76/mt7921/main.c