Remove obsolete parameter from p2p_sd_service_update()

Bug: 9056601

Change-Id: Ia461ff500df50f1b97ad446dc14d43fa3513677b
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index 6b5679c..0fdad86 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -53,10 +53,6 @@
 	WPS_NOT_READY, WPS_PIN_DISPLAY, WPS_PIN_KEYPAD, WPS_PBC
 };
 
-enum p2p_sd_action {
-	SRV_UPDATE, SRV_ADD, SRV_DEL, SRV_FLUSH
-};
-
 /**
  * struct p2p_go_neg_results - P2P Group Owner Negotiation results
  */
@@ -147,7 +143,6 @@
 enum p2p_scan_type {
 	P2P_SCAN_SOCIAL,
 	P2P_SCAN_FULL,
-	P2P_SCAN_SPECIFIC,
 	P2P_SCAN_SOCIAL_PLUS_ONE
 };
 
@@ -1042,11 +1037,7 @@
  * of the local services. This will increment the Service Update Indicator
  * value which will be used in SD Request and Response frames.
  */
-#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
 
 
 enum p2p_invite_role {
diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h
index dc629f8..d28aae9 100644
--- a/src/p2p/p2p_i.h
+++ b/src/p2p/p2p_i.h
@@ -357,12 +357,7 @@
 	 * srv_update_indic - Service Update Indicator for local services
 	 */
 	u16 srv_update_indic;
-#ifdef ANDROID_P2P
-	/**
-	 * srv_count - Registered services count
-	 */
-	u16 srv_count;
-#endif
+
 	struct wpabuf *sd_resp; /* Fragmented SD response */
 	u8 sd_resp_addr[ETH_ALEN];
 	u8 sd_resp_dialog_token;
diff --git a/src/p2p/p2p_sd.c b/src/p2p/p2p_sd.c
index 5d9c1bb..795ca6b 100644
--- a/src/p2p/p2p_sd.c
+++ b/src/p2p/p2p_sd.c
@@ -891,33 +891,9 @@
 #endif /* CONFIG_WIFI_DISPLAY */
 
 
-#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
 }