qcacld-3.0: Reduce the info level logs in STA/SAP

qcacld-2.0 to qcacld-3.0 propagation

Reduce the info level logs in STA/SAP

Change-Id: I5918ea8e9dd2f7654e5a994ad366f92d2ca3cd77
CRs-Fixed: 988195
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index d1464e4..5b1a322 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -164,8 +164,9 @@
 	hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 
 	/* save the new connection state */
-	hddLog(LOG1, FL("ConnectionState Changed from oldState:%d to State:%d"),
-	       pHddStaCtx->conn_info.connState, connState);
+	hdd_info("%pS Changed connectionState Changed from oldState:%d to State:%d",
+		(void *)_RET_IP_, pHddStaCtx->conn_info.connState,
+		connState);
 	pHddStaCtx->conn_info.connState = connState;
 
 	/* Check is pending ROC request or not when connection state changed */
@@ -1073,8 +1074,6 @@
 
 	if (pHddStaCtx->conn_info.connState != eConnectionState_Disconnecting) {
 		INIT_COMPLETION(pAdapter->disconnect_comp_var);
-		hddLog(LOG1,
-			FL("Set HDD connState to eConnectionState_Disconnecting"));
 		hdd_conn_set_connection_state(pAdapter,
 					      eConnectionState_Disconnecting);
 	}
@@ -1197,7 +1196,6 @@
 	}
 	/* Clear saved connection information in HDD */
 	hdd_conn_remove_connect_info(pHddStaCtx);
-	hddLog(LOG1, FL("Set HDD connState to eConnectionState_NotConnected"));
 	hdd_conn_set_connection_state(pAdapter, eConnectionState_NotConnected);
 #ifdef WLAN_FEATURE_GTK_OFFLOAD
 	if ((QDF_STA_MODE == pAdapter->device_mode) ||
@@ -1831,7 +1829,6 @@
 			return QDF_STATUS_E_FAILURE;
 		}
 		if (!hddDisconInProgress) {
-			hddLog(LOG1, FL("Set HDD connState to eConnectionState_Associated"));
 			hdd_conn_set_connection_state(pAdapter,
 						   eConnectionState_Associated);
 		}
@@ -2386,8 +2383,6 @@
 		 */
 		if (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus
 		    && !hddDisconInProgress) {
-			hddLog(LOG1,
-				FL("state to eConnectionState_NotConnected"));
 			hdd_conn_set_connection_state(pAdapter,
 					eConnectionState_NotConnected);
 		}
@@ -2458,8 +2453,6 @@
 		 * connection state to IBSS Disconnected (meaning no peers
 		 * are in the IBSS).
 		 */
-		hddLog(LOG1,
-			FL("Set HDD connState to eConnectionState_IbssDisconnected"));
 		hdd_conn_set_connection_state(pAdapter,
 				      eConnectionState_IbssDisconnected);
 		/* notify wmm */
@@ -2673,7 +2666,6 @@
 					    tCsrRoamInfo *pRoamInfo)
 {
 	struct cfg80211_bss *bss;
-	hddLog(LOG1, FL("IBSS Connect Indication from SME. Set HDD connState to eConnectionState_IbssConnected"));
 	/*
 	 * Set the internal connection state to show 'IBSS Connected' (IBSS with
 	 * a partner stations).
@@ -2906,8 +2898,6 @@
 		wlan_hdd_netif_queue_control(pAdapter,
 					   WLAN_NETIF_TX_DISABLE_N_CARRIER,
 					   WLAN_CONTROL_PATH);
-		hddLog(LOG1,
-			FL("Set HDD connState to eConnectionState_NotConnected"));
 		hdd_conn_set_connection_state(pAdapter,
 					      eConnectionState_NotConnected);
 
@@ -4695,7 +4685,6 @@
 	hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
 	tCsrRoamProfile *pRoamProfile = &(pWextState->roamProfile);
 	hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
-	ENTER();
 
 	pRoamProfile->AuthType.numEntries = 1;
 	hddLog(LOG1, FL("pHddStaCtx->conn_info.authType = %d"),
@@ -4819,7 +4808,6 @@
 	hddLog(LOG1, FL("Set roam Authtype to %d"),
 	       pWextState->roamProfile.AuthType.authType[0]);
 
-	EXIT();
 	return 0;
 }
 
@@ -4855,7 +4843,7 @@
 
 	hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	if (pAdapter->device_mode != QDF_STA_MODE &&
@@ -5019,11 +5007,9 @@
 	 * informed of connect result indication which is an issue.
 	 */
 	if (QDF_STA_MODE == pAdapter->device_mode ||
-			QDF_P2P_CLIENT_MODE == pAdapter->device_mode) {
-		hdd_info("Set HDD connState to eConnectionState_Connecting");
+			QDF_P2P_CLIENT_MODE == pAdapter->device_mode)
 		hdd_conn_set_connection_state(pAdapter,
 				eConnectionState_Connecting);
-	}
 
 	status = sme_roam_connect(hHal, pAdapter->sessionId,
 				  &(pWextState->roamProfile), &roamId);
