فهرست منبع

qcacld-3.0: Fix incorrect use of CDS logging APIs within HDD

It was observed that logs from some HDD functions were tagged with the
QDF module ID. Code analysis showed some HDD functions are using cds_*
logging APIs instead of hdd_* logging APIs. Replace the cds APIs with
the hdd APIs.

Change-Id: I38edb7b5491d0d2d1412b41d3ae6e129ebc4dbe0
CRs-Fixed: 2090970
Jeff Johnson 7 سال پیش
والد
کامیت
6867ec3361
4فایلهای تغییر یافته به همراه24 افزوده شده و 24 حذف شده
  1. 1 1
      core/hdd/src/wlan_hdd_cfg80211.c
  2. 10 10
      core/hdd/src/wlan_hdd_ipa.c
  3. 12 12
      core/hdd/src/wlan_hdd_main.c
  4. 1 1
      core/hdd/src/wlan_hdd_power.c

+ 1 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -9504,7 +9504,7 @@ __wlan_hdd_cfg80211_avoid_freq(struct wiphy *wiphy,
 	ENTER_DEV(wdev->netdev);
 	ENTER_DEV(wdev->netdev);
 
 
 	if (!qdf_ctx) {
 	if (!qdf_ctx) {
-		cds_err("qdf_ctx is NULL");
+		hdd_err("qdf_ctx is NULL");
 		return -EINVAL;
 		return -EINVAL;
 	}
 	}
 
 

+ 10 - 10
core/hdd/src/wlan_hdd_ipa.c

@@ -1347,13 +1347,13 @@ void hdd_ipa_set_tx_flow_info(void)
 
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
 	if (!hdd_ctx) {
-		cds_err("HDD context is NULL");
+		hdd_err("HDD context is NULL");
 		return;
 		return;
 	}
 	}
 
 
 	cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
 	cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
 	if (!cds_ctx) {
 	if (!cds_ctx) {
-		cds_err("Invalid CDS Context");
+		hdd_err("Invalid CDS Context");
 		return;
 		return;
 	}
 	}
 
 
@@ -1451,7 +1451,7 @@ void hdd_ipa_set_tx_flow_info(void)
 				cdp_fc_ll_set_tx_pause_q_depth(soc,
 				cdp_fc_ll_set_tx_pause_q_depth(soc,
 					adapter->sessionId,
 					adapter->sessionId,
 					hdd_ctx->config->TxFlowMaxQueueDepth);
 					hdd_ctx->config->TxFlowMaxQueueDepth);
-				cds_info("MODE %d,CH %d,LWM %d,HWM %d,TXQDEP %d",
+				hdd_info("MODE %d,CH %d,LWM %d,HWM %d,TXQDEP %d",
 				    adapter->device_mode,
 				    adapter->device_mode,
 				    targetChannel,
 				    targetChannel,
 				    adapter->tx_flow_low_watermark,
 				    adapter->tx_flow_low_watermark,
@@ -1477,7 +1477,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						adapter->sessionId,
 						adapter->sessionId,
 						hdd_ctx->config->
 						hdd_ctx->config->
 						TxHbwFlowMaxQueueDepth);
 						TxHbwFlowMaxQueueDepth);
-					cds_info("SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+					hdd_info("SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
 					       hdd_device_mode_to_string(
 					       hdd_device_mode_to_string(
 							adapter->device_mode),
 							adapter->device_mode),
 					       adapter->device_mode,
 					       adapter->device_mode,
@@ -1490,7 +1490,7 @@ void hdd_ipa_set_tx_flow_info(void)
 					       TxHbwFlowMaxQueueDepth);
 					       TxHbwFlowMaxQueueDepth);
 
 
 					if (!preAdapterContext) {
 					if (!preAdapterContext) {
-						cds_err("SCC: Previous adapter context NULL");
+						hdd_err("SCC: Previous adapter context NULL");
 						continue;
 						continue;
 					}
 					}
 
 
@@ -1503,7 +1503,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						preAdapterContext->sessionId,
 						preAdapterContext->sessionId,
 						hdd_ctx->config->
 						hdd_ctx->config->
 						TxHbwFlowMaxQueueDepth);
 						TxHbwFlowMaxQueueDepth);
