aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Wang <[email protected]>2024-07-06 01:28:12 -0700
committerFelix Fietkau <[email protected]>2024-07-09 23:02:09 +0200
commitbeef8d1643663d501ccbd9637fc314ea79ee09ac (patch)
treeb23ca379c7c7d9d4ea60ea94e95f0acb06baf319
parent677f19e161afb1096f30d993ae28140aa61a9847 (diff)
wifi: mt76: mt7925: update mt7925_mcu_sta_phy_tlv for MLO
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 <[email protected]> Signed-off-by: Ming Yen Hsieh <[email protected]> Co-developed-by: Deren Wu <[email protected]> Signed-off-by: Deren Wu <[email protected]> Signed-off-by: Sean Wang <[email protected]> Link: https://patch.msgid.link/6620e00fbeef686fb2041556deba346411eab0f1.1720248331.git.sean.wang@kernel.org Signed-off-by: Felix Fietkau <[email protected]>
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7925/mcu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7925/mcu.c
index fbf43dda0cd6..caf2ac238b4d 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;