Fix build without CONFIG_P2P=y
authorJouni Malinen <jouni.malinen@atheros.com>
Thu, 9 Sep 2010 14:20:28 +0000 (07:20 -0700)
committerJouni Malinen <j@w1.fi>
Thu, 9 Sep 2010 14:20:28 +0000 (07:20 -0700)
src/ap/p2p_hostapd.h
wpa_supplicant/p2p_supplicant.h
wpa_supplicant/wps_supplicant.c

index 643ad6c..ed8aa0b 100644 (file)
@@ -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;
 }
index beaa64d..c4c00ed 100644 (file)
@@ -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);
index 55a03e2..ef7aedc 100644 (file)
@@ -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);