-					cds_info("SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+					hdd_info("SCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
 					       hdd_device_mode_to_string(
 					       hdd_device_mode_to_string(
 						preAdapterContext->device_mode
 						preAdapterContext->device_mode
 							  ),
 							  ),
@@ -1539,7 +1539,7 @@ void hdd_ipa_set_tx_flow_info(void)
 					}
 					}
 
 
 					if (!adapter5) {
 					if (!adapter5) {
-						cds_err("MCC: 5GHz adapter context NULL");
+						hdd_err("MCC: 5GHz adapter context NULL");
 						continue;
 						continue;
 					}
 					}
 					adapter5->tx_flow_low_watermark =
 					adapter5->tx_flow_low_watermark =
@@ -1553,7 +1553,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						adapter5->sessionId,
 						adapter5->sessionId,
 						hdd_ctx->config->
 						hdd_ctx->config->
 						TxHbwFlowMaxQueueDepth);
 						TxHbwFlowMaxQueueDepth);
-					cds_info("MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+					hdd_info("MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
 					    hdd_device_mode_to_string(
 					    hdd_device_mode_to_string(
 						    adapter5->device_mode),
 						    adapter5->device_mode),
 					    adapter5->device_mode,
 					    adapter5->device_mode,
@@ -1567,7 +1567,7 @@ void hdd_ipa_set_tx_flow_info(void)
 					    TxHbwFlowMaxQueueDepth);
 					    TxHbwFlowMaxQueueDepth);
 
 
 					if (!adapter2_4) {
 					if (!adapter2_4) {
-						cds_err("MCC: 2.4GHz adapter context NULL");
+						hdd_err("MCC: 2.4GHz adapter context NULL");
 						continue;
 						continue;
 					}
 					}
 					adapter2_4->tx_flow_low_watermark =
 					adapter2_4->tx_flow_low_watermark =
@@ -1581,7 +1581,7 @@ void hdd_ipa_set_tx_flow_info(void)
 						adapter2_4->sessionId,
 						adapter2_4->sessionId,
 						hdd_ctx->config->
 						hdd_ctx->config->
 						TxLbwFlowMaxQueueDepth);
 						TxLbwFlowMaxQueueDepth);
-					cds_info("MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
+					hdd_info("MCC: MODE %s(%d), CH %d, LWM %d, HWM %d, TXQDEP %d",
 						hdd_device_mode_to_string(
 						hdd_device_mode_to_string(
 						    adapter2_4->device_mode),
 						    adapter2_4->device_mode),
 						adapter2_4->device_mode,
 						adapter2_4->device_mode,

+ 12 - 12
core/hdd/src/wlan_hdd_main.c

@@ -12383,17 +12383,17 @@ void hdd_restart_sap(struct hdd_adapter *ap_adapter)
 					SME_CMD_TIMEOUT_VALUE);
 					SME_CMD_TIMEOUT_VALUE);
 
 
 			if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 			if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-				cds_err("SAP Stop Failed");
+				hdd_err("SAP Stop Failed");
 				goto end;
 				goto end;
 			}
 			}
 		}
 		}
 		clear_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
 		clear_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
 		policy_mgr_decr_session_set_pcl(hdd_ctx->hdd_psoc,
 		policy_mgr_decr_session_set_pcl(hdd_ctx->hdd_psoc,
 			ap_adapter->device_mode, ap_adapter->sessionId);
 			ap_adapter->device_mode, ap_adapter->sessionId);
