Link ID needs to be specified for MLD case when doing channel switch.
Add it to the driver command.
Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
if (ret)
return ret;
+ settings.link_id = -1;
+#ifdef CONFIG_IEEE80211BE
+ if (iface->num_bss && iface->bss[0]->conf->mld_ap)
+ settings.link_id = iface->bss[0]->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
+
ret = hostapd_ctrl_check_freq_params(&settings.freq_params,
settings.punct_bitmap);
if (ret) {
os_memset(&csa_settings, 0, sizeof(csa_settings));
csa_settings.cs_count = 5;
csa_settings.block_tx = 1;
+ csa_settings.link_id = -1;
+#ifdef CONFIG_IEEE80211BE
+ if (iface->bss[0]->conf->mld_ap)
+ csa_settings.link_id = iface->bss[0]->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_MESH
if (iface->mconf)
ieee80211_mode = IEEE80211_MODE_MESH;
settings->counter_offset_presp[0] = hapd->cs_c_off_proberesp;
settings->counter_offset_beacon[1] = hapd->cs_c_off_ecsa_beacon;
settings->counter_offset_presp[1] = hapd->cs_c_off_ecsa_proberesp;
+ settings->link_id = -1;
+#ifdef CONFIG_IEEE80211BE
+ if (hapd->conf->mld_ap)
+ settings->link_id = hapd->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
return 0;
}
* @counter_offset_beacon: Offset to the count field in beacon's tail
* @counter_offset_presp: Offset to the count field in probe resp.
* @punct_bitmap - Preamble puncturing bitmap
+ * @link_id: Link ID to determine the link for MLD; -1 for non-MLD
*/
struct csa_settings {
u8 cs_count;
u16 counter_offset_presp[2];
u16 punct_bitmap;
+ int link_id;
};
/**
int i;
wpa_printf(MSG_DEBUG,
- "nl80211: Channel switch request (cs_count=%u block_tx=%u freq=%d channel=%d sec_channel_offset=%d width=%d cf1=%d cf2=%d puncturing_bitmap=0x%04x%s%s%s)",
+ "nl80211: Channel switch request (cs_count=%u block_tx=%u freq=%d channel=%d sec_channel_offset=%d width=%d cf1=%d cf2=%d puncturing_bitmap=0x%04x link_id=%d%s%s%s)",
settings->cs_count, settings->block_tx,
settings->freq_params.freq,
settings->freq_params.channel,
settings->freq_params.center_freq1,
settings->freq_params.center_freq2,
settings->punct_bitmap,
+ settings->link_id,
settings->freq_params.ht_enabled ? " ht" : "",
settings->freq_params.vht_enabled ? " vht" : "",
settings->freq_params.he_enabled ? " he" : "");
nla_put_flag(msg, NL80211_ATTR_CH_SWITCH_BLOCK_TX)) ||
(settings->punct_bitmap &&
nla_put_u32(msg, NL80211_ATTR_PUNCT_BITMAP,
- settings->punct_bitmap)))
+ settings->punct_bitmap)) ||
+ (settings->link_id != NL80211_DRV_LINK_ID_NA &&
+ nla_put_u8(msg, NL80211_ATTR_MLO_LINK_ID, settings->link_id)))
goto error;
/* beacon_after params */
if (ret)
return ret;
+ settings.link_id = -1;
+
return ap_switch_channel(wpa_s, &settings);
}
#endif /* CONFIG_CTRL_IFACE */
os_memset(&csa_settings, 0, sizeof(csa_settings));
csa_settings.cs_count = P2P_GO_CSA_COUNT;
csa_settings.block_tx = P2P_GO_CSA_BLOCK_TX;
+ csa_settings.link_id = -1;
csa_settings.freq_params.freq = params.freq;
csa_settings.freq_params.sec_channel_offset = conf->secondary_channel;
csa_settings.freq_params.ht_enabled = conf->ieee80211n;