#endif /* CONFIG_IEEE80211BE */
+#if defined(HOSTAPD) || defined(CONFIG_IEEE80211BE)
+static struct hostapd_data * hostapd_find_by_sta(struct hostapd_iface *iface,
+ const u8 *src, bool rsn,
+ struct sta_info **sta_ret)
+{
+ struct hostapd_data *hapd;
+ struct sta_info *sta;
+ unsigned int j;
+
+ if (sta_ret)
+ *sta_ret = NULL;
+
+ for (j = 0; j < iface->num_bss; j++) {
+ hapd = iface->bss[j];
+ sta = ap_get_sta(hapd, src);
+ if (sta && (sta->flags & WLAN_STA_ASSOC) &&
+ (!rsn || sta->wpa_sm)) {
+ if (sta_ret)
+ *sta_ret = sta;
+ return hapd;
+ }
+#ifdef CONFIG_IEEE80211BE
+ if (hapd->conf->mld_ap) {
+ struct hostapd_data *p_hapd;
+
+ for_each_mld_link(p_hapd, hapd) {
+ if (p_hapd == hapd)
+ continue;
+
+ sta = ap_get_sta(p_hapd, src);
+ if (sta && (sta->flags & WLAN_STA_ASSOC) &&
+ (!rsn || sta->wpa_sm)) {
+ if (sta_ret)
+ *sta_ret = sta;
+ return p_hapd;
+ }
+ }
+ }
+#endif /* CONFIG_IEEE80211BE */
+ }
+
+ return NULL;
+}
+#endif /* HOSTAPD || CONFIG_IEEE80211BE */
+
+
int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
const u8 *req_ies, size_t req_ies_len,
const u8 *resp_ies, size_t resp_ies_len,
}
-static struct hostapd_data * hostapd_find_by_sta(struct hostapd_iface *iface,
- const u8 *src, bool rsn,
- struct sta_info **sta_ret)
-{
- struct hostapd_data *hapd;
- struct sta_info *sta;
- unsigned int j;
-
- if (sta_ret)
- *sta_ret = NULL;
-
- for (j = 0; j < iface->num_bss; j++) {
- hapd = iface->bss[j];
- sta = ap_get_sta(hapd, src);
- if (sta && (sta->flags & WLAN_STA_ASSOC) &&
- (!rsn || sta->wpa_sm)) {
- if (sta_ret)
- *sta_ret = sta;
- return hapd;
- }
-#ifdef CONFIG_IEEE80211BE
- if (hapd->conf->mld_ap) {
- struct hostapd_data *p_hapd;
-
- for_each_mld_link(p_hapd, hapd) {
- if (p_hapd == hapd)
- continue;
-
- sta = ap_get_sta(p_hapd, src);
- if (sta && (sta->flags & WLAN_STA_ASSOC) &&
- (!rsn || sta->wpa_sm)) {
- if (sta_ret)
- *sta_ret = sta;
- return p_hapd;
- }
- }
- }
-#endif /* CONFIG_IEEE80211BE */
- }
-
- return NULL;
-}
-
-
static void hostapd_event_eapol_rx(struct hostapd_data *hapd, const u8 *src,
const u8 *data, size_t data_len,
enum frame_encryption encrypted,