From: Huang Chenming Date: Sat, 26 Jul 2025 04:19:06 +0000 (+0530) Subject: AP MLD: Rename hostapd_is_mld_ap() to hostapd_is_multiple_link_mld() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=590f3bdb4c6106d7a276f2f7af15ba685ffb07d3;p=thirdparty%2Fhostap.git AP MLD: Rename hostapd_is_mld_ap() to hostapd_is_multiple_link_mld() hostapd_is_mld_ap() returns true only when there is more than one link affiliated with the AP MLD despite the fact that one link AP MLD is also an MLD. So rename the function to hostapd_is_multiple_link_mld() to make the code using this helper function easier to understand. Signed-off-by: Huang Chenming --- diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index d7e61dfd4..ca1210c87 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -1074,7 +1074,7 @@ void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr) sta = ap_get_sta(hapd, addr); #ifdef CONFIG_IEEE80211BE - if (hostapd_is_mld_ap(hapd)) { + if (hostapd_is_multiple_link_mld(hapd)) { struct hostapd_data *assoc_hapd; unsigned int i; diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 4952cc705..7e305c14c 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -4945,7 +4945,7 @@ out: } -bool hostapd_is_mld_ap(struct hostapd_data *hapd) +bool hostapd_is_multiple_link_mld(struct hostapd_data *hapd) { struct hostapd_data *bss; @@ -4983,7 +4983,7 @@ int hostapd_process_assoc_ml_info(struct hostapd_data *hapd, #ifdef CONFIG_IEEE80211BE unsigned int i; - if (!hostapd_is_mld_ap(hapd)) + if (!hostapd_is_multiple_link_mld(hapd)) return 0; for (i = 0; i < MAX_NUM_MLD_LINKS; i++) { @@ -6197,7 +6197,7 @@ static bool hostapd_ml_handle_disconnect(struct hostapd_data *hapd, struct sta_info *assoc_sta; struct sta_info *tmp_sta; - if (!hostapd_is_mld_ap(hapd)) + if (!hostapd_is_multiple_link_mld(hapd)) return false; /* @@ -6886,7 +6886,7 @@ static void hostapd_ml_handle_assoc_cb(struct hostapd_data *hapd, #ifdef CONFIG_IEEE80211BE struct hostapd_data *tmp_hapd; - if (!hostapd_is_mld_ap(hapd)) + if (!hostapd_is_multiple_link_mld(hapd)) return; for_each_mld_link(tmp_hapd, hapd) { diff --git a/src/ap/ieee802_11.h b/src/ap/ieee802_11.h index f1230da34..31bc0249b 100644 --- a/src/ap/ieee802_11.h +++ b/src/ap/ieee802_11.h @@ -289,7 +289,7 @@ u8 * hostapd_eid_mbssid(struct hostapd_data *hapd, u8 *eid, u8 *end, u8 **elem_offset, const u8 *known_bss, size_t known_bss_len, u8 *rnr_eid, u8 *rnr_count, u8 **rnr_offset, size_t rnr_len); -bool hostapd_is_mld_ap(struct hostapd_data *hapd); +bool hostapd_is_multiple_link_mld(struct hostapd_data *hapd); const char * sae_get_password(struct hostapd_data *hapd, struct sta_info *sta, const char *rx_id, struct sae_password_entry **pw_entry, diff --git a/src/ap/ieee802_1x.c b/src/ap/ieee802_1x.c index 61e8bfaed..4fe8bff6f 100644 --- a/src/ap/ieee802_1x.c +++ b/src/ap/ieee802_1x.c @@ -151,7 +151,7 @@ static void ieee802_1x_ml_set_sta_authorized(struct hostapd_data *hapd, #ifdef CONFIG_IEEE80211BE unsigned int i; - if (!hostapd_is_mld_ap(hapd)) + if (!hostapd_is_multiple_link_mld(hapd)) return; /* diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c index 960b051d2..4ad809cb2 100644 --- a/src/ap/sta_info.c +++ b/src/ap/sta_info.c @@ -1087,7 +1087,7 @@ static bool ap_sta_ml_disconnect(struct hostapd_data *hapd, unsigned int i, link_id; struct hapd_interfaces *interfaces; - if (!hostapd_is_mld_ap(hapd)) + if (!hostapd_is_multiple_link_mld(hapd)) return false; /*