[PATCH v2 32/37] wifi: mt76: mt7925: update mt7925_mcu_sta_phy_tlv for MLO
sean.wang at kernel.org
sean.wang at kernel.org
Sat Jul 6 01:28:12 PDT 2024
From: Sean Wang <sean.wang at mediatek.com>
when we serve MLO during the multiple-linked connection, the chanctx may
be not available in the internal driver, we should get the proper the
band information from link_conf for the MLO-enabled firmware.
Co-developed-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
Signed-off-by: Ming Yen Hsieh <mingyen.hsieh at mediatek.com>
Co-developed-by: Deren Wu <deren.wu at mediatek.com>
Signed-off-by: Deren Wu <deren.wu at mediatek.com>
Signed-off-by: Sean Wang <sean.wang at mediatek.com>
---
drivers/net/wireless/mediatek/mt76/mt7925/mcu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index 8fc75f9002d1..b005b5b8968c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
@@ -1647,7 +1647,8 @@ mt7925_mcu_sta_phy_tlv(struct sk_buff *skb,
link_conf = mt792x_vif_to_bss_conf(vif, link_sta->link_id);
mconf = mt792x_vif_to_link(mvif, link_sta->link_id);
- chandef = &mconf->mt76.ctx->def;
+ chandef = mconf->mt76.ctx ? &mconf->mt76.ctx->def :
+ &link_conf->chanreq.oper;
tlv = mt76_connac_mcu_add_tlv(skb, STA_REC_PHY, sizeof(*phy));
phy = (struct sta_rec_phy *)tlv;
--
2.25.1
More information about the Linux-mediatek
mailing list