-		cds_err("SAP Stop Success");
+		hdd_err("SAP Stop Success");
 
 
 		if (0 != wlan_hdd_cfg80211_update_apies(ap_adapter)) {
 		if (0 != wlan_hdd_cfg80211_update_apies(ap_adapter)) {
-			cds_err("SAP Not able to set AP IEs");
+			hdd_err("SAP Not able to set AP IEs");
 			wlansap_reset_sap_config_add_ie(sap_config,
 			wlansap_reset_sap_config_add_ie(sap_config,
 					eUPDATE_IE_ALL);
 					eUPDATE_IE_ALL);
 			goto end;
 			goto end;
@@ -12403,23 +12403,23 @@ void hdd_restart_sap(struct hdd_adapter *ap_adapter)
 		if (wlansap_start_bss(sap_ctx, hdd_hostapd_sap_event_cb,
 		if (wlansap_start_bss(sap_ctx, hdd_hostapd_sap_event_cb,
 				      sap_config,
 				      sap_config,
 				      ap_adapter->dev) != QDF_STATUS_SUCCESS) {
 				      ap_adapter->dev) != QDF_STATUS_SUCCESS) {
-			cds_err("SAP Start Bss fail");
+			hdd_err("SAP Start Bss fail");
 			wlansap_reset_sap_config_add_ie(sap_config,
 			wlansap_reset_sap_config_add_ie(sap_config,
 					eUPDATE_IE_ALL);
 					eUPDATE_IE_ALL);
 			goto end;
 			goto end;
 		}
 		}
 
 
-		cds_info("Waiting for SAP to start");
+		hdd_info("Waiting for SAP to start");
 		qdf_status =
 		qdf_status =
 			qdf_wait_single_event(&hostapd_state->qdf_event,
 			qdf_wait_single_event(&hostapd_state->qdf_event,
 					SME_CMD_TIMEOUT_VALUE);
 					SME_CMD_TIMEOUT_VALUE);
 		wlansap_reset_sap_config_add_ie(sap_config,
 		wlansap_reset_sap_config_add_ie(sap_config,
 				eUPDATE_IE_ALL);
 				eUPDATE_IE_ALL);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
-			cds_err("SAP Start failed");
+			hdd_err("SAP Start failed");
 			goto end;
 			goto end;
 		}
 		}
-		cds_err("SAP Start Success");
+		hdd_err("SAP Start Success");
 		set_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
 		set_bit(SOFTAP_BSS_STARTED, &ap_adapter->event_flags);
 		if (hostapd_state->bssState == BSS_START)
 		if (hostapd_state->bssState == BSS_START)
 			policy_mgr_incr_active_session(hdd_ctx->hdd_psoc,
 			policy_mgr_incr_active_session(hdd_ctx->hdd_psoc,
@@ -12448,19 +12448,19 @@ void hdd_check_and_restart_sap_with_non_dfs_acs(void)
 
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
 	if (!hdd_ctx) {
-		cds_err("HDD context is NULL");
+		hdd_err("HDD context is NULL");
 		return;
 		return;
 	}
 	}
 
 
 	cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
 	cds_ctx = cds_get_context(QDF_MODULE_ID_QDF);
 	if (!cds_ctx) {
 	if (!cds_ctx) {
-		cds_err("Invalid CDS Context");
+		hdd_err("Invalid CDS Context");
 		return;
 		return;
 	}
 	}
 
 
 	if (policy_mgr_get_concurrency_mode(hdd_ctx->hdd_psoc)
 	if (policy_mgr_get_concurrency_mode(hdd_ctx->hdd_psoc)
 		!= (QDF_STA_MASK | QDF_SAP_MASK)) {
 		!= (QDF_STA_MASK | QDF_SAP_MASK)) {
-		cds_info("Concurrency mode is not SAP");
+		hdd_info("Concurrency mode is not SAP");
 		return;
 		return;
 	}
 	}
 
 
@@ -12470,7 +12470,7 @@ void hdd_check_and_restart_sap_with_non_dfs_acs(void)
 			wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev,
 			wlan_reg_is_dfs_ch(hdd_ctx->hdd_pdev,
 				ap_adapter->sessionCtx.ap.operatingChannel)) {
 				ap_adapter->sessionCtx.ap.operatingChannel)) {
 
 
-		cds_warn("STA-AP Mode DFS not supported. Restart SAP with Non DFS ACS");
+		hdd_warn("STA-AP Mode DFS not supported. Restart SAP with Non DFS ACS");
 		ap_adapter->sessionCtx.ap.sapConfig.channel =
 		ap_adapter->sessionCtx.ap.sapConfig.channel =
 			AUTO_CHANNEL_SELECT;
 			AUTO_CHANNEL_SELECT;
 		ap_adapter->sessionCtx.ap.sapConfig.
 		ap_adapter->sessionCtx.ap.sapConfig.
@@ -12497,7 +12497,7 @@ bool hdd_set_connection_in_progress(bool value)
 
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
 	if (!hdd_ctx) {
-		cds_err("HDD context is NULL");
+		hdd_err("HDD context is NULL");
 		return false;
 		return false;
 	}
 	}
 
 

+ 1 - 1
core/hdd/src/wlan_hdd_power.c

@@ -1707,7 +1707,7 @@ static void hdd_suspend_cb(void)
 
 
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (!hdd_ctx) {
 	if (!hdd_ctx) {
-		cds_err("HDD context is NULL");
+		hdd_err("HDD context is NULL");
 		return;
 		return;
 	}
 	}