diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 0a972f566..0d117b4ed 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -1569,6 +1569,47 @@ int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf, return pos - buf; } + +#ifdef CONFIG_WNM_AP + +int ap_ctrl_iface_disassoc_imminent(struct wpa_supplicant *wpa_s, + const char *buf) +{ + struct hostapd_data *hapd; + + if (wpa_s->ap_iface) + hapd = wpa_s->ap_iface->bss[0]; + else + return -1; + return hostapd_ctrl_iface_disassoc_imminent(hapd, buf); +} + + +int ap_ctrl_iface_ess_disassoc(struct wpa_supplicant *wpa_s, const char *buf) +{ + struct hostapd_data *hapd; + + if (wpa_s->ap_iface) + hapd = wpa_s->ap_iface->bss[0]; + else + return -1; + return hostapd_ctrl_iface_ess_disassoc(hapd, buf); +} + + +int ap_ctrl_iface_bss_tm_req(struct wpa_supplicant *wpa_s, const char *buf) +{ + struct hostapd_data *hapd; + + if (wpa_s->ap_iface) + hapd = wpa_s->ap_iface->bss[0]; + else + return -1; + return hostapd_ctrl_iface_bss_tm_req(hapd, buf); +} + +#endif /* CONFIG_WNM_AP */ + #endif /* CONFIG_CTRL_IFACE */ diff --git a/wpa_supplicant/ap.h b/wpa_supplicant/ap.h index 7bc1b781e..3e20ac1bb 100644 --- a/wpa_supplicant/ap.h +++ b/wpa_supplicant/ap.h @@ -38,6 +38,10 @@ int ap_ctrl_iface_sta_disassociate(struct wpa_supplicant *wpa_s, const char *txtaddr); int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf, size_t buflen, int verbose); +int ap_ctrl_iface_disassoc_imminent(struct wpa_supplicant *wpa_s, + const char *buf); +int ap_ctrl_iface_ess_disassoc(struct wpa_supplicant *wpa_s, const char *buf); +int ap_ctrl_iface_bss_tm_req(struct wpa_supplicant *wpa_s, const char *buf); void ap_tx_status(void *ctx, const u8 *addr, const u8 *buf, size_t len, int ack); void ap_eapol_tx_status(void *ctx, const u8 *dst, diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 21d7ec4b0..078a8110d 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -12117,6 +12117,17 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s, if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18)) reply_len = -1; #endif /* CONFIG_WNM */ +#ifdef CONFIG_WNM_AP + } else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) { + if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18)) + reply_len = -1; + } else if (os_strncmp(buf, "ESS_DISASSOC ", 13) == 0) { + if (ap_ctrl_iface_ess_disassoc(wpa_s, buf + 13)) + reply_len = -1; + } else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) { + if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11)) + reply_len = -1; +#endif /* CONFIG_WNM_AP */ } else if (os_strcmp(buf, "FLUSH") == 0) { wpa_supplicant_ctrl_iface_flush(wpa_s); } else if (os_strncmp(buf, "RADIO_WORK ", 11) == 0) {