@@ -758,6 +758,11 @@ int hostapd_drv_set_key(const char *ifname, struct hostapd_data *hapd,
params.key_flag = key_flag;
params.link_id = -1;
+#ifdef CONFIG_IEEE80211BE
+ if (hapd->conf->mld_ap && !(key_flag & KEY_FLAG_PAIRWISE))
+ params.link_id = hapd->mld_link_id;
+#endif /* CONFIG_IEEE80211BE */
+
return hapd->driver->set_key(hapd->drv_priv, ¶ms);
}
@@ -36,20 +36,6 @@
#include "sta_info.h"
-static const u8 *wpa_auth_get_aa(struct wpa_state_machine *sm)
-{
- return (sm && sm->mld_assoc_link_id >= 0) ?
- sm->own_mld_addr : sm->wpa_auth->addr;
-}
-
-
-static const u8 *wpa_auth_get_spa(struct wpa_state_machine *sm)
-{
- return sm->mld_assoc_link_id >= 0 ?
- sm->peer_mld_addr : sm->addr;
-}
-
-
#define STATE_MACHINE_DATA struct wpa_state_machine
#define STATE_MACHINE_DEBUG_PREFIX "WPA"
#define STATE_MACHINE_ADDR wpa_auth_get_spa(sm)
@@ -98,15 +84,17 @@ static const int dot11RSNAConfigPMKReauthThreshold = 70;
static const int dot11RSNAConfigSATimeout = 60;
-static const u8 * wpa_auth_get_aa(const struct wpa_state_machine *sm)
+static const u8 * wpa_auth_get_aa(struct wpa_state_machine *sm)
{
- return sm->wpa_auth->addr;
+ return (sm && sm->mld_assoc_link_id >= 0) ?
+ sm->own_mld_addr : sm->wpa_auth->addr;
}
-static const u8 * wpa_auth_get_spa(const struct wpa_state_machine *sm)
+static const u8 * wpa_auth_get_spa(struct wpa_state_machine *sm)
{
- return sm->addr;
+ return sm->mld_assoc_link_id >= 0 ?
+ sm->peer_mld_addr : sm->addr;
}