2 * Wi-Fi Protected Setup
3 * Copyright (c) 2007-2012, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
15 * enum wsc_op_code - EAP-WSC OP-Code values
18 WSC_UPnP = 0 /* No OP Code in UPnP transport */,
28 struct upnp_wps_device_sm;
30 struct wps_parse_attr;
33 * struct wps_credential - WPS Credential
35 * @ssid_len: Length of SSID
36 * @auth_type: Authentication Type (WPS_AUTH_OPEN, .. flags)
37 * @encr_type: Encryption Type (WPS_ENCR_NONE, .. flags)
40 * @key_len: Key length in octets
41 * @mac_addr: MAC address of the Credential receiver
42 * @cred_attr: Unparsed Credential attribute data (used only in cred_cb());
43 * this may be %NULL, if not used
44 * @cred_attr_len: Length of cred_attr in octets
45 * @ap_channel: AP channel
47 struct wps_credential {
55 u8 mac_addr[ETH_ALEN];
61 #define WPS_DEV_TYPE_LEN 8
62 #define WPS_DEV_TYPE_BUFSIZE 21
63 #define WPS_SEC_DEV_TYPE_MAX_LEN 128
64 /* maximum number of advertised WPS vendor extension attributes */
65 #define MAX_WPS_VENDOR_EXTENSIONS 10
66 /* maximum size of WPS Vendor extension attribute */
67 #define WPS_MAX_VENDOR_EXT_LEN 1024
68 /* maximum number of parsed WPS vendor extension attributes */
69 #define MAX_WPS_PARSE_VENDOR_EXT 10
72 * struct wps_device_data - WPS Device Data
73 * @mac_addr: Device MAC address
74 * @device_name: Device Name (0..32 octets encoded in UTF-8)
75 * @manufacturer: Manufacturer (0..64 octets encoded in UTF-8)
76 * @model_name: Model Name (0..32 octets encoded in UTF-8)
77 * @model_number: Model Number (0..32 octets encoded in UTF-8)
78 * @serial_number: Serial Number (0..32 octets encoded in UTF-8)
79 * @pri_dev_type: Primary Device Type
80 * @sec_dev_type: Array of secondary device types
81 * @num_sec_dev_type: Number of secondary device types
82 * @os_version: OS Version
83 * @rf_bands: RF bands (WPS_RF_24GHZ, WPS_RF_50GHZ flags)
84 * @p2p: Whether the device is a P2P device
86 struct wps_device_data {
87 u8 mac_addr[ETH_ALEN];
93 u8 pri_dev_type[WPS_DEV_TYPE_LEN];
94 #define WPS_SEC_DEVICE_TYPES 5
95 u8 sec_dev_type[WPS_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
100 struct wpabuf *vendor_ext_m1;
101 struct wpabuf *vendor_ext[MAX_WPS_VENDOR_EXTENSIONS];
106 struct oob_conf_data {
108 OOB_METHOD_UNKNOWN = 0,
109 OOB_METHOD_DEV_PWD_E,
110 OOB_METHOD_DEV_PWD_R,
113 struct wpabuf *dev_password;
114 struct wpabuf *pubkey_hash;
118 * struct wps_config - WPS configuration for a single registration protocol run
122 * wps - Pointer to long term WPS context
124 struct wps_context *wps;
127 * registrar - Whether this end is a Registrar
132 * pin - Enrollee Device Password (%NULL for Registrar or PBC)
137 * pin_len - Length on pin in octets
142 * pbc - Whether this is protocol run uses PBC
147 * assoc_wps_ie: (Re)AssocReq WPS IE (in AP; %NULL if not AP)
149 const struct wpabuf *assoc_wps_ie;
152 * new_ap_settings - New AP settings (%NULL if not used)
154 * This parameter provides new AP settings when using a wireless
155 * stations as a Registrar to configure the AP. %NULL means that AP
156 * will not be reconfigured, i.e., the station will only learn the
157 * current AP settings by using AP PIN.
159 const struct wps_credential *new_ap_settings;
162 * peer_addr: MAC address of the peer in AP; %NULL if not AP
167 * use_psk_key - Use PSK format key in Credential
169 * Force PSK format to be used instead of ASCII passphrase when
170 * building Credential for an Enrollee. The PSK value is set in
171 * struct wpa_context::psk.
176 * dev_pw_id - Device Password ID for Enrollee when PIN is used
181 * p2p_dev_addr - P2P Device Address from (Re)Association Request
183 * On AP/GO, this is set to the P2P Device Address of the associating
184 * P2P client if a P2P IE is included in the (Re)Association Request
185 * frame and the P2P Device Address is included. Otherwise, this is set
186 * to %NULL to indicate the station does not have a P2P Device Address.
188 const u8 *p2p_dev_addr;
191 * pbc_in_m1 - Do not remove PushButton config method in M1 (AP)
193 * This can be used to enable a workaround to allow Windows 7 to use
199 struct wps_data * wps_init(const struct wps_config *cfg);
201 void wps_deinit(struct wps_data *data);
204 * enum wps_process_res - WPS message processing result
206 enum wps_process_res {
208 * WPS_DONE - Processing done
213 * WPS_CONTINUE - Processing continues
218 * WPS_FAILURE - Processing failed
223 * WPS_PENDING - Processing continues, but waiting for an external
224 * event (e.g., UPnP message from an external Registrar)
228 enum wps_process_res wps_process_msg(struct wps_data *wps,
229 enum wsc_op_code op_code,
230 const struct wpabuf *msg);
232 struct wpabuf * wps_get_msg(struct wps_data *wps, enum wsc_op_code *op_code);
234 int wps_is_selected_pbc_registrar(const struct wpabuf *msg);
235 int wps_is_selected_pin_registrar(const struct wpabuf *msg);
236 int wps_ap_priority_compar(const struct wpabuf *wps_a,
237 const struct wpabuf *wps_b);
238 int wps_is_addr_authorized(const struct wpabuf *msg, const u8 *addr,
240 const u8 * wps_get_uuid_e(const struct wpabuf *msg);
241 int wps_is_20(const struct wpabuf *msg);
243 struct wpabuf * wps_build_assoc_req_ie(enum wps_request_type req_type);
244 struct wpabuf * wps_build_assoc_resp_ie(void);
245 struct wpabuf * wps_build_probe_req_ie(u16 pw_id, struct wps_device_data *dev,
247 enum wps_request_type req_type,
248 unsigned int num_req_dev_types,
249 const u8 *req_dev_types);
253 * struct wps_registrar_config - WPS Registrar configuration
255 struct wps_registrar_config {
257 * new_psk_cb - Callback for new PSK
258 * @ctx: Higher layer context data (cb_ctx)
259 * @mac_addr: MAC address of the Enrollee
261 * @psk_len: The length of psk in octets
262 * Returns: 0 on success, -1 on failure
264 * This callback is called when a new per-device PSK is provisioned.
266 int (*new_psk_cb)(void *ctx, const u8 *mac_addr, const u8 *psk,
270 * set_ie_cb - Callback for WPS IE changes
271 * @ctx: Higher layer context data (cb_ctx)
272 * @beacon_ie: WPS IE for Beacon
273 * @probe_resp_ie: WPS IE for Probe Response
274 * Returns: 0 on success, -1 on failure
276 * This callback is called whenever the WPS IE in Beacon or Probe
277 * Response frames needs to be changed (AP only). Callee is responsible
278 * for freeing the buffers.
280 int (*set_ie_cb)(void *ctx, struct wpabuf *beacon_ie,
281 struct wpabuf *probe_resp_ie);
284 * pin_needed_cb - Callback for requesting a PIN
285 * @ctx: Higher layer context data (cb_ctx)
286 * @uuid_e: UUID-E of the unknown Enrollee
287 * @dev: Device Data from the unknown Enrollee
289 * This callback is called whenever an unknown Enrollee requests to use
290 * PIN method and a matching PIN (Device Password) is not found in
293 void (*pin_needed_cb)(void *ctx, const u8 *uuid_e,
294 const struct wps_device_data *dev);
297 * reg_success_cb - Callback for reporting successful registration
298 * @ctx: Higher layer context data (cb_ctx)
299 * @mac_addr: MAC address of the Enrollee
300 * @uuid_e: UUID-E of the Enrollee
301 * @dev_pw: Device Password (PIN) used during registration
302 * @dev_pw_len: Length of dev_pw in octets
304 * This callback is called whenever an Enrollee completes registration
307 void (*reg_success_cb)(void *ctx, const u8 *mac_addr,
308 const u8 *uuid_e, const u8 *dev_pw,
312 * set_sel_reg_cb - Callback for reporting selected registrar changes
313 * @ctx: Higher layer context data (cb_ctx)
314 * @sel_reg: Whether the Registrar is selected
315 * @dev_passwd_id: Device Password ID to indicate with method or
316 * specific password the Registrar intends to use
317 * @sel_reg_config_methods: Bit field of active config methods
319 * This callback is called whenever the Selected Registrar state
320 * changes (e.g., a new PIN becomes available or PBC is invoked). This
321 * callback is only used by External Registrar implementation;
322 * set_ie_cb() is used by AP implementation in similar caes, but it
323 * provides the full WPS IE data instead of just the minimal Registrar
326 void (*set_sel_reg_cb)(void *ctx, int sel_reg, u16 dev_passwd_id,
327 u16 sel_reg_config_methods);
330 * enrollee_seen_cb - Callback for reporting Enrollee based on ProbeReq
331 * @ctx: Higher layer context data (cb_ctx)
332 * @addr: MAC address of the Enrollee
333 * @uuid_e: UUID of the Enrollee
334 * @pri_dev_type: Primary device type
335 * @config_methods: Config Methods
336 * @dev_password_id: Device Password ID
337 * @request_type: Request Type
338 * @dev_name: Device Name (if available)
340 void (*enrollee_seen_cb)(void *ctx, const u8 *addr, const u8 *uuid_e,
341 const u8 *pri_dev_type, u16 config_methods,
342 u16 dev_password_id, u8 request_type,
343 const char *dev_name);
346 * cb_ctx: Higher layer context data for Registrar callbacks
351 * skip_cred_build: Do not build credential
353 * This option can be used to disable internal code that builds
354 * Credential attribute into M8 based on the current network
355 * configuration and Enrollee capabilities. The extra_cred data will
356 * then be used as the Credential(s).
361 * extra_cred: Additional Credential attribute(s)
363 * This optional data (set to %NULL to disable) can be used to add
364 * Credential attribute(s) for other networks into M8. If
365 * skip_cred_build is set, this will also override the automatically
366 * generated Credential attribute.
368 const u8 *extra_cred;
371 * extra_cred_len: Length of extra_cred in octets
373 size_t extra_cred_len;
376 * disable_auto_conf - Disable auto-configuration on first registration
378 * By default, the AP that is started in not configured state will
379 * generate a random PSK and move to configured state when the first
380 * registration protocol run is completed successfully. This option can
381 * be used to disable this functionality and leave it up to an external
382 * program to take care of configuration. This requires the extra_cred
383 * to be set with a suitable Credential and skip_cred_build being used.
385 int disable_auto_conf;
388 * static_wep_only - Whether the BSS supports only static WEP
393 * dualband - Whether this is a concurrent dualband AP
400 * enum wps_event - WPS event types
404 * WPS_EV_M2D - M2D received (Registrar did not know us)
409 * WPS_EV_FAIL - Registration failed
414 * WPS_EV_SUCCESS - Registration succeeded
419 * WPS_EV_PWD_AUTH_FAIL - Password authentication failed
421 WPS_EV_PWD_AUTH_FAIL,
424 * WPS_EV_PBC_OVERLAP - PBC session overlap detected
429 * WPS_EV_PBC_TIMEOUT - PBC walktime expired before protocol run start
434 * WPS_EV_ER_AP_ADD - ER: AP added
439 * WPS_EV_ER_AP_REMOVE - ER: AP removed
444 * WPS_EV_ER_ENROLLEE_ADD - ER: Enrollee added
446 WPS_EV_ER_ENROLLEE_ADD,
449 * WPS_EV_ER_ENROLLEE_REMOVE - ER: Enrollee removed
451 WPS_EV_ER_ENROLLEE_REMOVE,
454 * WPS_EV_ER_AP_SETTINGS - ER: AP Settings learned
456 WPS_EV_ER_AP_SETTINGS,
459 * WPS_EV_ER_SET_SELECTED_REGISTRAR - ER: SetSelectedRegistrar event
461 WPS_EV_ER_SET_SELECTED_REGISTRAR,
464 * WPS_EV_AP_PIN_SUCCESS - External Registrar used correct AP PIN
466 WPS_EV_AP_PIN_SUCCESS
470 * union wps_event_data - WPS event data
472 union wps_event_data {
474 * struct wps_event_m2d - M2D event data
476 struct wps_event_m2d {
478 const u8 *manufacturer;
479 size_t manufacturer_len;
480 const u8 *model_name;
481 size_t model_name_len;
482 const u8 *model_number;
483 size_t model_number_len;
484 const u8 *serial_number;
485 size_t serial_number_len;
488 const u8 *primary_dev_type; /* 8 octets */
494 * struct wps_event_fail - Registration failure information
495 * @msg: enum wps_msg_type
497 struct wps_event_fail {
500 u16 error_indication;
503 struct wps_event_pwd_auth_fail {
508 struct wps_event_er_ap {
511 const char *friendly_name;
512 const char *manufacturer;
513 const char *manufacturer_url;
514 const char *model_description;
515 const char *model_name;
516 const char *model_number;
517 const char *model_url;
518 const char *serial_number;
520 const u8 *pri_dev_type;
524 struct wps_event_er_enrollee {
530 const u8 *pri_dev_type;
531 const char *dev_name;
532 const char *manufacturer;
533 const char *model_name;
534 const char *model_number;
535 const char *serial_number;
538 struct wps_event_er_ap_settings {
540 const struct wps_credential *cred;
543 struct wps_event_er_set_selected_registrar {
547 u16 sel_reg_config_methods;
549 WPS_ER_SET_SEL_REG_START,
550 WPS_ER_SET_SEL_REG_DONE,
551 WPS_ER_SET_SEL_REG_FAILED
557 * struct upnp_pending_message - Pending PutWLANResponse messages
558 * @next: Pointer to next pending message or %NULL
559 * @addr: NewWLANEventMAC
561 * @type: Message Type
563 struct upnp_pending_message {
564 struct upnp_pending_message *next;
567 enum wps_msg_type type;
571 * struct wps_context - Long term WPS context data
573 * This data is stored at the higher layer Authenticator or Supplicant data
574 * structures and it is maintained over multiple registration protocol runs.
578 * ap - Whether the local end is an access point
583 * registrar - Pointer to WPS registrar data from wps_registrar_init()
585 struct wps_registrar *registrar;
588 * wps_state - Current WPS state
590 enum wps_state wps_state;
593 * ap_setup_locked - Whether AP setup is locked (only used at AP)
605 * This SSID is used by the Registrar to fill in information for
606 * Credentials. In addition, AP uses it when acting as an Enrollee to
607 * notify Registrar of the current configuration.
612 * ssid_len - Length of ssid in octets
617 * dev - Own WPS device data
619 struct wps_device_data dev;
622 * oob_conf - OOB Config data
624 struct oob_conf_data oob_conf;
627 * oob_dev_pw_id - OOB Device password id
632 * dh_ctx - Context data for Diffie-Hellman operation
637 * dh_privkey - Diffie-Hellman private key
639 struct wpabuf *dh_privkey;
642 * dh_pubkey_oob - Diffie-Hellman public key
644 struct wpabuf *dh_pubkey;
647 * config_methods - Enabled configuration methods
649 * Bit field of WPS_CONFIG_*
654 * encr_types - Enabled encryption types (bit field of WPS_ENCR_*)
659 * auth_types - Authentication types (bit field of WPS_AUTH_*)
664 * network_key - The current Network Key (PSK) or %NULL to generate new
666 * If %NULL, Registrar will generate per-device PSK. In addition, AP
667 * uses this when acting as an Enrollee to notify Registrar of the
668 * current configuration.
670 * When using WPA/WPA2-Person, this key can be either the ASCII
671 * passphrase (8..63 characters) or the 32-octet PSK (64 hex
672 * characters). When this is set to the ASCII passphrase, the PSK can
673 * be provided in the psk buffer and used per-Enrollee to control which
674 * key type is included in the Credential (e.g., to reduce calculation
675 * need on low-powered devices by provisioning PSK while still allowing
676 * other devices to get the passphrase).
681 * network_key_len - Length of network_key in octets
683 size_t network_key_len;
686 * psk - The current network PSK
688 * This optional value can be used to provide the current PSK if
689 * network_key is set to the ASCII passphrase.
694 * psk_set - Whether psk value is set
699 * ap_settings - AP Settings override for M7 (only used at AP)
701 * If %NULL, AP Settings attributes will be generated based on the
702 * current network configuration.
707 * ap_settings_len - Length of ap_settings in octets
709 size_t ap_settings_len;
712 * friendly_name - Friendly Name (required for UPnP)
717 * manufacturer_url - Manufacturer URL (optional for UPnP)
719 char *manufacturer_url;
722 * model_description - Model Description (recommended for UPnP)
724 char *model_description;
727 * model_url - Model URL (optional for UPnP)
732 * upc - Universal Product Code (optional for UPnP)
737 * cred_cb - Callback to notify that new Credentials were received
738 * @ctx: Higher layer context data (cb_ctx)
739 * @cred: The received Credential
740 * Return: 0 on success, -1 on failure
742 int (*cred_cb)(void *ctx, const struct wps_credential *cred);
745 * event_cb - Event callback (state information about progress)
746 * @ctx: Higher layer context data (cb_ctx)
750 void (*event_cb)(void *ctx, enum wps_event event,
751 union wps_event_data *data);
754 * cb_ctx: Higher layer context data for callbacks
758 struct upnp_wps_device_sm *wps_upnp;
760 /* Pending messages from UPnP PutWLANResponse */
761 struct upnp_pending_message *upnp_msgs;
763 u16 ap_nfc_dev_pw_id;
764 struct wpabuf *ap_nfc_dh_pubkey;
765 struct wpabuf *ap_nfc_dh_privkey;
766 struct wpabuf *ap_nfc_dev_pw;
769 struct oob_device_data {
771 void * (*init_func)(struct wps_context *, struct oob_device_data *,
773 struct wpabuf * (*read_func)(void *);
774 int (*write_func)(void *, struct wpabuf *);
775 void (*deinit_func)(void *);
778 struct wps_registrar *
779 wps_registrar_init(struct wps_context *wps,
780 const struct wps_registrar_config *cfg);
781 void wps_registrar_deinit(struct wps_registrar *reg);
782 int wps_registrar_add_pin(struct wps_registrar *reg, const u8 *addr,
783 const u8 *uuid, const u8 *pin, size_t pin_len,
785 int wps_registrar_invalidate_pin(struct wps_registrar *reg, const u8 *uuid);
786 int wps_registrar_wps_cancel(struct wps_registrar *reg);
787 int wps_registrar_unlock_pin(struct wps_registrar *reg, const u8 *uuid);
788 int wps_registrar_button_pushed(struct wps_registrar *reg,
789 const u8 *p2p_dev_addr);
790 void wps_registrar_complete(struct wps_registrar *registrar, const u8 *uuid_e,
791 const u8 *dev_pw, size_t dev_pw_len);
792 void wps_registrar_probe_req_rx(struct wps_registrar *reg, const u8 *addr,
793 const struct wpabuf *wps_data,
795 int wps_registrar_update_ie(struct wps_registrar *reg);
796 int wps_registrar_get_info(struct wps_registrar *reg, const u8 *addr,
797 char *buf, size_t buflen);
798 int wps_registrar_config_ap(struct wps_registrar *reg,
799 struct wps_credential *cred);
800 int wps_registrar_add_nfc_pw_token(struct wps_registrar *reg,
801 const u8 *pubkey_hash, u16 pw_id,
802 const u8 *dev_pw, size_t dev_pw_len);
803 int wps_registrar_add_nfc_password_token(struct wps_registrar *reg,
804 const u8 *oob_dev_pw,
805 size_t oob_dev_pw_len);
807 int wps_build_credential_wrap(struct wpabuf *msg,
808 const struct wps_credential *cred);
810 unsigned int wps_pin_checksum(unsigned int pin);
811 unsigned int wps_pin_valid(unsigned int pin);
812 unsigned int wps_generate_pin(void);
813 int wps_pin_str_valid(const char *pin);
814 void wps_free_pending_msgs(struct upnp_pending_message *msgs);
816 struct oob_device_data * wps_get_oob_device(char *device_type);
817 int wps_get_oob_method(char *method);
818 int wps_process_oob(struct wps_context *wps, struct oob_device_data *oob_dev,
820 struct wpabuf * wps_get_oob_cred(struct wps_context *wps);
821 int wps_oob_use_cred(struct wps_context *wps, struct wps_parse_attr *attr);
822 int wps_attr_text(struct wpabuf *data, char *buf, char *end);
824 struct wps_er * wps_er_init(struct wps_context *wps, const char *ifname,
826 void wps_er_refresh(struct wps_er *er);
827 void wps_er_deinit(struct wps_er *er, void (*cb)(void *ctx), void *ctx);
828 void wps_er_set_sel_reg(struct wps_er *er, int sel_reg, u16 dev_passwd_id,
829 u16 sel_reg_config_methods);
830 int wps_er_pbc(struct wps_er *er, const u8 *uuid);
831 int wps_er_learn(struct wps_er *er, const u8 *uuid, const u8 *pin,
833 int wps_er_set_config(struct wps_er *er, const u8 *uuid,
834 const struct wps_credential *cred);
835 int wps_er_config(struct wps_er *er, const u8 *uuid, const u8 *pin,
836 size_t pin_len, const struct wps_credential *cred);
837 struct wpabuf * wps_er_nfc_config_token(struct wps_er *er, const u8 *uuid);
839 int wps_dev_type_str2bin(const char *str, u8 dev_type[WPS_DEV_TYPE_LEN]);
840 char * wps_dev_type_bin2str(const u8 dev_type[WPS_DEV_TYPE_LEN], char *buf,
842 void uuid_gen_mac_addr(const u8 *mac_addr, u8 *uuid);
843 u16 wps_config_methods_str2bin(const char *str);
844 struct wpabuf * wps_build_nfc_pw_token(u16 dev_pw_id,
845 const struct wpabuf *pubkey,
846 const struct wpabuf *dev_pw);
847 struct wpabuf * wps_nfc_token_gen(int ndef, int *id, struct wpabuf **pubkey,
848 struct wpabuf **privkey,
849 struct wpabuf **dev_pw);
852 struct wpabuf * ndef_parse_wifi(const struct wpabuf *buf);
853 struct wpabuf * ndef_build_wifi(const struct wpabuf *buf);
854 struct wpabuf * ndef_build_wifi_hr(void);
856 #ifdef CONFIG_WPS_STRICT
857 int wps_validate_beacon(const struct wpabuf *wps_ie);
858 int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie, int probe,
860 int wps_validate_probe_req(const struct wpabuf *wps_ie, const u8 *addr);
861 int wps_validate_assoc_req(const struct wpabuf *wps_ie);
862 int wps_validate_assoc_resp(const struct wpabuf *wps_ie);
863 int wps_validate_m1(const struct wpabuf *tlvs);
864 int wps_validate_m2(const struct wpabuf *tlvs);
865 int wps_validate_m2d(const struct wpabuf *tlvs);
866 int wps_validate_m3(const struct wpabuf *tlvs);
867 int wps_validate_m4(const struct wpabuf *tlvs);
868 int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2);
869 int wps_validate_m5(const struct wpabuf *tlvs);
870 int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2);
871 int wps_validate_m6(const struct wpabuf *tlvs);
872 int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2);
873 int wps_validate_m7(const struct wpabuf *tlvs);
874 int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap, int wps2);
875 int wps_validate_m8(const struct wpabuf *tlvs);
876 int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap, int wps2);
877 int wps_validate_wsc_ack(const struct wpabuf *tlvs);
878 int wps_validate_wsc_nack(const struct wpabuf *tlvs);
879 int wps_validate_wsc_done(const struct wpabuf *tlvs);
880 int wps_validate_upnp_set_selected_registrar(const struct wpabuf *tlvs);
881 #else /* CONFIG_WPS_STRICT */
882 static inline int wps_validate_beacon(const struct wpabuf *wps_ie){
886 static inline int wps_validate_beacon_probe_resp(const struct wpabuf *wps_ie,
887 int probe, const u8 *addr)
892 static inline int wps_validate_probe_req(const struct wpabuf *wps_ie,
898 static inline int wps_validate_assoc_req(const struct wpabuf *wps_ie)
903 static inline int wps_validate_assoc_resp(const struct wpabuf *wps_ie)
908 static inline int wps_validate_m1(const struct wpabuf *tlvs)
913 static inline int wps_validate_m2(const struct wpabuf *tlvs)
918 static inline int wps_validate_m2d(const struct wpabuf *tlvs)
923 static inline int wps_validate_m3(const struct wpabuf *tlvs)
928 static inline int wps_validate_m4(const struct wpabuf *tlvs)
933 static inline int wps_validate_m4_encr(const struct wpabuf *tlvs, int wps2)
938 static inline int wps_validate_m5(const struct wpabuf *tlvs)
943 static inline int wps_validate_m5_encr(const struct wpabuf *tlvs, int wps2)
948 static inline int wps_validate_m6(const struct wpabuf *tlvs)
953 static inline int wps_validate_m6_encr(const struct wpabuf *tlvs, int wps2)
958 static inline int wps_validate_m7(const struct wpabuf *tlvs)
963 static inline int wps_validate_m7_encr(const struct wpabuf *tlvs, int ap,
969 static inline int wps_validate_m8(const struct wpabuf *tlvs)
974 static inline int wps_validate_m8_encr(const struct wpabuf *tlvs, int ap,
980 static inline int wps_validate_wsc_ack(const struct wpabuf *tlvs)
985 static inline int wps_validate_wsc_nack(const struct wpabuf *tlvs)
990 static inline int wps_validate_wsc_done(const struct wpabuf *tlvs)
995 static inline int wps_validate_upnp_set_selected_registrar(
996 const struct wpabuf *tlvs)
1000 #endif /* CONFIG_WPS_STRICT */