MLD STA: Fetch MLO association Link ID info to core wpa_supplicant
Fetch the MLO association Link ID info from the driver to the wpa_supplicant instance of the corresponding MLD STA interface. This info is needed when setting the MLO connection info to wpa_sm. Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
parent
ee46b7d6d3
commit
73f540b6a7
6 changed files with 18 additions and 12 deletions
|
@ -2742,6 +2742,7 @@ struct weighted_pcl {
|
|||
|
||||
struct driver_sta_mlo_info {
|
||||
u16 valid_links; /* bitmap of valid link IDs */
|
||||
u8 assoc_link_id;
|
||||
u8 ap_mld_addr[ETH_ALEN];
|
||||
struct {
|
||||
u8 addr[ETH_ALEN];
|
||||
|
|
|
@ -1502,7 +1502,7 @@ static int nl80211_get_assoc_freq_handler(struct nl_msg *msg, void *arg)
|
|||
}
|
||||
|
||||
if (!drv->sta_mlo_info.valid_links ||
|
||||
drv->mlo_assoc_link_id == link_id) {
|
||||
drv->sta_mlo_info.assoc_link_id == link_id) {
|
||||
ctx->assoc_freq = freq;
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Associated on %u MHz",
|
||||
ctx->assoc_freq);
|
||||
|
@ -1530,7 +1530,7 @@ static int nl80211_get_assoc_freq_handler(struct nl_msg *msg, void *arg)
|
|||
}
|
||||
|
||||
if (!drv->sta_mlo_info.valid_links ||
|
||||
drv->mlo_assoc_link_id == link_id) {
|
||||
drv->sta_mlo_info.assoc_link_id == link_id) {
|
||||
os_memcpy(ctx->assoc_bssid, bssid, ETH_ALEN);
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Associated with "
|
||||
MACSTR, MAC2STR(bssid));
|
||||
|
|
|
@ -128,7 +128,6 @@ struct wpa_driver_nl80211_data {
|
|||
u8 bssid[ETH_ALEN];
|
||||
u8 prev_bssid[ETH_ALEN];
|
||||
int associated;
|
||||
int mlo_assoc_link_id;
|
||||
struct driver_sta_mlo_info sta_mlo_info;
|
||||
u8 ssid[SSID_MAX_LEN];
|
||||
size_t ssid_len;
|
||||
|
|
|
@ -524,6 +524,7 @@ static void nl80211_parse_mlo_info(struct wpa_driver_nl80211_data *drv,
|
|||
{
|
||||
const u8 *ml_ie;
|
||||
struct driver_sta_mlo_info *mlo = &drv->sta_mlo_info;
|
||||
int res;
|
||||
|
||||
if (!addr || !mlo_links || !resp_ie)
|
||||
return;
|
||||
|
@ -533,11 +534,14 @@ static void nl80211_parse_mlo_info(struct wpa_driver_nl80211_data *drv,
|
|||
if (!ml_ie)
|
||||
return;
|
||||
|
||||
drv->mlo_assoc_link_id = nl80211_get_assoc_link_id(&ml_ie[3],
|
||||
ml_ie[1] - 1);
|
||||
if (drv->mlo_assoc_link_id < 0 ||
|
||||
drv->mlo_assoc_link_id >= MAX_NUM_MLD_LINKS)
|
||||
res = nl80211_get_assoc_link_id(&ml_ie[3], ml_ie[1] - 1);
|
||||
if (res < 0 || res >= MAX_NUM_MLD_LINKS) {
|
||||
wpa_printf(MSG_DEBUG,
|
||||
"nl80211: Could not find a valid association Link ID (res=%d)",
|
||||
res);
|
||||
return;
|
||||
}
|
||||
drv->sta_mlo_info.assoc_link_id = res;
|
||||
|
||||
os_memcpy(mlo->ap_mld_addr, nla_data(addr), ETH_ALEN);
|
||||
wpa_printf(MSG_DEBUG, "nl80211: AP MLD MAC Address " MACSTR,
|
||||
|
@ -550,14 +554,14 @@ static void nl80211_parse_mlo_info(struct wpa_driver_nl80211_data *drv,
|
|||
nl80211_parse_qca_vendor_mlo_link_info(mlo, mlo_links);
|
||||
#endif /* CONFIG_DRIVER_NL80211_QCA */
|
||||
|
||||
if (!(mlo->valid_links & BIT(drv->mlo_assoc_link_id))) {
|
||||
if (!(mlo->valid_links & BIT(drv->sta_mlo_info.assoc_link_id))) {
|
||||
wpa_printf(MSG_ERROR, "nl80211: Invalid MLO assoc link ID %d",
|
||||
drv->mlo_assoc_link_id);
|
||||
drv->sta_mlo_info.assoc_link_id);
|
||||
mlo->valid_links = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
os_memcpy(drv->bssid, mlo->links[drv->mlo_assoc_link_id].bssid,
|
||||
os_memcpy(drv->bssid, mlo->links[drv->sta_mlo_info.assoc_link_id].bssid,
|
||||
ETH_ALEN);
|
||||
os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN);
|
||||
}
|
||||
|
@ -922,7 +926,7 @@ static void mlme_event_ch_switch(struct wpa_driver_nl80211_data *drv,
|
|||
EVENT_LINK_CH_SWITCH_STARTED, &data);
|
||||
}
|
||||
|
||||
if (link_id != drv->mlo_assoc_link_id)
|
||||
if (link_id != drv->sta_mlo_info.assoc_link_id)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -3387,13 +3387,14 @@ static int wpa_drv_get_mlo_info(struct wpa_supplicant *wpa_s)
|
|||
}
|
||||
}
|
||||
|
||||
if (match &&
|
||||
if (match && wpa_s->mlo_assoc_link_id == mlo.assoc_link_id &&
|
||||
os_memcmp(wpa_s->ap_mld_addr, mlo.ap_mld_addr,
|
||||
ETH_ALEN) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
wpa_s->valid_links = mlo.valid_links;
|
||||
wpa_s->mlo_assoc_link_id = mlo.assoc_link_id;
|
||||
os_memcpy(wpa_s->ap_mld_addr, mlo.ap_mld_addr, ETH_ALEN);
|
||||
for (i = 0; i < MAX_NUM_MLD_LINKS; i++) {
|
||||
if (!(wpa_s->valid_links & BIT(i)))
|
||||
|
|
|
@ -740,6 +740,7 @@ struct wpa_supplicant {
|
|||
int ap_ies_from_associnfo;
|
||||
unsigned int assoc_freq;
|
||||
u8 ap_mld_addr[ETH_ALEN];
|
||||
u8 mlo_assoc_link_id;
|
||||
u8 valid_links; /* bitmap of valid MLO link IDs */
|
||||
struct {
|
||||
u8 addr[ETH_ALEN];
|
||||
|
|
Loading…
Reference in a new issue