aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hostapd/drv_callbacks.c9
-rw-r--r--src/drivers/driver.h8
-rw-r--r--src/drivers/driver_atheros.c2
3 files changed, 10 insertions, 9 deletions
diff --git a/hostapd/drv_callbacks.c b/hostapd/drv_callbacks.c
index 29c1ee6..278b495 100644
--- a/hostapd/drv_callbacks.c
+++ b/hostapd/drv_callbacks.c
@@ -463,6 +463,9 @@ void wpa_supplicant_event(void *ctx, wpa_event_type event,
data->ft_rrb_rx.data, data->ft_rrb_rx.data_len);
break;
#endif /* CONFIG_IEEE80211R */
+ case EVENT_WPS_BUTTON_PUSHED:
+ hostapd_wps_button_pushed(hapd);
+ break;
default:
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
break;
@@ -480,9 +483,3 @@ void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,
hapd->probereq_cb[i].cb(hapd->probereq_cb[i].ctx,
sa, ie, ie_len);
}
-
-
-void hostapd_button_pushed(struct hostapd_data *hapd)
-{
- hostapd_wps_button_pushed(hapd);
-}
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index 228ce6b..c07a45e 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1706,7 +1706,12 @@ typedef enum wpa_event_type {
/**
* EVENT_FT_RRB_RX - FT (IEEE 802.11r) RRB frame received
*/
- EVENT_FT_RRB_RX
+ EVENT_FT_RRB_RX,
+
+ /**
+ * EVENT_WPS_BUTTON_PUSHED - Report hardware push button press for WPS
+ */
+ EVENT_WPS_BUTTON_PUSHED
} wpa_event_type;
@@ -1973,6 +1978,5 @@ struct hostapd_data * hostapd_sta_get_bss(struct hostapd_data *hapd,
const u8 *addr);
void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,
const u8 *ie, size_t ie_len);
-void hostapd_button_pushed(struct hostapd_data *hapd);
#endif /* DRIVER_H */
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 8759b01..7f5f930 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -847,7 +847,7 @@ madwifi_wireless_event_wireless_custom(struct madwifi_driver_data *drv,
/* PROBLEM! this event is received for ALL BSSs ...
* so all are enabled for WPS... ugh.
*/
- hostapd_button_pushed(drv->hapd);
+ wpa_supplicant_event(drv->hapd, EVENT_WPS_BUTTON_PUSHED, NULL);
} else if (strncmp(custom, "Manage.prob_req ", 16) == 0) {
/*
* Atheros driver uses a hack to pass Probe Request frames as a