aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ap.c
diff options
context:
space:
mode:
authorAnirban Sirkhell <anirban@qca.qualcomm.com>2012-03-19 06:23:31 (GMT)
committerJouni Malinen <j@w1.fi>2012-03-30 08:11:35 (GMT)
commit4c374cde2f0b789d5aa1180667173358b71d492c (patch)
tree277ea8e47a22683b8a5c1a31bb38cc74d1439df4 /wpa_supplicant/ap.c
parent21d996f775a2131bb0c73d6e18ca9b382f017057 (diff)
downloadhostap-4c374cde2f0b789d5aa1180667173358b71d492c.zip
hostap-4c374cde2f0b789d5aa1180667173358b71d492c.tar.gz
hostap-4c374cde2f0b789d5aa1180667173358b71d492c.tar.bz2
Add wps_cancel for hostapd_cli
Implement wps_cancel for hostapd similarly to how it was already supported in wpa_supplicant AP mode. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ap.c')
-rw-r--r--wpa_supplicant/ap.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index d18e3f1..66b0e1f 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -659,21 +659,6 @@ int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
}
-static int wpa_supplicant_ap_wps_sta_cancel(struct hostapd_data *hapd,
- struct sta_info *sta, void *ctx)
-{
- if (sta && (sta->flags & WLAN_STA_WPS)) {
- ap_sta_deauthenticate(hapd, sta,
- WLAN_REASON_PREV_AUTH_NOT_VALID);
- wpa_printf(MSG_DEBUG, "WPS: %s: Deauth sta=" MACSTR,
- __func__, MAC2STR(sta->addr));
- return 1;
- }
-
- return 0;
-}
-
-
int wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s)
{
struct wps_registrar *reg;
@@ -685,7 +670,7 @@ int wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s)
reg = wpa_s->ap_iface->bss[0]->wps->registrar;
reg_sel = wps_registrar_wps_cancel(reg);
wps_sta = ap_for_each_sta(wpa_s->ap_iface->bss[0],
- wpa_supplicant_ap_wps_sta_cancel, NULL);
+ ap_sta_wps_cancel, NULL);
if (!reg_sel && !wps_sta) {
wpa_printf(MSG_DEBUG, "No WPS operation in progress at this "