wpa_supplicant: Update to BRCM version 0.8.0-34
- Remove interface priority
- Add action parameter to service discovery functionality
Change-Id: Ibc74c4053996e91f2f577b57695c68c86b5603c2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/p2p/p2p_sd.c b/src/p2p/p2p_sd.c
index 0509767..7a59f10 100644
--- a/src/p2p/p2p_sd.c
+++ b/src/p2p/p2p_sd.c
@@ -907,9 +907,33 @@
}
+#ifdef ANDROID_P2P
+void p2p_sd_service_update(struct p2p_data *p2p, int action)
+#else
void p2p_sd_service_update(struct p2p_data *p2p)
+#endif
{
p2p->srv_update_indic++;
+#ifdef ANDROID_P2P
+ if(action == SRV_FLUSH)
+ p2p->srv_count = 0;
+ else if (action == SRV_DEL)
+ p2p->srv_count--;
+ else if (action == SRV_ADD)
+ p2p->srv_count++;
+
+ if(p2p->cfg->sd_request) {
+ if (p2p->srv_count == 1) {
+ /* First Service Registered. Enable SD capability */
+ p2p->dev_capab |= P2P_DEV_CAPAB_SERVICE_DISCOVERY;
+ } else if (p2p->srv_count == 0 && !p2p->sd_queries) {
+ /* No services remaining + No queries registered .
+ * Remove the SD Capability
+ */
+ p2p->dev_capab &= ~P2P_DEV_CAPAB_SERVICE_DISCOVERY;
+ }
+ }
+#endif
}