Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wifi: mt76: mt7996: Remove unnecessary link_id checks in mt7996_tx

Remove unnecessary link_id checks in mt7996_tx routine since if the link
identifier provided by mac80211 is unspecified the value will be
overwritten at the beginning on the function.

Fixes: f940c9b7aef6 ("wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20250924-mt76_tx_unnecessary-check-v1-1-e595930a5662@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>

authored by

Lorenzo Bianconi and committed by
Felix Fietkau
08492206 79277f8a

+5 -7
+5 -7
drivers/net/wireless/mediatek/mt76/mt7996/main.c
··· 1339 1339 } 1340 1340 1341 1341 if (mvif) { 1342 - struct mt76_vif_link *mlink = &mvif->deflink.mt76; 1342 + struct mt76_vif_link *mlink; 1343 1343 1344 - if (link_id < IEEE80211_LINK_UNSPECIFIED) 1345 - mlink = rcu_dereference(mvif->mt76.link[link_id]); 1346 - 1347 - if (mlink->wcid) 1344 + mlink = rcu_dereference(mvif->mt76.link[link_id]); 1345 + if (mlink && mlink->wcid) 1348 1346 wcid = mlink->wcid; 1349 1347 1350 1348 if (mvif->mt76.roc_phy && ··· 1350 1352 mphy = mvif->mt76.roc_phy; 1351 1353 if (mphy->roc_link) 1352 1354 wcid = mphy->roc_link->wcid; 1353 - } else { 1355 + } else if (mlink) { 1354 1356 mphy = mt76_vif_link_phy(mlink); 1355 1357 } 1356 1358 } ··· 1360 1362 goto unlock; 1361 1363 } 1362 1364 1363 - if (msta && link_id < IEEE80211_LINK_UNSPECIFIED) { 1365 + if (msta) { 1364 1366 struct mt7996_sta_link *msta_link; 1365 1367 1366 1368 msta_link = rcu_dereference(msta->link[link_id]);