Add P2P support for BRCM CFG80211 driver

Change-Id: Iafec4bedbd33836d0a64e7ea054d8a46ef8ec204
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c
index c34db91..d59e54b 100644
--- a/src/p2p/p2p_build.c
+++ b/src/p2p/p2p_build.c
@@ -164,7 +164,16 @@
 	len = wpabuf_put(buf, 2); /* IE length to be filled */
 
 	/* P2P Device address */
+#ifdef ANDROID_BRCM_P2P_PATCH
+	/* 
+	* P2P_ADDR: Supplicant uses primary mac addr for p2p and hence advertises that. To
+	* to make it compatible with solution using virtual interface for P2P, a new variable
+	* is added to hold the actual p2p device address.
+	*/
+	wpabuf_put_data(buf, p2p->cfg->p2p_dev_addr, ETH_ALEN);
+#else
 	wpabuf_put_data(buf, p2p->cfg->dev_addr, ETH_ALEN);
+#endif
 
 	/* Config Methods */
 	methods = 0;