Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions mt7925/mcu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1337,15 +1337,23 @@ int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
for (i = 0; i < ARRAY_SIZE(links); i++) {
links[i].id = i ? __ffs(~BIT(mconf->link_id) & sel_links) :
mconf->link_id;

link_conf = mt792x_vif_to_bss_conf(vif, links[i].id);
if (WARN_ON_ONCE(!link_conf))
return -EPERM;
if (!link_conf)
return -ENOLINK;

links[i].chan = link_conf->chanreq.oper.chan;
if (WARN_ON_ONCE(!links[i].chan))
return -EPERM;
if (!links[i].chan)
/* Channel not configured yet - this can happen during
* MLO AP setup when links are being added sequentially.
* Return -ENOLINK to indicate link not ready.
*/
return -ENOLINK;

links[i].mconf = mt792x_vif_to_link(mvif, links[i].id);
if (!links[i].mconf)
return -ENOLINK;

links[i].tag = links[i].id == mconf->link_id ?
UNI_ROC_ACQUIRE : UNI_ROC_SUB_LINK;

Expand All @@ -1359,8 +1367,8 @@ int mt7925_mcu_set_mlo_roc(struct mt792x_bss_conf *mconf, u16 sel_links,
type = MT7925_ROC_REQ_JOIN;

for (i = 0; i < ARRAY_SIZE(links) && i < hweight16(vif->active_links); i++) {
if (WARN_ON_ONCE(!links[i].mconf || !links[i].chan))
continue;
if (!links[i].mconf || !links[i].chan)
return -ENOLINK;

chan = links[i].chan;
center_ch = ieee80211_frequency_to_channel(chan->center_freq);
Expand Down