aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2014-04-11 23:05:00 +0100
committerRicardo Cerqueira <ricardo@cyngn.com>2015-03-10 12:12:33 +0000
commitc8e1a88ac9d3c2615798890e4617bf4cfd4345e9 (patch)
tree909ac98444891ffa8cbda43e148079ceee048bbe
parent699897d2b0cdc8ff3e4cfcbb1b640135825af924 (diff)
downloadandroid_external_wpa_supplicant_8-c8e1a88ac9d3c2615798890e4617bf4cfd4345e9.tar.gz
android_external_wpa_supplicant_8-c8e1a88ac9d3c2615798890e4617bf4cfd4345e9.tar.bz2
android_external_wpa_supplicant_8-c8e1a88ac9d3c2615798890e4617bf4cfd4345e9.zip
Android: Use extended P2P functionality (ANDROID_P2P) for all vendors
Change-Id: I781ce5410bda14bc55719198e14c9ce36fa3b648 Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r--hostapd/Android.mk12
-rw-r--r--src/drivers/driver_nl80211.c27
-rw-r--r--wpa_supplicant/Android.mk15
3 files changed, 31 insertions, 23 deletions
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index bf2e2776..1df71482 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -24,10 +24,6 @@ L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
# Set Android log name
L_CFLAGS += -DANDROID_LOG_NAME=\"hostapd\"
-ifeq ($(BOARD_WLAN_DEVICE), bcmdhd)
-L_CFLAGS += -DANDROID_P2P
-endif
-
ifeq ($(BOARD_LEGACY_NL80211_STA_EVENTS),true)
L_CFLAGS += -DLEGACY_STA_EVENTS
endif
@@ -36,12 +32,10 @@ ifeq ($(BOARD_NO_APSME_ATTR),true)
L_CFLAGS += -DNO_APSME_ATTR
endif
-ifeq ($(BOARD_WLAN_DEVICE), qcwcn)
-L_CFLAGS += -DANDROID_P2P
-endif
-
-ifeq ($(BOARD_WLAN_DEVICE), mrvl)
+# Set Android extended P2P functionality
L_CFLAGS += -DANDROID_P2P
+ifeq ($(BOARD_HOSTAPD_PRIVATE_LIB),)
+L_CFLAGS += -DANDROID_P2P_STUB
endif
ifeq ($(BOARD_WIFI_SKIP_CAPABILITIES), true)
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index e221f657..1827d515 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -323,18 +323,35 @@ static int android_pno_start(struct i802_bss *bss,
static int android_pno_stop(struct i802_bss *bss);
#endif /* ANDROID */
#ifdef ANDROID_P2P
-#ifdef LEGACY_STA_EVENTS
-static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
- enum wpa_event_type type,
- const u8 *frame, size_t len);
-#endif /* LEGACY_STA_EVENTS */
+#ifdef ANDROID_P2P_STUB
+int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, int duration) {
+ return -1;
+}
+int wpa_driver_get_p2p_noa(void *priv, u8 *buf, size_t len) {
+ return -1;
+}
+int wpa_driver_set_p2p_ps(void *priv, int legacy_ps, int opp_ps, int ctwindow) {
+ return -1;
+}
+int wpa_driver_set_ap_wps_p2p_ie(void *priv, const struct wpabuf *beacon,
+ const struct wpabuf *proberesp,
+ const struct wpabuf *assocresp) {
+ return -1;
+}
+#else
int wpa_driver_set_p2p_noa(void *priv, u8 count, int start, int duration);
int wpa_driver_get_p2p_noa(void *priv, u8 *buf, size_t len);
int wpa_driver_set_p2p_ps(void *priv, int legacy_ps, int opp_ps, int ctwindow);
int wpa_driver_set_ap_wps_p2p_ie(void *priv, const struct wpabuf *beacon,
const struct wpabuf *proberesp,
const struct wpabuf *assocresp);
+#endif /* ANDROID_P2P_STUB */
+#ifdef LEGACY_STA_EVENTS
+static void mlme_event_deauth_disassoc(struct wpa_driver_nl80211_data *drv,
+ enum wpa_event_type type,
+ const u8 *frame, size_t len);
+#endif /* LEGACY_STA_EVENTS */
#endif
#ifdef HOSTAPD
static void add_ifidx(struct wpa_driver_nl80211_data *drv, int ifidx);
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index 45a9a13a..1c2d04cb 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -24,13 +24,18 @@ L_CFLAGS += -DVERSION_STR_POSTFIX=\"-$(PLATFORM_VERSION)\"
# Set Android log name
L_CFLAGS += -DANDROID_LOG_NAME=\"wpa_supplicant\"
+# Set Android extended P2P functionality
+L_CFLAGS += -DANDROID_P2P
+ifeq ($(BOARD_WPA_SUPPLICANT_PRIVATE_LIB),)
+L_CFLAGS += -DANDROID_P2P_STUB
+endif
+
# Disable roaming in wpa_supplicant
ifdef CONFIG_NO_ROAMING
L_CFLAGS += -DCONFIG_NO_ROAMING
endif
ifeq ($(BOARD_WLAN_DEVICE), bcmdhd)
-L_CFLAGS += -DANDROID_P2P
L_CFLAGS += -DP2P_CONCURRENT_SEARCH_DELAY=0
endif
@@ -38,14 +43,6 @@ ifeq ($(BOARD_NO_APSME_ATTR),true)
L_CFLAGS += -DNO_APSME_ATTR
endif
-ifeq ($(BOARD_WLAN_DEVICE), qcwcn)
-L_CFLAGS += -DANDROID_P2P
-endif
-
-ifeq ($(BOARD_WLAN_DEVICE), mrvl)
-L_CFLAGS += -DANDROID_P2P
-endif
-
ifeq ($(BOARD_LEGACY_NL80211_STA_EVENTS),true)
L_CFLAGS += -DLEGACY_STA_EVENTS
endif