]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()
authorShayne Chen <shayne.chen@mediatek.com>
Tue, 11 Mar 2025 17:45:09 +0000 (18:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:32 +0000 (11:12 +0200)
[ Upstream commit 9890624c1b3948c1c7f1d0e19ef0bb7680b8c80d ]

This is a preliminary patch to introduce MLO support for MT7996 driver.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Link: https://patch.msgid.link/20250311-mt7996-mlo-v2-10-31df6972519b@kernel.org
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c

index d0e49d68c5dbf0ed4eab084d9c6f1cad230bed93..bafcf5a279e23ff007d9052301cd2f6b899c491e 100644 (file)
@@ -391,7 +391,7 @@ void mt76_connac_mcu_sta_basic_tlv(struct mt76_dev *dev, struct sk_buff *skb,
                basic->conn_type = cpu_to_le32(CONNECTION_INFRA_BC);
 
                if (vif->type == NL80211_IFTYPE_STATION &&
-                   !is_zero_ether_addr(link_conf->bssid)) {
+                   link_conf && !is_zero_ether_addr(link_conf->bssid)) {
                        memcpy(basic->peer_addr, link_conf->bssid, ETH_ALEN);
                        basic->aid = cpu_to_le16(vif->cfg.aid);
                } else {