18d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt/*
28d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * wpa_supplicant - P2P
38d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt * Copyright (c) 2009-2010, Atheros Communications
48d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt *
5c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * This software may be distributed under the terms of the BSD license.
6c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt * See README for more details.
78d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt */
88d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
98d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#ifndef P2P_SUPPLICANT_H
108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#define P2P_SUPPLICANT_H
118d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
128d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum p2p_wps_method;
138d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct p2p_go_neg_results;
148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum p2p_send_action_result;
158d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct p2p_peer_info;
167a5e50a0554bee77a9da492ea3d86f46147f1671Dmitry Shmidtstruct p2p_channels;
1734af306c42b7ccf956508e7cd23f0ba90606e360Dmitry Shmidtstruct wps_event_fail;
18216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidtstruct p2ps_provision;
198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
209ead16e203b81d44a2d84eadc2901ceeb7daf805Dmitry Shmidtint wpas_p2p_add_p2pdev_interface(struct wpa_supplicant *wpa_s,
219ead16e203b81d44a2d84eadc2901ceeb7daf805Dmitry Shmidt				  const char *conf_p2p_dev);
22d30ac604c9f6da71a0dd7f46d25be05a2a62cfbbDmitry Shmidtstruct wpa_supplicant * wpas_get_p2p_go_iface(struct wpa_supplicant *wpa_s,
23d30ac604c9f6da71a0dd7f46d25be05a2a62cfbbDmitry Shmidt					      const u8 *ssid, size_t ssid_len);
24d30ac604c9f6da71a0dd7f46d25be05a2a62cfbbDmitry Shmidtstruct wpa_supplicant * wpas_get_p2p_client_iface(struct wpa_supplicant *wpa_s,
25d30ac604c9f6da71a0dd7f46d25be05a2a62cfbbDmitry Shmidt						  const u8 *peer_dev_addr);
268d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_connect(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
278d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		     const char *pin, enum p2p_wps_method wps_method,
2804949598a23f501be6eec21697465fd46a28840aDmitry Shmidt		     int persistent_group, int auto_join, int join,
2904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt		     int auth, int go_intent, int freq, int persistent_id,
3068d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt		     int pd, int ht40, int vht);
3104f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidtint wpas_p2p_handle_frequency_conflicts(struct wpa_supplicant *wpa_s,
3204f534e89ed127da4077485376f24debc50d80d5Dmitry Shmidt                                          int freq, struct wpa_ssid *ssid);
338d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_group_add(struct wpa_supplicant *wpa_s, int persistent_group,
3468d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt		       int freq, int ht40, int vht);
358d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_group_add_persistent(struct wpa_supplicant *wpa_s,
368d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				  struct wpa_ssid *ssid, int addr_allocated,
3796be6222df414a7dde5c5b1b72df22e67b1a77fcDmitry Shmidt				  int force_freq, int neg_freq, int ht40,
3896be6222df414a7dde5c5b1b72df22e67b1a77fcDmitry Shmidt				  int vht, const struct p2p_channels *channels,
395605286c30e1701491bd3af974ae423727750eddDmitry Shmidt				  int connection_timeout);
408d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtstruct p2p_group * wpas_p2p_group_init(struct wpa_supplicant *wpa_s,
4104949598a23f501be6eec21697465fd46a28840aDmitry Shmidt				       struct wpa_ssid *ssid);
4204949598a23f501be6eec21697465fd46a28840aDmitry Shmidtenum wpas_p2p_prov_disc_use {
4304949598a23f501be6eec21697465fd46a28840aDmitry Shmidt	WPAS_P2P_PD_FOR_GO_NEG,
4404949598a23f501be6eec21697465fd46a28840aDmitry Shmidt	WPAS_P2P_PD_FOR_JOIN,
45216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt	WPAS_P2P_PD_AUTO,
46216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt	WPAS_P2P_PD_FOR_ASP
4704949598a23f501be6eec21697465fd46a28840aDmitry Shmidt};
488d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_prov_disc(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
4904949598a23f501be6eec21697465fd46a28840aDmitry Shmidt		       const char *config_method,
50216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt		       enum wpas_p2p_prov_disc_use use,
51216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt		       struct p2ps_provision *p2ps_prov);
528d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_send_action_tx_status(struct wpa_supplicant *wpa_s, const u8 *dst,
538d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				const u8 *data, size_t data_len,
548d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				enum p2p_send_action_result result);
558d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_scan_result_text(const u8 *ies, size_t ies_len, char *buf,
568d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			      char *end);
578d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtenum p2p_discovery_type;
588d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_find(struct wpa_supplicant *wpa_s, unsigned int timeout,
598d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		  enum p2p_discovery_type type,
60c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt		  unsigned int num_req_dev_types, const u8 *req_dev_types,
61216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt		  const u8 *dev_id, unsigned int search_delay,
62203eadb9eda41a1dde4a583edb4684319e3f399eDmitry Shmidt		  u8 seek_cnt, const char **seek_string, int freq);
638d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_p2p_stop_find(struct wpa_supplicant *wpa_s);
648d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_listen(struct wpa_supplicant *wpa_s, unsigned int timeout);
6557cea1a480975338d84f7bbc229b4dc76e030600Jithu Janceint wpas_p2p_listen_start(struct wpa_supplicant *wpa_s, unsigned int timeout);
668d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_assoc_req_ie(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
678d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			  u8 *buf, size_t len, int p2p_group);
688d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_p2p_scan_ie(struct wpa_supplicant *wpa_s, struct wpabuf *ies);
691f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtu64 wpas_p2p_sd_request(struct wpa_supplicant *wpa_s, const u8 *dst,
701f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt			const struct wpabuf *tlvs);
71216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidtu64 wpas_p2p_sd_request_asp(struct wpa_supplicant *wpa_s, const u8 *dst, u8 id,
72216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt			    const char *svc_str, const char *info_substr);
731f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtu64 wpas_p2p_sd_request_upnp(struct wpa_supplicant *wpa_s, const u8 *dst,
741f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt			     u8 version, const char *query);
7561d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidtu64 wpas_p2p_sd_request_wifi_display(struct wpa_supplicant *wpa_s,
7661d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt				     const u8 *dst, const char *role);
771f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtint wpas_p2p_sd_cancel_request(struct wpa_supplicant *wpa_s, u64 req);
788d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_p2p_sd_response(struct wpa_supplicant *wpa_s, int freq,
798d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			  const u8 *dst, u8 dialog_token,
808d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			  const struct wpabuf *resp_tlvs);
818d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_p2p_sd_service_update(struct wpa_supplicant *wpa_s);
828d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_p2p_service_flush(struct wpa_supplicant *wpa_s);
838d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_service_add_bonjour(struct wpa_supplicant *wpa_s,
848d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				 struct wpabuf *query, struct wpabuf *resp);
858d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_service_del_bonjour(struct wpa_supplicant *wpa_s,
868d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt				 const struct wpabuf *query);
878d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_service_add_upnp(struct wpa_supplicant *wpa_s, u8 version,
888d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			      const char *service);
898d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_service_del_upnp(struct wpa_supplicant *wpa_s, u8 version,
908d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			      const char *service);
91216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidtint wpas_p2p_service_add_asp(struct wpa_supplicant *wpa_s, int auto_accept,
92216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt			     u32 adv_id, const char *adv_str, u8 svc_state,
93216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidt			     u16 config_methods, const char *svc_info);
94216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidtint wpas_p2p_service_del_asp(struct wpa_supplicant *wpa_s, u32 adv_id);
95dda10c2afb8378747491ea5d329a1de635d6d58eDmitry Shmidtvoid wpas_p2p_service_flush_asp(struct wpa_supplicant *wpa_s);
96216983bceec7c450951e2fbcd076b5c75d432e57Dmitry Shmidtint wpas_p2p_service_p2ps_id_exists(struct wpa_supplicant *wpa_s, u32 adv_id);
97f73259cc00af557e36add405799b7f2326587c13Dmitry Shmidtvoid wpas_sd_request(void *ctx, int freq, const u8 *sa, u8 dialog_token,
98f73259cc00af557e36add405799b7f2326587c13Dmitry Shmidt		     u16 update_indic, const u8 *tlvs, size_t tlvs_len);
99f73259cc00af557e36add405799b7f2326587c13Dmitry Shmidtvoid wpas_sd_response(void *ctx, const u8 *sa, u16 update_indic,
100f73259cc00af557e36add405799b7f2326587c13Dmitry Shmidt		      const u8 *tlvs, size_t tlvs_len);
1018d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_reject(struct wpa_supplicant *wpa_s, const u8 *addr);
1028d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_invite(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
10331be0a4b946ecab910c0a9af3837dbccea5d204bJouni Malinen		    struct wpa_ssid *ssid, const u8 *go_dev_addr, int freq,
10468d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt		    int ht40, int vht, int pref_freq);
1058d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_invite_group(struct wpa_supplicant *wpa_s, const char *ifname,
1068d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			  const u8 *peer_addr, const u8 *go_dev_addr);
1078d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_presence_req(struct wpa_supplicant *wpa_s, u32 duration1,
1088d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			  u32 interval1, u32 duration2, u32 interval2);
1098d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_ext_listen(struct wpa_supplicant *wpa_s, unsigned int period,
1108d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt			unsigned int interval);
1112b89da85b8cfe9bb862e8dd334855263c3522c00Jouni Malinenint wpas_p2p_deauth_notif(struct wpa_supplicant *wpa_s, const u8 *bssid,
1122b89da85b8cfe9bb862e8dd334855263c3522c00Jouni Malinen			  u16 reason_code, const u8 *ie, size_t ie_len,
1132b89da85b8cfe9bb862e8dd334855263c3522c00Jouni Malinen			  int locally_generated);
1148d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtvoid wpas_p2p_disassoc_notif(struct wpa_supplicant *wpa_s, const u8 *bssid,
11504949598a23f501be6eec21697465fd46a28840aDmitry Shmidt			     u16 reason_code, const u8 *ie, size_t ie_len,
11604949598a23f501be6eec21697465fd46a28840aDmitry Shmidt			     int locally_generated);
1178d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_set_noa(struct wpa_supplicant *wpa_s, u8 count, int start,
1188d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt		     int duration);
1198d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_set_cross_connect(struct wpa_supplicant *wpa_s, int enabled);
1208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_cancel(struct wpa_supplicant *wpa_s);
1218d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_unauthorize(struct wpa_supplicant *wpa_s, const char *addr);
1228d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidtint wpas_p2p_disconnect(struct wpa_supplicant *wpa_s);
1231f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtstruct wpa_ssid * wpas_p2p_get_persistent(struct wpa_supplicant *wpa_s,
124c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt					  const u8 *addr, const u8 *ssid,
125c5ec7f57ead87efa365800228aa0b09a12d9e6c4Dmitry Shmidt					  size_t ssid_len);
1261f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidtvoid wpas_p2p_notify_ap_sta_authorized(struct wpa_supplicant *wpa_s,
1271f69aa52ea2e0a73ac502565df8c666ee49cab6aDmitry Shmidt				       const u8 *addr);
12804949598a23f501be6eec21697465fd46a28840aDmitry Shmidtint wpas_p2p_scan_no_go_seen(struct wpa_supplicant *wpa_s);
12961d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidtint wpas_p2p_get_ht40_mode(struct wpa_supplicant *wpa_s,
13061d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidt			   struct hostapd_hw_modes *mode, u8 channel);
13168d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidtint wpas_p2p_get_vht80_center(struct wpa_supplicant *wpa_s,
13268d0e3ed07847339aedfac8e02f50db68c702e52Dmitry Shmidt			      struct hostapd_hw_modes *mode, u8 channel);
13361d9df3e62aaa0e87ad05452fcb95142159a17b6Dmitry Shmidtunsigned int wpas_p2p_search_delay(struct wpa_supplicant *wpa_s);
134391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtvoid wpas_p2p_new_psk_cb(struct wpa_supplicant *wpa_s, const u8 *mac_addr,
135391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt			 const u8 *p2p_dev_addr,
136391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt			 const u8 *psk, size_t psk_len);
137391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtvoid wpas_p2p_remove_client(struct wpa_supplicant *wpa_s, const u8 *peer,
138391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt			    int iface_addr);
139cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidtstruct wpabuf * wpas_p2p_nfc_handover_req(struct wpa_supplicant *wpa_s,
140cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt					  int ndef);
141cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidtstruct wpabuf * wpas_p2p_nfc_handover_sel(struct wpa_supplicant *wpa_s,
142cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt					  int ndef, int tag);
143cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidtint wpas_p2p_nfc_tag_process(struct wpa_supplicant *wpa_s,
144cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt			     const struct wpabuf *data, int forced_freq);
145cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidtint wpas_p2p_nfc_report_handover(struct wpa_supplicant *wpa_s, int init,
146cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt				 const struct wpabuf *req,
147cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidt				 const struct wpabuf *sel, int forced_freq);
148cf32e60fa7e0d33fe1551a6dba8dcbbec47ea50eDmitry Shmidtint wpas_p2p_nfc_tag_enabled(struct wpa_supplicant *wpa_s, int enabled);
149df5a7e4c5c64890c2425bb47d665bbce4992b676Dmitry Shmidtvoid wpas_p2p_pbc_overlap_cb(void *eloop_ctx, void *timeout_ctx);
1508d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt
15137d4d6a4efea4ef4f864347ac8ed8d62a9e19f90Dmitry Shmidt#ifdef CONFIG_P2P
15243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
15343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtint wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s);
15443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_deinit(struct wpa_supplicant *wpa_s);
15543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_completed(struct wpa_supplicant *wpa_s);
15643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_update_config(struct wpa_supplicant *wpa_s);
15743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtint wpas_p2p_probe_req_rx(struct wpa_supplicant *wpa_s, const u8 *addr,
15843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			  const u8 *dst, const u8 *bssid,
15943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			  const u8 *ie, size_t ie_len,
160a3dc30964aa24aea2b518246f6812663a1103490Dmitry Shmidt			  unsigned int rx_freq, int ssi_signal);
16143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_wps_success(struct wpa_supplicant *wpa_s, const u8 *peer_addr,
16243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			  int registrar);
16343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s);
16443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_update_best_channels(struct wpa_supplicant *wpa_s,
16543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				   int freq_24, int freq_5, int freq_overall);
16643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_rx_action(struct wpa_supplicant *wpa_s, const u8 *da,
16743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			const u8 *sa, const u8 *bssid,
16843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			u8 category, const u8 *data, size_t len, int freq);
16943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
17043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				   unsigned int freq, unsigned int duration);
17143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
17243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt					  unsigned int freq);
17343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_interface_unavailable(struct wpa_supplicant *wpa_s);
17443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_notif_connected(struct wpa_supplicant *wpa_s);
17543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_notif_disconnected(struct wpa_supplicant *wpa_s);
17643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtint wpas_p2p_notif_pbc_overlap(struct wpa_supplicant *wpa_s);
177391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtint wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s);
178391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtvoid wpas_p2p_ap_setup_failed(struct wpa_supplicant *wpa_s);
17943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_indicate_state_change(struct wpa_supplicant *wpa_s);
18043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_deinit_iface(struct wpa_supplicant *wpa_s);
18143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_ap_deinit(struct wpa_supplicant *wpa_s);
18243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_network_removed(struct wpa_supplicant *wpa_s,
18343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			      struct wpa_ssid *ssid);
18443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtint wpas_p2p_in_progress(struct wpa_supplicant *wpa_s);
18543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtint wpas_p2p_wps_eapol_cb(struct wpa_supplicant *wpa_s);
18643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtvoid wpas_p2p_wps_failed(struct wpa_supplicant *wpa_s,
18743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt			 struct wps_event_fail *fail);
1886c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidtint wpas_p2p_group_remove(struct wpa_supplicant *wpa_s, const char *ifname);
18943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
19037d4d6a4efea4ef4f864347ac8ed8d62a9e19f90Dmitry Shmidt#else /* CONFIG_P2P */
19143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
19243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline int
19343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtwpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
19443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
19543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt	return 0;
19643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
19743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
19843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_deinit(struct wpa_supplicant *wpa_s)
19943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
20043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
20143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
20243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_completed(struct wpa_supplicant *wpa_s)
20343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
20443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
20543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
20643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_update_config(struct wpa_supplicant *wpa_s)
20743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
20843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
20943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
21043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline int wpas_p2p_probe_req_rx(struct wpa_supplicant *wpa_s,
21143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt					const u8 *addr,
21243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt					const u8 *dst, const u8 *bssid,
21343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt					const u8 *ie, size_t ie_len,
214a3dc30964aa24aea2b518246f6812663a1103490Dmitry Shmidt					unsigned int rx_freq, int ssi_signal)
21543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
21643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt	return 0;
21743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
21843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
21943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_wps_success(struct wpa_supplicant *wpa_s,
22043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt					const u8 *peer_addr, int registrar)
22143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
22243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
22343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
22443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_update_channel_list(struct wpa_supplicant *wpa_s)
22543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
22643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
22743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
22843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_update_best_channels(struct wpa_supplicant *wpa_s,
22943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt						 int freq_24, int freq_5,
23043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt						 int freq_overall)
23143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
23243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
23343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
23443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_rx_action(struct wpa_supplicant *wpa_s,
23543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				      const u8 *da,
23643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				      const u8 *sa, const u8 *bssid,
23743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				      u8 category, const u8 *data, size_t len,
23843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				      int freq)
23943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
24043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
24143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
24243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
24343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt						 unsigned int freq,
24443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt						 unsigned int duration)
24543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
24643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
24743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
24843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void
24943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtwpas_p2p_cancel_remain_on_channel_cb(struct wpa_supplicant *wpa_s,
25043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				     unsigned int freq)
25143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
25243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
25343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
25443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_interface_unavailable(struct wpa_supplicant *wpa_s)
25543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
25643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
25743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
25843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_notif_connected(struct wpa_supplicant *wpa_s)
25943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
26043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
26143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
26243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_notif_disconnected(struct wpa_supplicant *wpa_s)
26343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
26443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
26543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
26643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline int wpas_p2p_notif_pbc_overlap(struct wpa_supplicant *wpa_s)
26743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
26843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt	return 0;
26943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
27043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
271391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtstatic inline int wpas_p2p_4way_hs_failed(struct wpa_supplicant *wpa_s)
272391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt{
273391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt	return 0;
274391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt}
275391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt
276391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidtstatic inline void wpas_p2p_ap_setup_failed(struct wpa_supplicant *wpa_s)
277391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt{
278391c59f0632df8db1c325da1d31d479b2eedce45Dmitry Shmidt}
27943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
28043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_indicate_state_change(struct wpa_supplicant *wpa_s)
28143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
28243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
28343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
28443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_deinit_iface(struct wpa_supplicant *wpa_s)
28543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
28643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
28743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
28843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_ap_deinit(struct wpa_supplicant *wpa_s)
28943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
29043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
29143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
29243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_network_removed(struct wpa_supplicant *wpa_s,
29343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt					    struct wpa_ssid *ssid)
29443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
29543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
29643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
29743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline int wpas_p2p_in_progress(struct wpa_supplicant *wpa_s)
29843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
29943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt	return 0;
30043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
30143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
30243cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline int wpas_p2p_wps_eapol_cb(struct wpa_supplicant *wpa_s)
30343cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
30443cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt	return 0;
30543cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
30643cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
30743cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidtstatic inline void wpas_p2p_wps_failed(struct wpa_supplicant *wpa_s,
30843cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt				       struct wps_event_fail *fail)
30943cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt{
31043cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt}
31143cb578dfe2c492257636f6234a24178ed27789eDmitry Shmidt
3126c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidtstatic inline int wpas_p2p_group_remove(struct wpa_supplicant *wpa_s,
3136c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidt					const char *ifname)
3146c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidt{
3156c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidt	return 0;
3166c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidt}
3176c0da2bb83f6915d8260912362692d1a742e057bDmitry Shmidt
31837d4d6a4efea4ef4f864347ac8ed8d62a9e19f90Dmitry Shmidt#endif /* CONFIG_P2P */
31937d4d6a4efea4ef4f864347ac8ed8d62a9e19f90Dmitry Shmidt
3208d520ff1dc2da35cdca849e982051b86468016d8Dmitry Shmidt#endif /* P2P_SUPPLICANT_H */
321