Lines Matching refs:wps

67 	if (hapd != data->current_hapd && hapd->wps != NULL)  in wps_stop_registrar()
68 wps_registrar_complete(hapd->wps->registrar, data->uuid_e, in wps_stop_registrar()
109 hapd->wps->ap_setup_locked = 0; in hostapd_wps_reenable_ap_pin()
110 wps_registrar_update_ie(hapd->wps->registrar); in hostapd_wps_reenable_ap_pin()
132 if (hapd->conf->ap_pin == NULL || hapd->wps == NULL) in wps_ap_pin_success()
268 static void hostapd_free_wps(struct wps_context *wps) in hostapd_free_wps() argument
273 wpabuf_free(wps->dev.vendor_ext[i]); in hostapd_free_wps()
274 wps_device_data_free(&wps->dev); in hostapd_free_wps()
275 os_free(wps->network_key); in hostapd_free_wps()
276 wpabuf_free(wps->dh_pubkey); in hostapd_free_wps()
277 wpabuf_free(wps->dh_privkey); in hostapd_free_wps()
278 os_free(wps); in hostapd_free_wps()
281 int hostapd_init_wps(struct hostapd_data *hapd, struct wps_data *wps_data, struct wps_context *wps) in hostapd_init_wps() argument
285 wps->event_cb = hostapd_wps_event_cb; in hostapd_init_wps()
286 wps->rf_band_cb = hostapd_wps_rf_band_cb; in hostapd_init_wps()
287 wps->cb_ctx = hapd; in hostapd_init_wps()
289 wps->wps_state = WPS_STATE_CONFIGURED; in hostapd_init_wps()
290 wps->ap_setup_locked = 0; in hostapd_init_wps()
291 wps->ap = 1; in hostapd_init_wps()
302 wps->registrar = wps_registrar_init(wps, &cfg); in hostapd_init_wps()
303 if (wps->registrar == NULL) { in hostapd_init_wps()
308 hapd->wps = wps; in hostapd_init_wps()
320 hostapd_free_wps(wps); in hostapd_init_wps()
337 if (hapd->wps == NULL) { in hostapd_deinit_wps()
341 wps_registrar_deinit(hapd->wps->registrar); in hostapd_deinit_wps()
342 hapd->wps->registrar = NULL; in hostapd_deinit_wps()
349 hapd->wps = NULL; in hostapd_deinit_wps()
356 struct wps_context *wps = hapd->wps; in hostapd_update_wps() local
359 if (!wps) in hostapd_update_wps()
362 os_memcpy(wps->ssid, conf->ssid.ssid, conf->ssid.ssid_len); in hostapd_update_wps()
363 wps->ssid_len = conf->ssid.ssid_len; in hostapd_update_wps()
368 wps_registrar_update_ie(wps->registrar); in hostapd_update_wps()
375 if (hapd->wps == NULL) in hostapd_wps_add_pin()
377 ret = wps_registrar_add_pin(hapd->wps->registrar, NULL, in hostapd_wps_add_pin()
385 if (hapd->wps) { in hostapd_wps_button_pushed()
386 return wps_registrar_button_pushed(hapd->wps->registrar, in hostapd_wps_button_pushed()
395 if (hapd->wps) { in wps_cancel()
396 wps_registrar_wps_cancel(hapd->wps->registrar); in wps_cancel()
428 if (hapd->wps->ap_setup_locked) { in hostapd_wps_ap_pin_enable()
430 hapd->wps->ap_setup_locked = 0; in hostapd_wps_ap_pin_enable()
431 wps_registrar_update_ie(hapd->wps->registrar); in hostapd_wps_ap_pin_enable()
465 if (!hapd->wps) in wps_ap_pin_set()