@@ -5088,7 +5074,7 @@
 
 	hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated &&
@@ -5158,7 +5144,7 @@
 
 	hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	switch (wrqu->param.flags & IW_AUTH_INDEX) {
@@ -5405,7 +5391,7 @@
 
 	hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	switch (pRoamProfile->negotiatedAuthType) {
@@ -5564,7 +5550,7 @@
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	pMacAddress = (uint8_t *) wrqu->ap_addr.sa_data;
@@ -5622,7 +5608,7 @@
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	if (pHddStaCtx->conn_info.connState == eConnectionState_Associated ||
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index 521f6bc..6f90bfb 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -332,7 +332,6 @@
 	int32_t val;
 
 	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is invalid"));
 		return;
 	}
 
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0b88ead..8b96096 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -1429,10 +1429,9 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		goto out;
-	}
+
 	sap_config = &adapter->sessionCtx.ap.sapConfig;
 	qdf_mem_zero(&sap_config->acs_cfg, sizeof(struct sap_acs_cfg));
 
@@ -1802,8 +1801,8 @@
 	}
 
 	ret = wlan_hdd_validate_context(pHddCtx);
-	if (0 != ret)
-		return -EINVAL;
+	if (ret)
+		return ret;
 
 	if (wiphy->interface_modes & BIT(NL80211_IFTYPE_STATION)) {
 		hddLog(LOG1, FL("Infra Station mode is supported by driver"));
@@ -1943,7 +1942,7 @@
 	}
 
 	ret = wlan_hdd_validate_context(pHddCtx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	if (false == pHddCtx->config->enable_mac_spoofing) {
@@ -2041,10 +2040,8 @@
 	}
 
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret) {
-		hdd_err("HDD context is not valid");
+	if (ret)
 		return ret;
-	}
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_GET_CONCURRENCY_MATRIX_MAX,
 			data, data_len, NULL)) {
@@ -2302,10 +2299,8 @@
 	}
 
 	ret = wlan_hdd_validate_context(pHddCtx);
-	if (0 != ret) {
-		hddLog(LOGE, FL("HDD context is not valid"));
-		return -EINVAL;
-	}
+	if (ret)
+		return ret;
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ROAMING_PARAM_MAX,
 		data, data_len,
@@ -2742,11 +2737,8 @@
 	ENTER_DEV(dev);
 
 	ret_val = wlan_hdd_validate_context(hdd_ctx);
-
-	if (ret_val) {
-		hdd_err("HDD context is not valid");
+	if (ret_val)
 		return ret_val;
-	}
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_SET_NO_DFS_FLAG_MAX,
 		      data, data_len,
@@ -2936,10 +2928,9 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx_ptr);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is invalid"));
+	if (status)
 		return status;
-	}
+
 	sme_update_roam_key_mgmt_offload_enabled(hdd_ctx_ptr->hHal,
 			hdd_adapter_ptr->sessionId,
 			true);
@@ -3016,10 +3007,8 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
-		return -EINVAL;
-	}
+	if (status)
+		return status;
 
 	if (nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_WIFI_INFO_GET_MAX, data,
 		      data_len, qca_wlan_vendor_get_wifi_info_policy)) {
@@ -3115,10 +3104,8 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
-		return -EINVAL;
-	}
+	if (status)
+		return status;
 
 	features = 0;
 
@@ -3208,10 +3195,8 @@
 	eCsrAuthType auth_type;
 	ENTER();
 
-	if (wlan_hdd_validate_context(hdd_ctx_ptr)) {
-		hddLog(QDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid "));
+	if (wlan_hdd_validate_context(hdd_ctx_ptr))
 		return -EINVAL;
-	}
 
 	if (!roaming_offload_enabled(hdd_ctx_ptr) ||
 			!roam_info_ptr->roamSynchInProgress)
@@ -3357,10 +3342,8 @@
 	}
 
 	ret_val = wlan_hdd_validate_context(hdd_ctx);
-	if (ret_val) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (ret_val)
 		return ret_val;
-	}
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_CONFIG_MAX,
 		      data, data_len,
@@ -3490,10 +3473,9 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
-		return -EINVAL;
-	}
+	if (status)
+		return status;
+
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_START_MAX,
 				data, data_len,
@@ -3616,10 +3598,8 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
-		return -EINVAL;
-	}
+	if (status)
+		return status;
 
 	if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_WIFI_LOGGER_GET_RING_DATA_MAX,
 			data, data_len,
@@ -4011,7 +3991,7 @@
 	}
 
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
+	if (ret)
 		return ret;
 
 	if (!sme_is_feature_supported_by_fw(WLAN_PERIODIC_TX_PTRN)) {
@@ -4122,8 +4102,8 @@
 	ENTER_DEV(dev);
 
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret)
-		return -EINVAL;
+	if (ret)
+		return ret;
 
 	if (!hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
 		hddLog(LOGE, FL("Not in Connected state!"));
@@ -7908,8 +7888,6 @@
 	struct timespec ts;
 	struct hdd_config *cfg_param;
 
-	ENTER();
-
 	pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	status = wlan_hdd_validate_context(pHddCtx);
 	if (0 != status)
@@ -8022,7 +8000,6 @@
 		cfg80211_inform_bss_frame(wiphy, chan, mgmt, frame_len, rssi,
 					  GFP_KERNEL);
 	kfree(mgmt);
-	EXIT();
 	return bss_status;
 }
 
@@ -8042,8 +8019,6 @@
 	tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
 	struct cfg80211_bss *bss = NULL;
 
-	ENTER();
-
 	memset(&roamProfile, 0, sizeof(tCsrRoamConnectedProfile));
 	sme_roam_get_connect_profile(hHal, pAdapter->sessionId, &roamProfile);
 
@@ -8059,7 +8034,6 @@
 	} else {
 		hddLog(LOGE, FL("roamProfile.pBssDesc is NULL"));
 	}
-	EXIT();
 	return bss;
 }
 /**
@@ -8748,11 +8722,9 @@
 		 * is an issue.
 		 */
 		if (QDF_STA_MODE == pAdapter->device_mode ||
-			QDF_P2P_CLIENT_MODE == pAdapter->device_mode) {
-			hdd_info("Set HDD connState to eConnectionState_Connecting");
+			QDF_P2P_CLIENT_MODE == pAdapter->device_mode)
 			hdd_conn_set_connection_state(pAdapter,
 			eConnectionState_Connecting);
-		}
 
 		status = sme_roam_connect(WLAN_HDD_GET_HAL_CTX(pAdapter),
 					  pAdapter->sessionId, pRoamProfile,
@@ -8796,8 +8768,6 @@
 	hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
 	hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
 
-	ENTER();
-
 	/*set authentication type */
 	switch (auth_type) {
 	case NL80211_AUTHTYPE_AUTOMATIC:
@@ -8851,8 +8821,6 @@
 {
 	hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
 
-	ENTER();
-
 #define WLAN_AKM_SUITE_8021X_SHA256 0x000FAC05
 #define WLAN_AKM_SUITE_PSK_SHA256   0x000FAC06
 	/*set key mgmt type */
@@ -8916,8 +8884,6 @@
 	hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
 	hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
 
-	ENTER();
-
 	if (!cipher) {
 		hdd_info("received cipher %d - considering none", cipher);
 		encryptionType = eCSR_ENCRYPT_TYPE_NONE;
@@ -9006,7 +8972,6 @@
 	uint16_t akmsuiteCount;
 	int *akmlist;
 #endif
-	ENTER();
 
 	/* clear previous assocAddIE */
 	pWextState->assocAddIE.length = 0;
@@ -9275,7 +9240,6 @@
 		genie += eLen;
 		remLen -= eLen;
 	}
-	EXIT();
 	return 0;
 }
 
@@ -9510,7 +9474,6 @@
 		}
 	}
 disconnected:
-	hdd_info("Set HDD connState to eConnectionState_NotConnected");
 	hdd_conn_set_connection_state(pAdapter, eConnectionState_NotConnected);
 	return result;
 }
@@ -9702,8 +9665,6 @@
 		result = -ETIMEDOUT;
 	}
 disconnected:
-	hddLog(LOG1,
-		FL("Set HDD connState to eConnectionState_NotConnected"));
 	hdd_conn_set_connection_state(pAdapter, eConnectionState_NotConnected);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)
 	/* Sending disconnect event to userspace for kernel version < 3.11
@@ -11778,11 +11739,8 @@
 
 	pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	status = wlan_hdd_validate_context(pHddCtx);
-
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return status;
-	}
 
 	qdf_mem_zero(&sme_config, sizeof(tSmeConfigParams));
 	sme_get_config_param(pHddCtx->hHal, &sme_config);
diff --git a/core/hdd/src/wlan_hdd_driver_ops.c b/core/hdd/src/wlan_hdd_driver_ops.c
index 11f23f2..8c0e656 100644
--- a/core/hdd/src/wlan_hdd_driver_ops.c
+++ b/core/hdd/src/wlan_hdd_driver_ops.c
@@ -612,10 +612,8 @@
 	void *hif_ctx = cds_get_context(QDF_MODULE_ID_HIF);
 	int status = wlan_hdd_validate_context(hdd_ctx);
 
-	if (0 != status) {
-		hdd_err("HDD context is not valid");
+	if (status)
 		return status;
-	}
 
 	status = hif_bus_resume(hif_ctx);
 	QDF_BUG(!status);
diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c
index 83f0154..2bae7fb 100644
--- a/core/hdd/src/wlan_hdd_green_ap.c
+++ b/core/hdd/src/wlan_hdd_green_ap.c
@@ -288,10 +288,8 @@
 	struct hdd_context_s *hdd_ctx = ctx;
 	struct hdd_green_ap_ctx *green_ap;
 
-	if (0 != wlan_hdd_validate_context(hdd_ctx)) {
-		hdd_err("HDD context is not valid");
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return;
-	}
 
 	green_ap = hdd_ctx->green_ap_ctx;
 	if (green_ap)
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 085c965..5c36dd4 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -2038,10 +2038,8 @@
 
 	pHddCtx = WLAN_HDD_GET_CTX(pHostapdAdapter);
 	ret = wlan_hdd_validate_context(pHddCtx);
-	if (ret) {
-		hddLog(LOGE, FL("invalid HDD context"));
+	if (ret)
 		return ret;
-	}
 
 	ret = hdd_validate_channel_and_bandwidth(pHostapdAdapter,
 						target_channel, target_bw);
@@ -2162,10 +2160,8 @@
 
 	pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	ret = wlan_hdd_validate_context(pHddCtx);
-	if (ret != 0) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (ret)
 		return ret;
-	}
 
 	hddLog(LOG1, FL("Received data %s"), extra);
 
@@ -6579,11 +6575,9 @@
 
 	pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	status = wlan_hdd_validate_context(pHddCtx);
-
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return status;
-	}
+
 
 	/*
 	 * Do freq to chan conversion
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index ded6f9b..9ac7f00 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -1856,10 +1856,8 @@
 	int rc;
 
 	rc = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != rc) {
-		hdd_err("HDD context is not valid");
+	if (rc)
 		return;
-	}
 	hdd_ctx->ext_wow_should_suspend = is_success;
 	complete(&hdd_ctx->ready_to_extwow);
 }
@@ -1930,10 +1928,8 @@
 	int rc;
 
 	rc = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != rc) {
-		hdd_err("HDD context is not valid");
-		return -EINVAL;
-	}
+	if (rc)
+		return rc;
 
 	if (value < EXT_WOW_TYPE_APP_TYPE1 ||
 	    value > EXT_WOW_TYPE_APP_TYPE1_2) {
@@ -1993,10 +1989,8 @@
 	int rc;
 
 	rc = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != rc) {
-		hdd_err("HDD context is not valid");
-		return -EINVAL;
-	}
+	if (rc)
+		return rc;
 
 	if (2 != sscanf(arg, "%8s %16s", id, password)) {
 		hdd_err("Invalid Number of arguments");
@@ -2049,10 +2043,8 @@
 	int ret;
 
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret) {
-		hdd_err("HDD context is not valid");
-		return -EINVAL;
-	}
+	if (ret)
+		return ret;
 
 	memset(&params, 0, sizeof(tSirAppType2Params));
 
@@ -4682,10 +4674,8 @@
 	uint8_t *value;
 
 	pHddCtx = WLAN_HDD_GET_CTX(adapter);
-	if (0 != wlan_hdd_validate_context(pHddCtx)) {
-		hdd_err("pHddCtx is not valid, Unable to set miracast mode");
+	if (wlan_hdd_validate_context(pHddCtx))
 		return -EINVAL;
-	}
 
 	hHal = pHddCtx->hHal;
 	value = command + 9;
diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c
index 90e6c72..69cbf00 100644
--- a/core/hdd/src/wlan_hdd_ipa.c
+++ b/core/hdd/src/wlan_hdd_ipa.c
@@ -1226,10 +1226,8 @@
 	 * When SSR is going on or driver is unloading, just return.
 	 */
 	status = wlan_hdd_validate_context(hdd_ipa->hdd_ctx);
-	if (0 != status) {
-		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "HDD context is not valid");
+	if (status)
 		return;
-	}
 
 	if (!hdd_ipa_is_rm_enabled(hdd_ipa->hdd_ctx))
 		return;
@@ -1359,8 +1357,7 @@
 	 * When SSR is going on or driver is unloading, just return.
 	 */
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "HDD context is not valid");
+	if (status) {
 		qdf_mem_free(op_msg);
 		return;
 	}
@@ -1706,10 +1703,8 @@
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "HDD context is not valid");
+	if (status)
 		goto end;
-	}
 
 	msg = (struct op_msg_type *)op_msg;
 	hdd_ipa = ((hdd_context_t *)hdd_ctx)->hdd_ipa;
@@ -2824,8 +2819,7 @@
 	 * connect back any way
 	 */
 	status = wlan_hdd_validate_context(hdd_ipa->hdd_ctx);
-	if (0 != status) {
-		HDD_IPA_LOG(QDF_TRACE_LEVEL_ERROR, "HDD context is not valid");
+	if (status) {
 		ipa_free_skb(ipa_tx_desc);
 		iface_context->stats.num_tx_drop++;
 		return;
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 6f6d799..56a054c 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -520,19 +520,19 @@
 int wlan_hdd_validate_context(hdd_context_t *hdd_ctx)
 {
 	if (NULL == hdd_ctx || NULL == hdd_ctx->config) {
-		hddLog(LOGE, FL("HDD context is Null"));
+		hdd_err("%pS HDD context is Null", (void *)_RET_IP_);
 		return -ENODEV;
 	}
 
 	if (cds_is_driver_recovering()) {
-		hdd_err("Recovery in Progress. State: 0x%x Ignore!!!",
-			 cds_get_driver_state());
+		hdd_err("%pS Recovery in Progress. State: 0x%x Ignore!!!",
+			(void *)_RET_IP_, cds_get_driver_state());
 		return -EAGAIN;
 	}
 
 	if (cds_is_load_or_unload_in_progress()) {
-		hdd_err("Unloading/Loading in Progress. Ignore!!!: 0x%x",
-			cds_get_driver_state());
+		hdd_err("%pS Unloading/Loading in Progress. Ignore!!!: 0x%x",
+			(void *)_RET_IP_, cds_get_driver_state());
 		return -EAGAIN;
 	}
 	return 0;
@@ -1486,10 +1486,9 @@
 			 adapter->sessionId, adapter->device_mode));
 
 	ret = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != ret) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (ret)
 		return ret;
-	}
+
 
 	set_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
 	if (hdd_conn_is_connected(WLAN_HDD_GET_STATION_CTX_PTR(adapter))) {
@@ -4260,10 +4259,9 @@
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return status;
-	}
+
 	if (!hdd_ctx->hHal)
 		return -EINVAL;
 
@@ -4294,10 +4292,9 @@
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return status;
-	}
+
 	if (!hdd_ctx->hHal)
 		return -EINVAL;
 
@@ -7070,11 +7067,9 @@
 
 	hdd_ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(ap_adapter);
 	hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter);
-	if (0 != wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(QDF_TRACE_LEVEL_ERROR,
-		       FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return;
-	}
+
 	mutex_lock(&hdd_ctx->sap_lock);
 	if (test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags)) {
 		wlan_hdd_del_station(ap_adapter);
@@ -7140,11 +7135,9 @@
 	hostapd_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(ap_adapter);
 	sap_config = &ap_adapter->sessionCtx.ap.sapConfig;
 
-	if (0 != wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(QDF_TRACE_LEVEL_ERROR,
-		       FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return;
-	}
+
 	mutex_lock(&hdd_ctx->sap_lock);
 	if (test_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags))
 		goto end;
diff --git a/core/hdd/src/wlan_hdd_memdump.c b/core/hdd/src/wlan_hdd_memdump.c
index 568adfc..0434a69 100644
--- a/core/hdd/src/wlan_hdd_memdump.c
+++ b/core/hdd/src/wlan_hdd_memdump.c
@@ -72,10 +72,9 @@
 	qdf_device_t qdf_ctx;
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return;
-	}
+
 
 	if (!hdd_ctx->fw_dump_loc) {
 		hddLog(LOG1, FL("Memory dump already freed"));
@@ -116,10 +115,9 @@
 	int status;
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return;
-	}
+
 
 	spin_lock(&hdd_context_lock);
 	context = &fw_dump_context;
@@ -152,10 +150,9 @@
 	int status;
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (status)
 		return status;
-	}
+
 
 	skb = cfg80211_vendor_cmd_alloc_reply_skb(hdd_ctx->wiphy,
 			NLMSG_HDRLEN + NLA_HDRLEN + sizeof(uint32_t));
@@ -211,10 +208,9 @@
 	ENTER_DEV(wdev->netdev);
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is invalid"));
+	if (status)
 		return status;
-	}
+
 
 	qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 	if (!qdf_ctx) {
@@ -403,10 +399,9 @@
 
 	hddLog(LOG1, FL("Read req for size:%zu pos:%llu"), count, *pos);
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is not valid"));
-		return -EINVAL;
-	}
+	if (status)
+		return status;
+
 	qdf_ctx = cds_get_context(QDF_MODULE_ID_QDF_DEVICE);
 	if (!qdf_ctx) {
 		hddLog(LOGE, FL("QDF context is NULL"));
diff --git a/core/hdd/src/wlan_hdd_nan.c b/core/hdd/src/wlan_hdd_nan.c
index c88ac46..cbf3a68 100644
--- a/core/hdd/src/wlan_hdd_nan.c
+++ b/core/hdd/src/wlan_hdd_nan.c
@@ -139,10 +139,8 @@
 	}
 
 	status = wlan_hdd_validate_context(hdd_ctx);
-	if (0 != status) {
-		hdd_err("HDD context is not valid");
+	if (status)
 		return;
-	}
 
 	vendor_event =
 		cfg80211_vendor_event_alloc(hdd_ctx->wiphy,
diff --git a/core/hdd/src/wlan_hdd_ocb.c b/core/hdd/src/wlan_hdd_ocb.c
index 93c4bc0..71e6fdd 100644
--- a/core/hdd/src/wlan_hdd_ocb.c
+++ b/core/hdd/src/wlan_hdd_ocb.c
@@ -489,10 +489,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(WLAN_HDD_GET_CTX(adapter))) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(WLAN_HDD_GET_CTX(adapter)))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -798,10 +796,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -993,10 +989,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -1106,10 +1100,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -1226,10 +1218,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -1354,10 +1344,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -1544,10 +1532,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -1711,10 +1697,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return -EINVAL;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
@@ -1832,10 +1816,8 @@
 
 	ENTER_DEV(dev);
 
-	if (wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		goto end;
-	}
 
 	if (adapter->device_mode != QDF_OCB_MODE) {
 		hddLog(LOGE, FL("Device not in OCB mode!"));
diff --git a/core/hdd/src/wlan_hdd_oemdata.c b/core/hdd/src/wlan_hdd_oemdata.c
index ffe9de1..c3d4ec7 100644
--- a/core/hdd/src/wlan_hdd_oemdata.c
+++ b/core/hdd/src/wlan_hdd_oemdata.c
@@ -795,11 +795,8 @@
 	}
 
 	ret = wlan_hdd_validate_context(p_hdd_ctx);
-	if (0 != ret) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  FL("HDD context is not valid"));
+	if (ret)
 		return ret;
-	}
 
 	msg_hdr = NLMSG_DATA(nlh);
 
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 89a2574..e7bd331 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -794,7 +794,6 @@
 	qdf_spin_lock(&hdd_ctx->hdd_roc_req_q_lock);
 	if (list_empty(&hdd_ctx->hdd_roc_req_q.anchor)) {
 		qdf_spin_unlock(&hdd_ctx->hdd_roc_req_q_lock);
-		hdd_debug("list is empty");
 		return;
 	}
 	status = qdf_list_remove_front(&hdd_ctx->hdd_roc_req_q,
diff --git a/core/hdd/src/wlan_hdd_power.c b/core/hdd/src/wlan_hdd_power.c
index 35130a8..ec6763b 100644
--- a/core/hdd/src/wlan_hdd_power.c
+++ b/core/hdd/src/wlan_hdd_power.c
@@ -596,10 +596,8 @@
 	hdd_info("Configuring ARP Offload");
 	pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 	status = wlan_hdd_validate_context(pHddCtx);
-	if (0 != status) {
-		hddLog(LOGE, FL("HDD context is invalid"));
+	if (status)
 		return;
-	}
 
 	if (!pHddCtx->config->active_mode_offload) {
 		hdd_err("Active mode offload is disabled");
diff --git a/core/hdd/src/wlan_hdd_regulatory.c b/core/hdd/src/wlan_hdd_regulatory.c
index e0570b9..7c204db 100644
--- a/core/hdd/src/wlan_hdd_regulatory.c
+++ b/core/hdd/src/wlan_hdd_regulatory.c
@@ -314,20 +314,20 @@
 			chan->flags &= ~IEEE80211_CHAN_DISABLED;
 
 			if (!(reg_rule->flags & NL80211_RRF_DFS)) {
-				hdd_info("%s: remove dfs restriction for %u",
-					 __func__, chan->center_freq);
+				hdd_info("Remove dfs restriction for %u",
+					chan->center_freq);
 				chan->flags &= ~IEEE80211_CHAN_RADAR;
 			}
 
 			if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN)) {
-				hdd_info("%s: remove passive restriction for %u",
-					 __func__, chan->center_freq);
+				hdd_info("Remove passive restriction for %u",
+					chan->center_freq);
 				chan->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
 			}
 
 			if (!(reg_rule->flags & NL80211_RRF_NO_IBSS)) {
-				hdd_info("%s: remove no ibss restriction for %u",
-					 __func__, chan->center_freq);
+				hdd_info("Remove no ibss restriction for %u",
+					chan->center_freq);
 				chan->flags &= ~IEEE80211_CHAN_NO_IBSS;
 			}
 
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 0764354..6cf5a50 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -990,11 +990,8 @@
 	int status;
 
 	status = wlan_hdd_validate_context(pHddCtx);
-
-	if (0 != status) {
-		hddLog(QDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+	if (status)
 		return;
-	}
 
 	pAdapter = hdd_get_adapter_by_vdev(pHddCtx,
 					   linkLayerStatsResults->ifaceId);
@@ -1603,12 +1600,9 @@
 	hdd_adapter_t *pAdapter = NULL;
 
 	status = wlan_hdd_validate_context(pHddCtx);
-
-	if (0 != status) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s: HDD context is not valid", __func__);
+	if (status)
 		return;
-	}
+
 
 	pAdapter = hdd_get_adapter_by_vdev(pHddCtx, data->vdev_id);
 
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index a0077b4..6d458c3 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -1066,11 +1066,8 @@
 		return;
 	}
 	pHddCtx = WLAN_HDD_GET_CTX(curr_peer->pHddTdlsCtx->pAdapter);
-	if (0 != (wlan_hdd_validate_context(pHddCtx))) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  FL("pHddCtx is not valid"));
+	if ((wlan_hdd_validate_context(pHddCtx)))
 		return;
