return hostapd_drv_add_pmkid(hapd, ¶ms);
}
+
+
+static int hostapd_drv_remove_pmkid(struct hostapd_data *hapd,
+ struct wpa_pmkid_params *params)
+{
+ if (!hapd->driver || !hapd->driver->remove_pmkid || !hapd->drv_priv)
+ return 0;
+ return hapd->driver->remove_pmkid(hapd->drv_priv, params);
+}
+
+
+int hostapd_remove_pmkid(struct hostapd_data *hapd, const u8 *sta_addr,
+ const u8 *pmkid)
+{
+ struct wpa_pmkid_params params;
+
+ os_memset(¶ms, 0, sizeof(params));
+ params.bssid = sta_addr;
+ params.pmkid = pmkid;
+
+ return hostapd_drv_remove_pmkid(hapd, ¶ms);
+}
struct wpa_pmkid_params *params);
int hostapd_add_pmkid(struct hostapd_data *hapd, const u8 *bssid, const u8 *pmk,
size_t pmk_len, const u8 *pmkid, int akmp);
+int hostapd_remove_pmkid(struct hostapd_data *hapd, const u8 *sta_addr,
+ const u8 *pmkid);
#endif /* AP_DRV_OPS */
{
struct wpa_authenticator *wpa_auth = ctx;
wpa_auth_for_each_sta(wpa_auth, wpa_auth_pmksa_clear_cb, entry);
+
+ /* Remove matching PMKID from the driver, if it had been added, e.g.,
+ * by external SAE authentication */
+ if (wpa_auth->cb->remove_pmkid)
+ wpa_auth->cb->remove_pmkid(wpa_auth->cb_ctx, entry->spa,
+ entry->pmkid);
}
struct wpa_authenticator * (*next_primary_auth)(void *ctx);
#endif /* CONFIG_IEEE80211BE */
int (*get_drv_flags)(void *ctx, u64 *drv_flags, u64 *drv_flags2);
+ int (*remove_pmkid)(void *ctx, const u8 *sta_addr, const u8 *pmkid);
};
struct wpa_authenticator * wpa_init(const u8 *addr,
}
+static int hostapd_wpa_auth_remove_pmkid(void *ctx, const u8 *sta_addr,
+ const u8 *pmkid)
+{
+ struct hostapd_data *hapd = ctx;
+
+ return hostapd_remove_pmkid(hapd, sta_addr, pmkid);
+}
+
+
int hostapd_setup_wpa(struct hostapd_data *hapd)
{
struct wpa_auth_config _conf;
.next_primary_auth = hostapd_next_primary_auth,
#endif /* CONFIG_IEEE80211BE */
.get_drv_flags = hostapd_wpa_auth_get_drv_flags,
+ .remove_pmkid = hostapd_wpa_auth_remove_pmkid,
};
const u8 *wpa_ie;
size_t wpa_ie_len;