]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mt76: mt7925: validate mlink in sta_hdr_trans_tlv()
authorSean Wang <sean.wang@mediatek.com>
Fri, 6 Mar 2026 23:22:27 +0000 (17:22 -0600)
committerFelix Fietkau <nbd@nbd.name>
Tue, 24 Mar 2026 15:49:32 +0000 (15:49 +0000)
commit292651cafac012ebad3d9d68b38f69117da4685d
tree76fe4e89da1defc751db56155b8747a74e21bec9
parent8951131c18979b9d40d0f8a164be0432e8d1083b
wifi: mt76: mt7925: validate mlink in sta_hdr_trans_tlv()

Replace the dead wcid NULL check in mt7925_mcu_sta_hdr_trans_tlv() with
a WARN_ON_ONCE() guard on mlink before dereferencing mlink->wcid.

wcid is always derived from mlink, so mlink is the only meaningful
object to validate here.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Link: https://patch.msgid.link/20260306232238.2039675-9-sean.wang@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c