Revert "[wpa_supplicant] cumilative patch from commit 4b755c967"
Revert submission 26533062-Supplicant_merge_June24
Reason for revert: https://b.corp.google.com/issues/349780869
Reverted changes: /q/submissionid:26533062-Supplicant_merge_June24
Change-Id: I6c9b7a4323fa7edde47617da6c1e0d8f6e6d5101
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 32944ed..2178d65 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -180,26 +180,13 @@
sta->pasn->fils.erp_resp = NULL;
#endif /* CONFIG_FILS */
- pasn_data_deinit(sta->pasn);
+ bin_clear_free(sta->pasn, sizeof(*sta->pasn));
sta->pasn = NULL;
}
}
#endif /* CONFIG_PASN */
-
-static void __ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
-{
-#ifdef CONFIG_IEEE80211BE
- if (hostapd_sta_is_link_sta(hapd, sta) &&
- !hostapd_drv_link_sta_remove(hapd, sta->addr))
- return;
-#endif /* CONFIG_IEEE80211BE */
-
- hostapd_drv_sta_remove(hapd, sta->addr);
-}
-
-
void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta)
{
int set_beacon = 0;
@@ -222,7 +209,7 @@
if (!hapd->iface->driver_ap_teardown &&
!(sta->flags & WLAN_STA_PREAUTH)) {
- __ap_free_sta(hapd, sta);
+ hostapd_drv_sta_remove(hapd, sta->addr);
sta->added_unassoc = 0;
}
@@ -467,27 +454,6 @@
}
-#ifdef CONFIG_IEEE80211BE
-void hostapd_free_link_stas(struct hostapd_data *hapd)
-{
- struct sta_info *sta, *prev;
-
- sta = hapd->sta_list;
- while (sta) {
- prev = sta;
- sta = sta->next;
-
- if (!hostapd_sta_is_link_sta(hapd, prev))
- continue;
-
- wpa_printf(MSG_DEBUG, "Removing link station from MLD " MACSTR,
- MAC2STR(prev->addr));
- ap_free_sta(hapd, prev);
- }
-}
-#endif /* CONFIG_IEEE80211BE */
-
-
/**
* ap_handle_timer - Per STA timer handler
* @eloop_ctx: struct hostapd_data *
@@ -1004,15 +970,16 @@
interfaces = assoc_hapd->iface->interfaces;
for (link_id = 0; link_id < MAX_NUM_MLD_LINKS; link_id++) {
- if (!assoc_sta->mld_info.links[link_id].valid)
- continue;
-
for (i = 0; i < interfaces->count; i++) {
struct sta_info *tmp_sta;
+ if (!assoc_sta->mld_info.links[link_id].valid)
+ continue;
+
tmp_hapd = interfaces->iface[i]->bss[0];
- if (!hostapd_is_ml_partner(tmp_hapd, assoc_hapd))
+ if (!tmp_hapd->conf->mld_ap ||
+ assoc_hapd->conf->mld_id != tmp_hapd->conf->mld_id)
continue;
for (tmp_sta = tmp_hapd->sta_list; tmp_sta;
@@ -1466,7 +1433,7 @@
u8 addr[ETH_ALEN];
u8 ip_addr_buf[4];
#endif /* CONFIG_P2P */
- const u8 *ip_ptr = NULL;
+ u8 *ip_ptr = NULL;
#ifdef CONFIG_P2P
if (hapd->p2p_group == NULL) {
@@ -1764,7 +1731,7 @@
unsigned int i, j;
for_each_mld_link(tmp_hapd, i, j, hapd->iface->interfaces,
- hostapd_get_mld_id(hapd)) {
+ hapd->conf->mld_id) {
struct sta_info *tmp_sta;
if (hapd == tmp_hapd)