wlan: Remove nl broadcast events

Remove broadcast indication from driver to cnss_diag.
Added conditions to validate a pid.

Change-Id: Ic3bcb4b52a14ad046b7341c2e04c96f49e849fc2
CRs-Fixed: 844604
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index 74fb7b2..1c1eeb6 100755
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -116,64 +116,6 @@
 
 /* PID of the APP to log the message */
 static int gapp_pid = INVALID_PID;
-static char wlan_logging_ready[] = "WLAN LOGGING READY";
-
-/*
- * Broadcast Logging service ready indication to any Logging application
- * Each netlink message will have a message of type tAniMsgHdr inside.
- */
-void wlan_logging_srv_nl_ready_indication(void)
-{
-	struct sk_buff *skb = NULL;
-	struct nlmsghdr *nlh;
-	tAniNlHdr *wnl = NULL;
-	int payload_len;
-	int    err;
-	static int rate_limit;
-
-	payload_len = sizeof(tAniHdr) + sizeof(wlan_logging_ready) +
-		sizeof(wnl->radio);
-	skb = dev_alloc_skb(NLMSG_SPACE(payload_len));
-	if (NULL == skb) {
-		if (!rate_limit) {
-			LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
-					"NLINK: skb alloc fail %s", __func__);
-		}
-		rate_limit = 1;
-		return;
-	}
-	rate_limit = 0;
-
-	nlh = nlmsg_put(skb, 0, 0, ANI_NL_MSG_LOG, payload_len,
-			NLM_F_REQUEST);
-	if (NULL == nlh) {
-		LOGGING_TRACE(VOS_TRACE_LEVEL_ERROR,
-				"%s: nlmsg_put() failed for msg size[%d]",
-				__func__, payload_len);
-		kfree_skb(skb);
-		return;
-	}
-
-	wnl = (tAniNlHdr *) nlh;
-	wnl->radio = 0;
-	wnl->wmsg.type = ANI_NL_MSG_READY_IND_TYPE;
-	wnl->wmsg.length = sizeof(wlan_logging_ready);
-	memcpy((char*)&wnl->wmsg + sizeof(tAniHdr),
-			wlan_logging_ready,
-			sizeof(wlan_logging_ready));
-
-	/* sender is in group 1<<0 */
-	NETLINK_CB(skb).dst_group = WLAN_NLINK_MCAST_GRP_ID;
-
-	/*multicast the message to all listening processes*/
-	err = nl_srv_bcast(skb);
-	if (err) {
-		LOGGING_TRACE(VOS_TRACE_LEVEL_INFO_LOW,
-			"NLINK: Ready Indication Send Fail %s, err %d",
-			__func__, err);
-	}
-	return;
-}
 
 /* Utility function to send a netlink message to an application
  * in user space
@@ -750,8 +692,6 @@
 
 	nl_srv_register(ANI_NL_MSG_LOG, wlan_logging_proc_sock_rx_msg);
 
-	//Broadcast SVC ready message to logging app/s running
-	wlan_logging_srv_nl_ready_indication();
 	pr_info("%s: Activated wlan_logging svc\n", __func__);
 	return 0;
 }