* per-link instance.
* This reference is needed during group rekey handling.
*/
- if (resp == WLAN_STATUS_SUCCESS)
+ if (resp == WLAN_STATUS_SUCCESS) {
sta->wpa_sm = assoc_wpa_sm;
- else
+#ifdef CONFIG_IEEE80211BE
+ set_wpa_sm_for_each_partner_link(hapd, sta,
+ assoc_wpa_sm);
+#endif /* CONFIG_IEEE80211BE */
+ } else {
sta->wpa_sm = NULL;
+#ifdef CONFIG_IEEE80211BE
+ clear_wpa_sm_for_each_partner_link(hapd, sta);
+#endif /* CONFIG_IEEE80211BE */
+ }
}
return resp;
#ifdef CONFIG_IEEE80211BE
-void clear_wpa_sm_for_each_partner_link(struct hostapd_data *hapd,
- struct sta_info *psta)
+
+void set_wpa_sm_for_each_partner_link(struct hostapd_data *hapd,
+ struct sta_info *psta, void *wpa_sm)
{
struct sta_info *lsta;
struct hostapd_data *lhapd;
lsta = ap_get_sta(lhapd, psta->addr);
if (lsta)
- lsta->wpa_sm = NULL;
+ lsta->wpa_sm = wpa_sm;
}
}
+
+
+void clear_wpa_sm_for_each_partner_link(struct hostapd_data *hapd,
+ struct sta_info *psta)
+{
+ set_wpa_sm_for_each_partner_link(hapd, psta, NULL);
+}
+
#endif /* CONFIG_IEEE80211BE */
void ap_sta_free_sta_profile(struct mld_info *info);
void hostapd_free_link_stas(struct hostapd_data *hapd);
+void set_wpa_sm_for_each_partner_link(struct hostapd_data *hapd,
+ struct sta_info *psta, void *wpa_sm);
void clear_wpa_sm_for_each_partner_link(struct hostapd_data *hapd,
struct sta_info *psta);