Home | History | Annotate | Download | only in wps

Lines Matching refs:wps

25  * wps_init - Initialize WPS Registration protocol data
26 * @cfg: WPS configuration
29 * This function is used to initialize WPS data for a registration protocol
39 data->wps = cfg->wps;
42 os_memcpy(data->uuid_r, cfg->wps->uuid, WPS_UUID_LEN);
44 os_memcpy(data->mac_addr_e, cfg->wps->dev.mac_addr, ETH_ALEN);
45 os_memcpy(data->uuid_e, cfg->wps->uuid, WPS_UUID_LEN);
48 data->dev_pw_id = data->wps->oob_dev_pw_id == 0 ?
49 cfg->dev_pw_id : data->wps->oob_dev_pw_id;
60 if (cfg->wps->ap && !cfg->registrar && cfg->wps->ap_nfc_dev_pw_id) {
61 data->dev_pw_id = cfg->wps->ap_nfc_dev_pw_id;
64 os_malloc(wpabuf_len(cfg->wps->ap_nfc_dev_pw));
70 wpabuf_head(cfg->wps->ap_nfc_dev_pw),
71 wpabuf_len(cfg->wps->ap_nfc_dev_pw));
72 data->dev_password_len = wpabuf_len(cfg->wps->ap_nfc_dev_pw);
93 wpa_hexdump_buf(MSG_DEBUG, "WPS: WPS IE from (Re)AssocReq",
96 wpa_printf(MSG_DEBUG, "WPS: Failed to parse WPS IE "
99 wpa_printf(MSG_DEBUG, "WPS: No Request Type attribute "
100 "in (Re)AssocReq WPS IE");
102 wpa_printf(MSG_DEBUG, "WPS: Request Type (from WPS IE "
103 "in (Re)AssocReq WPS IE): %d",
133 * wps_deinit - Deinitialize WPS Registration protocol data
134 * @data: WPS Registration protocol data from wps_init()
140 wps_registrar_remove_nfc_pw_token(data->wps->registrar,
145 wpa_printf(MSG_DEBUG, "WPS: Full PIN information revealed and "
148 wps_registrar_invalidate_pin(data->wps->registrar,
151 wps_registrar_unlock_pin(data->wps->registrar, data->uuid_e);
168 * wps_process_msg - Process a WPS message
169 * @wps: WPS Registration protocol data from wps_init()
174 * This function is used to process WPS messages with OP Codes WSC_ACK,
179 enum wps_process_res wps_process_msg(struct wps_data *wps,
183 if (wps->registrar)
184 return wps_registrar_process_msg(wps, op_code, msg);
186 return wps_enrollee_process_msg(wps, op_code, msg);
191 * wps_get_msg - Build a WPS message
192 * @wps: WPS Registration protocol data from wps_init()
194 * Returns: The generated WPS message or %NULL on failure
199 struct wpabuf * wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code)
201 if (wps->registrar)
202 return wps_registrar_get_msg(wps, op_code);
204 return wps_enrollee_get_msg(wps, op_code);
209 * wps_is_selected_pbc_registrar - Check whether WPS IE indicates active PBC
210 * @msg: WPS IE contents from Beacon or Probe Response frame
270 * wps_is_selected_pin_registrar - Check whether WPS IE indicates active PIN
271 * @msg: WPS IE contents from Beacon or Probe Response frame
286 * wps_is_addr_authorized - Check whether WPS IE authorizes MAC address
287 * @msg: WPS IE contents from Beacon or Probe Response frame
329 * wps_ap_priority_compar - Prioritize WPS IE from two APs
330 * @wps_a: WPS IE contents from Beacon or Probe Response frame
331 * @wps_b: WPS IE contents from Beacon or Probe Response frame
332 * Returns: 1 if wps_b is considered more likely selection for WPS
359 * wps_get_uuid_e - Get UUID-E from WPS IE
360 * @msg: WPS IE contents from Beacon or Probe Response frame
377 * wps_is_20 - Check whether WPS attributes claim support for WPS 2.0
390 * wps_build_assoc_req_ie - Build WPS IE for (Re)Association Request
392 * Returns: WPS IE or %NULL on failure
401 wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for (Re)Association "
425 * wps_build_assoc_resp_ie - Build WPS IE for (Re)Association Response
426 * Returns: WPS IE or %NULL on failure
435 wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for (Re)Association "
459 * wps_build_probe_req_ie - Build WPS IE for Probe Request
468 * Returns: WPS IE or %NULL on failure
480 wpa_printf(MSG_DEBUG, "WPS: Building WPS IE for Probe Request");