Skip to content

Commit 7035a08

Browse files
derennbd168
authored andcommitted
wifi: mt76: mt7921: prevent decap offload config before STA initialization
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: [email protected] Fixes: 24299fc ("mt76: mt7921: enable rx header traslation offload") Signed-off-by: Deren Wu <[email protected]> Link: https://patch.msgid.link/f23a72ba7a3c1ad38ba9e13bb54ef21d6ef44ffb.1748149855.git.deren.wu@mediatek.com Signed-off-by: Felix Fietkau <[email protected]>
1 parent 35ad47c commit 7035a08

File tree

1 file changed

+3
-0
lines changed
  • drivers/net/wireless/mediatek/mt76/mt7921

1 file changed

+3
-0
lines changed

drivers/net/wireless/mediatek/mt76/mt7921/main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,6 +1180,9 @@ static void mt7921_sta_set_decap_offload(struct ieee80211_hw *hw,
11801180
struct mt792x_sta *msta = (struct mt792x_sta *)sta->drv_priv;
11811181
struct mt792x_dev *dev = mt792x_hw_dev(hw);
11821182

1183+
if (!msta->deflink.wcid.sta)
1184+
return;
1185+
11831186
mt792x_mutex_acquire(dev);
11841187

11851188
if (enabled)

0 commit comments

Comments
 (0)