aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ap/p2p_hostapd.h5
-rw-r--r--wpa_supplicant/p2p_supplicant.h1
-rw-r--r--wpa_supplicant/wps_supplicant.c4
3 files changed, 8 insertions, 2 deletions
diff --git a/src/ap/p2p_hostapd.h b/src/ap/p2p_hostapd.h
index 643ad6c..ed8aa0b 100644
--- a/src/ap/p2p_hostapd.h
+++ b/src/ap/p2p_hostapd.h
@@ -27,8 +27,9 @@ void hostapd_p2p_non_p2p_sta_disconnected(struct hostapd_data *hapd);
#else /* CONFIG_P2P */
-int hostapd_p2p_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
- char *buf, size_t buflen)
+static inline int hostapd_p2p_get_mib_sta(struct hostapd_data *hapd,
+ struct sta_info *sta,
+ char *buf, size_t buflen)
{
return 0;
}
diff --git a/wpa_supplicant/p2p_supplicant.h b/wpa_supplicant/p2p_supplicant.h
index beaa64d..c4c00ed 100644
--- a/wpa_supplicant/p2p_supplicant.h
+++ b/wpa_supplicant/p2p_supplicant.h
@@ -16,6 +16,7 @@
#define P2P_SUPPLICANT_H
enum p2p_wps_method;
+struct p2p_go_neg_results;
int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s);
void wpas_p2p_deinit(struct wpa_supplicant *wpa_s);
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 55a03e2..ef7aedc 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -692,6 +692,7 @@ int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
return -1;
ssid->temporary = 1;
ssid->p2p_group = p2p_group;
+#ifdef CONFIG_P2P
if (p2p_group && wpa_s->go_params && wpa_s->go_params->ssid_len) {
ssid->ssid = os_zalloc(wpa_s->go_params->ssid_len + 1);
if (ssid->ssid) {
@@ -702,6 +703,7 @@ int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
"SSID", ssid->ssid, ssid->ssid_len);
}
}
+#endif /* CONFIG_P2P */
wpa_config_set(ssid, "phase1", "\"pbc=1\"", 0);
if (wpa_s->wps_fragment_size)
ssid->eap.fragment_size = wpa_s->wps_fragment_size;
@@ -725,6 +727,7 @@ int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
return -1;
ssid->temporary = 1;
ssid->p2p_group = p2p_group;
+#ifdef CONFIG_P2P
if (p2p_group && wpa_s->go_params && wpa_s->go_params->ssid_len) {
ssid->ssid = os_zalloc(wpa_s->go_params->ssid_len + 1);
if (ssid->ssid) {
@@ -735,6 +738,7 @@ int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
"SSID", ssid->ssid, ssid->ssid_len);
}
}
+#endif /* CONFIG_P2P */
if (pin)
os_snprintf(val, sizeof(val), "\"pin=%s dev_pw_id=%u\"",
pin, dev_pw_id);