]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
wifi: mt76: mt7915: guard HE capability lookups
authorRuoyu Wang <ruoyuw560@gmail.com>
Sat, 20 Jun 2026 15:53:32 +0000 (23:53 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 22 Jul 2026 06:10:39 +0000 (06:10 +0000)
commit8e9db062654a388d0fa587acbeeae68dd33eba41
tree0ef13ec225bca489df1310f4898464ad79220fcf
parent96ea44f2269f30364cffa054ee3a87e595bef0d4
wifi: mt76: mt7915: guard HE capability lookups

mt7915_mcu_bss_he_tlv() and mt7915_mcu_sta_bfer_tlv() both run after
checking HE support, then dereference the HE PHY capability returned by
mt76_connac_get_he_phy_cap(). That helper can return NULL when no
capability entry matches the vif type.

Fetch the capability before appending the TLV and skip the HE-specific
setup when no matching capability is available.

Fixes: e6d557a78b60 ("mt76: mt7915: rely on mt76_connac_get_phy utilities")
Signed-off-by: Ruoyu Wang <ruoyuw560@gmail.com>
Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260620155332.81120-1-ruoyuw560@gmail.com
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c