Cumulative patch from commit 2cebdee66de6a1c6befe327c2348610478e06032

2cebdee Fix MinGW build
e4fa8b1 wpa_supplicant: Add Wake-on-WLAN configuration support
959214b Android: Use extended P2P functionality (ANDROID_P2P) for all vendors
9a41232 TDLS: Fully tear down existing link before setup
c04b465 TDLS: Disable links during AP deauth in external flow
b19719a TDLS: Make wpa_tdls_send_teardown() static
52f5877 nl80211: Take ownership of dynamically added interfaces
e390df0 nl80211: Cancel rfkill timeout on deinit
fa258a3 HS 2.0 R2: Fix writing of domain_suffix_match cred parameter
bb24229 TDLS: Pass peer's capability info to the driver in open mode

Change-Id: I20b4dba96c07a85cf7b9c9c4ae51bbf9f6f88540
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/wpa_supplicant/Android.mk b/wpa_supplicant/Android.mk
index f56267c..ca9d82d 100644
--- a/wpa_supplicant/Android.mk
+++ b/wpa_supplicant/Android.mk
@@ -27,24 +27,21 @@
 # Disable unused parameter warnings
 L_CFLAGS += -Wno-unused-parameter
 
+# 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
 
-ifeq ($(BOARD_WLAN_DEVICE), qcwcn)
-L_CFLAGS += -DANDROID_P2P
-endif
-
-ifeq ($(BOARD_WLAN_DEVICE), mrvl)
-L_CFLAGS += -DANDROID_P2P
-endif
-
 # Use Android specific directory for control interface sockets
 L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/misc/wifi/sockets\"
 L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/system/wpa_supplicant\"