Dispatch more WPS events through hostapd ctrl_iface
This commit is contained in:
parent
70dbe3b6d7
commit
628d54639a
4 changed files with 22 additions and 0 deletions
|
@ -566,30 +566,40 @@ static void hostapd_wps_event_cb(void *ctx, enum wps_event event,
|
||||||
|
|
||||||
switch (event) {
|
switch (event) {
|
||||||
case WPS_EV_M2D:
|
case WPS_EV_M2D:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_M2D);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_FAIL:
|
case WPS_EV_FAIL:
|
||||||
hostapd_wps_event_fail(hapd, &data->fail);
|
hostapd_wps_event_fail(hapd, &data->fail);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_SUCCESS:
|
case WPS_EV_SUCCESS:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_SUCCESS);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_PWD_AUTH_FAIL:
|
case WPS_EV_PWD_AUTH_FAIL:
|
||||||
hostapd_pwd_auth_fail(hapd, &data->pwd_auth_fail);
|
hostapd_pwd_auth_fail(hapd, &data->pwd_auth_fail);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_PBC_OVERLAP:
|
case WPS_EV_PBC_OVERLAP:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_OVERLAP);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_PBC_TIMEOUT:
|
case WPS_EV_PBC_TIMEOUT:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_TIMEOUT);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_ER_AP_ADD:
|
case WPS_EV_ER_AP_ADD:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_ADD);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_ER_AP_REMOVE:
|
case WPS_EV_ER_AP_REMOVE:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_REMOVE);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_ER_ENROLLEE_ADD:
|
case WPS_EV_ER_ENROLLEE_ADD:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_ENROLLEE_ADD);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_ER_ENROLLEE_REMOVE:
|
case WPS_EV_ER_ENROLLEE_REMOVE:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_ENROLLEE_REMOVE);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_ER_AP_SETTINGS:
|
case WPS_EV_ER_AP_SETTINGS:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_AP_SETTINGS);
|
||||||
break;
|
break;
|
||||||
case WPS_EV_ER_SET_SELECTED_REGISTRAR:
|
case WPS_EV_ER_SET_SELECTED_REGISTRAR:
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_ER_SET_SEL_REG);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (hapd->wps_event_cb)
|
if (hapd->wps_event_cb)
|
||||||
|
@ -1242,6 +1252,7 @@ static void hostapd_wps_ap_pin_timeout(void *eloop_data, void *user_ctx)
|
||||||
struct hostapd_data *hapd = eloop_data;
|
struct hostapd_data *hapd = eloop_data;
|
||||||
wpa_printf(MSG_DEBUG, "WPS: AP PIN timed out");
|
wpa_printf(MSG_DEBUG, "WPS: AP PIN timed out");
|
||||||
hostapd_wps_ap_pin_disable(hapd);
|
hostapd_wps_ap_pin_disable(hapd);
|
||||||
|
wpa_msg(hapd->msg_ctx, MSG_INFO, WPS_EVENT_AP_PIN_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -313,6 +313,15 @@ void wps_pbc_timeout_event(struct wps_context *wps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wps_registrar_sel_registrar_changed_event(struct wps_context *wps)
|
||||||
|
{
|
||||||
|
if (wps->event_cb == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
wps->event_cb(wps->cb_ctx, WPS_EV_ER_SET_SELECTED_REGISTRAR, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_WPS_OOB
|
#ifdef CONFIG_WPS_OOB
|
||||||
|
|
||||||
static struct wpabuf * wps_get_oob_cred(struct wps_context *wps)
|
static struct wpabuf * wps_get_oob_cred(struct wps_context *wps)
|
||||||
|
|
|
@ -228,6 +228,7 @@ void wps_success_event(struct wps_context *wps);
|
||||||
void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part);
|
void wps_pwd_auth_fail_event(struct wps_context *wps, int enrollee, int part);
|
||||||
void wps_pbc_overlap_event(struct wps_context *wps);
|
void wps_pbc_overlap_event(struct wps_context *wps);
|
||||||
void wps_pbc_timeout_event(struct wps_context *wps);
|
void wps_pbc_timeout_event(struct wps_context *wps);
|
||||||
|
void wps_registrar_sel_registrar_changed_event(struct wps_context *wps);
|
||||||
|
|
||||||
extern struct oob_device_data oob_ufd_device_data;
|
extern struct oob_device_data oob_ufd_device_data;
|
||||||
extern struct oob_device_data oob_nfc_device_data;
|
extern struct oob_device_data oob_nfc_device_data;
|
||||||
|
|
|
@ -3085,6 +3085,7 @@ static void wps_registrar_set_selected_timeout(void *eloop_ctx,
|
||||||
"unselect internal Registrar");
|
"unselect internal Registrar");
|
||||||
reg->selected_registrar = 0;
|
reg->selected_registrar = 0;
|
||||||
reg->pbc = 0;
|
reg->pbc = 0;
|
||||||
|
wps_registrar_sel_registrar_changed_event(reg->wps);
|
||||||
wps_registrar_selected_registrar_changed(reg);
|
wps_registrar_selected_registrar_changed(reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue