Эх сурвалжийг харах

qcacld-3.0: Use logging wrappers for HDD logs

Several logs are using QDF_TRACE with QDF_MODULE_ID_HDD directly.
Migrate these calls to the hdd_* logging wrappers instead.

Change-Id: I191014f0fd1ae55db71393655d96407ffa5953cb
CRs-Fixed: 2209514
Dustin Brown 7 жил өмнө
parent
commit
a2868623a0

+ 8 - 18
core/hdd/src/wlan_hdd_cfg80211.c

@@ -12866,8 +12866,7 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
 	err = wlan_cfg80211_nla_parse(tb, STATS_SET_MAX, data, data_len,
 				      qca_wlan_vendor_set_nud_stats);
 	if (err) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s STATS_SET_START ATTR", __func__);
+		hdd_err("STATS_SET_START ATTR");
 		return err;
 	}
 
@@ -12877,8 +12876,7 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
 	}
 
 	if (adapter->device_mode != QDF_STA_MODE) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s STATS supported in only STA mode !!", __func__);
+		hdd_err("STATS supported in only STA mode!");
 		return -EINVAL;
 	}
 
@@ -12899,9 +12897,7 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
 				return err;
 		} else {
 			if (!tb[STATS_GW_IPV4]) {
-				QDF_TRACE(QDF_MODULE_ID_HDD,
-					  QDF_TRACE_LEVEL_ERROR,
-					  "%s STATS_SET_START CMD", __func__);
+				hdd_err("STATS_SET_START CMD");
 				return -EINVAL;
 			}
 
@@ -12942,16 +12938,13 @@ static int __wlan_hdd_cfg80211_set_nud_stats(struct wiphy *wiphy,
 		}
 	}
 
-	QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
-		  "%s STATS_SET_START Received flag %d!!", __func__,
-		  arp_stats_params.flag);
+	hdd_info("STATS_SET_START Received flag %d!", arp_stats_params.flag);
 
 	arp_stats_params.vdev_id = adapter->session_id;
 
 	if (QDF_STATUS_SUCCESS !=
 	    sme_set_nud_debug_stats(hdd_ctx->hHal, &arp_stats_params)) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s STATS_SET_START CMD Failed!!", __func__);
+		hdd_err("STATS_SET_START CMD Failed!");
 		return -EINVAL;
 	}
 
@@ -13085,8 +13078,7 @@ static int hdd_populate_dns_stats_info(struct hdd_adapter *adapter,
 
 	dns_query = qdf_mem_malloc(adapter->track_dns_domain_len + 1);
 	if (!dns_query) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s: mem alloc fail.", __func__);
+		hdd_err("mem alloc fail");
 		return -EINVAL;
 	}
 
@@ -13382,8 +13374,7 @@ static int __wlan_hdd_cfg80211_get_nud_stats(struct wiphy *wiphy,
 		return err;
 
 	if (adapter->device_mode != QDF_STA_MODE) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s STATS supported in only STA mode !!", __func__);
+		hdd_err("STATS supported in only STA mode!");
 		return -EINVAL;
 	}
 
@@ -13404,8 +13395,7 @@ static int __wlan_hdd_cfg80211_get_nud_stats(struct wiphy *wiphy,
 
 	if (QDF_STATUS_SUCCESS !=
 	    sme_get_nud_debug_stats(hdd_ctx->hHal, &arp_stats_params)) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s STATS_SET_START CMD Failed!!", __func__);
+		hdd_err("STATS_SET_START CMD Failed!");
 		return -EINVAL;
 	}
 

+ 2 - 5
core/hdd/src/wlan_hdd_hostapd.c

@@ -1817,9 +1817,7 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
 		hostapd_state->bss_state = BSS_START;
 
 		/* Set default key index */
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
-			"%s: default key index %hu", __func__,
-			ap_ctx->wep_def_key_idx);
+		hdd_debug("default key index %hu", ap_ctx->wep_def_key_idx);
 
 		sme_roam_set_default_key_index(
 			WLAN_HDD_GET_HAL_CTX(adapter),
@@ -3488,8 +3486,7 @@ static __iw_softap_setparam(struct net_device *dev,
 		ret = cds_get_datapath_handles(&soc, &pdev, &vdev,
 				 adapter->session_id);
 		if (ret != 0) {
-			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-				"Invalid Handles");
+			hdd_err("Invalid Handles");
 			break;
 		}
 		req.stats = set_value;

+ 1 - 2
core/hdd/src/wlan_hdd_ioctl.c

@@ -5815,8 +5815,7 @@ static int drv_cmd_enable_ext_wow(struct hdd_adapter *adapter,
 	value = value + command_len;
 
 	if (!(sscanf(value, "%d", &set_value))) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
-			  ("No input identified"));
+		hdd_info("No input identified");
 		return -EINVAL;
 	}
 

+ 3 - 5
core/hdd/src/wlan_hdd_main.c

@@ -11156,9 +11156,8 @@ void wlan_hdd_send_svc_nlink_msg(int radio, int type, void *data, int len)
 		radio_info->length = (unsigned short) sizeof(radio_info->radio);
 		radio_info->radio = radio;
 		tlv_len = sizeof(*radio_info);
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
-			"Added radio index tlv - radio index %d",
-			radio_info->radio);
+		hdd_debug("Added radio index tlv - radio index %d",
+			  radio_info->radio);
 	}
 
 	nlh->nlmsg_len += tlv_len;
@@ -12656,8 +12655,7 @@ static int hdd_update_dp_config(struct hdd_context *hdd_ctx)
 					cds_get_context(QDF_MODULE_ID_SOC),
 					&params);
 	if (status) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			"%s: Failed to attach config parameters", __func__);
+		hdd_err("Failed to attach config parameters");
 		return status;
 	}
 

+ 1 - 2
core/hdd/src/wlan_hdd_tdls.c

@@ -662,8 +662,7 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
 			 TRACE_CODE_HDD_CFG80211_TDLS_OPER,
 			 adapter->session_id, oper));
 	if (NULL == peer) {
-		QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-			  "%s: Invalid arguments", __func__);
+		hdd_err("Invalid arguments");
 		return -EINVAL;
 	}
 

+ 1 - 2
core/hdd/src/wlan_hdd_wext.c

@@ -6305,8 +6305,7 @@ static int __iw_setint_getnone(struct net_device *dev,
 				       adapter->session_id);
 
 		if (ret != 0) {
-			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-				"Invalid handles");
+			hdd_err("Invalid handles");
 			break;
 		}
 

+ 2 - 4
core/sme/src/common/sme_api.c

@@ -10442,8 +10442,7 @@ QDF_STATUS sme_set_auto_shutdown_timer(tHalHandle hHal, uint32_t timer_val)
 		auto_sh_cmd = (tSirAutoShutdownCmdParams *)
 			      qdf_mem_malloc(sizeof(tSirAutoShutdownCmdParams));
 		if (auto_sh_cmd == NULL) {
-			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-				  "%s Request Buffer Alloc Fail", __func__);
+			sme_err("Request Buffer Alloc Fail");
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_NOMEM;
 		}
@@ -10493,8 +10492,7 @@ QDF_STATUS sme_ch_avoid_update_req(tHalHandle hHal)
 		cauReq = (tSirChAvoidUpdateReq *)
 			 qdf_mem_malloc(sizeof(tSirChAvoidUpdateReq));
 		if (NULL == cauReq) {
-			QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
-				  "%s Request Buffer Alloc Fail", __func__);
+			sme_err("Request Buffer Alloc Fail");
 			sme_release_global_lock(&pMac->sme);
 			return QDF_STATUS_E_NOMEM;
 		}