-	}
 	hddLog(QDF_TRACE_LEVEL_WARN,
 	       "tdls set peer " MAC_ADDRESS_STR " link status to %u",
 	       MAC_ADDR_ARRAY(curr_peer->peerMac), status);
@@ -1123,11 +1120,9 @@
 	hddTdlsPeer_t *curr_peer;
 	hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 
-	if (0 != (wlan_hdd_validate_context(pHddCtx))) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  FL("pHddCtx is not valid"));
+	if (wlan_hdd_validate_context(pHddCtx))
 		return;
-	}
+
 	curr_peer = wlan_hdd_tdls_find_peer(pAdapter, mac, true);
 	if (curr_peer == NULL) {
 		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
@@ -2163,11 +2158,8 @@
 {
 	hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 
-	if (0 != (wlan_hdd_validate_context(pHddCtx))) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  FL("pHddCtx is not valid"));
+	if (wlan_hdd_validate_context(pHddCtx))
 		return 0;
-	}
 
 	return pHddCtx->connected_peer_count;
 }
@@ -3527,10 +3519,8 @@
 	ENTER();
 
 	ret = wlan_hdd_validate_context(pHddCtx);
-	if (0 != ret) {
-		hddLog(QDF_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+	if (ret)
 		return ret;
-	}
 
 	if ((eTDLS_SUPPORT_NOT_ENABLED == pHddCtx->tdls_mode) ||
 	    (eTDLS_SUPPORT_DISABLED == pHddCtx->tdls_mode)) {
@@ -3781,11 +3771,8 @@
 			 TRACE_CODE_HDD_CFG80211_TDLS_MGMT,
 			 pAdapter->sessionId, action_code));
 
-	if (0 != wlan_hdd_validate_context(pHddCtx)) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s: HDD context is not valid", __func__);
+	if (wlan_hdd_validate_context(pHddCtx))
 		return -EINVAL;
-	}
 
 	if (eTDLS_SUPPORT_NOT_ENABLED == pHddCtx->tdls_mode) {
 		hddLog(LOG1,
@@ -4711,10 +4698,9 @@
 	tdlsCtx_t *hdd_tdls_ctx;
 	hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
-	if (0 != (wlan_hdd_validate_context(hdd_ctx))) {
-		hddLog(LOGE, FL("hdd_ctx is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return NULL;
-	}
+
 	mutex_lock(&hdd_ctx->tdls_lock);
 	hdd_tdls_ctx = WLAN_HDD_GET_TDLS_CTX_PTR(adapter);
 	if (NULL == hdd_tdls_ctx) {
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 69af499..b4627d6 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -1543,11 +1543,8 @@
 	int ret;
 
 	ret = wlan_hdd_validate_context(hddctx);
-
-	if (0 != ret) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (ret)
 		return ret;
-	}
 
 	if (eConnectionState_Associated != hdd_stactx->conn_info.connState) {
 		/* we are not connected so we don't have a classAstats */
@@ -7635,12 +7632,9 @@
 		hdd_station_ctx_t *pHddStaCtx;
 		pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
 		status = wlan_hdd_validate_context(pHddCtx);
-		if (0 != status) {
-			hddLog(LOGE,
-			       "%s: getSNR: HDD context is not valid",
-			       __func__);
+		if (status)
 			return status;
-		}
+
 		pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
 		if (0 == pHddCtx->config->fEnableSNRMonitoring ||
 		    eConnectionState_Associated !=
diff --git a/core/hdd/src/wlan_hdd_wmm.c b/core/hdd/src/wlan_hdd_wmm.c
index 5fbfb17..7ecbb79 100644
--- a/core/hdd/src/wlan_hdd_wmm.c
+++ b/core/hdd/src/wlan_hdd_wmm.c
@@ -1122,10 +1122,8 @@
 	pAdapter = pQosContext->pAdapter;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(pAdapter);
-	if (0 != wlan_hdd_validate_context(hdd_ctx)) {
-		hddLog(LOGE, FL("HDD context is not valid"));
+	if (wlan_hdd_validate_context(hdd_ctx))
 		return;
-	}
 
 	acType = pQosContext->acType;
 	pAc = &pAdapter->hddWmmStatus.wmmAcStatus[acType];