From: H-Mole <houzhanyi61@xxxxxxxxxxx> Since commit https://github.com/torvalds/linux/commit/f503ae90c7355e8506e68498fe84c1357894cd5b showed that drivers/net/wireless/mediatek/mt76/mt7996/mcu.c misses a non-null judgement for the return value of mt76_connac_get_he_phy_cap on variable vc, this null-pointer problem may also happen on mt7915. This commit added such non-null judgement like what was added to function mt7996_mcu_sta_bfer_he() in commit f503ae90c7355e8506e68498fe84c1357894cd5b. Signed-off-by: H-Mole <houzhanyi61@xxxxxxxxxxx> --- drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 427542777abc..5dca50d40080 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -1184,6 +1184,9 @@ mt7915_mcu_sta_bfer_he(struct ieee80211_sta *sta, struct ieee80211_vif *vif, u8 nss_mcs = mt7915_mcu_get_sta_nss(mcs_map); u8 snd_dim, sts; + if (!vc) + return; + bf->tx_mode = MT_PHY_TYPE_HE_SU; mt7915_mcu_sta_sounding_rate(bf); -- 2.39.5