Browse Source

qcacld-3.0: Optimize logs in scan path

Remove redundant logs and optimize the logs in scan path.

Change-Id: Ie6ff84b1a832a29d5fe01c649be4b8143bd13c94
CRs-Fixed: 2612637
Abhishek Singh 5 years ago
parent
commit
48175fd4f7

+ 1 - 3
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -951,10 +951,8 @@ bool policy_mgr_is_dbs_scan_allowed(struct wlan_objmgr_psoc *psoc)
 	}
 
 	if (!policy_mgr_find_if_fw_supports_dbs(psoc) ||
-	    !policy_mgr_find_if_hwlist_has_dbs(psoc)) {
-		policy_mgr_debug("HW mode list has no DBS");
+	    !policy_mgr_find_if_hwlist_has_dbs(psoc))
 		return false;
-	}
 
 	policy_mgr_get_dual_mac_feature(psoc, &dbs_type);
 	/*

+ 3 - 8
components/tdls/core/src/wlan_tdls_main.c

@@ -1688,21 +1688,16 @@ void tdls_scan_done_callback(struct tdls_soc_priv_obj *tdls_soc)
 		return;
 
 	if (TDLS_SUPPORT_DISABLED == tdls_soc->tdls_current_mode) {
-		tdls_debug("TDLS mode is disabled OR not enabled");
+		tdls_debug_rl("TDLS mode is disabled OR not enabled");
 		return;
 	}
 
 	/* if tdls was enabled before scan, re-enable tdls mode */
 	if (TDLS_SUPPORT_IMP_MODE == tdls_soc->tdls_last_mode ||
 	    TDLS_SUPPORT_EXT_CONTROL == tdls_soc->tdls_last_mode ||
-	    TDLS_SUPPORT_EXP_TRIG_ONLY == tdls_soc->tdls_last_mode) {
-		tdls_debug("revert tdls mode %d",
-			   tdls_soc->tdls_last_mode);
-
+	    TDLS_SUPPORT_EXP_TRIG_ONLY == tdls_soc->tdls_last_mode)
 		tdls_set_current_mode(tdls_soc, tdls_soc->tdls_last_mode,
-				      false,
-				      TDLS_SET_MODE_SOURCE_SCAN);
-	}
+				      false, TDLS_SET_MODE_SOURCE_SCAN);
 }
 
 /**

+ 0 - 4
core/hdd/src/wlan_hdd_cfg80211.c

@@ -23103,8 +23103,6 @@ static void wlan_hdd_chan_info_cb(struct scan_chan_info *info)
 	struct scan_chan_info *chan;
 	uint8_t idx;
 
-	hdd_enter();
-
 	hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 	if (wlan_hdd_validate_context(hdd_ctx) != 0) {
 		hdd_err("hdd_ctx is invalid");
@@ -23133,8 +23131,6 @@ static void wlan_hdd_chan_info_cb(struct scan_chan_info *info)
 
 		}
 	}
-
-	hdd_exit();
 }
 
 /**

+ 6 - 8
core/hdd/src/wlan_hdd_main.c

@@ -15899,18 +15899,15 @@ static QDF_STATUS hdd_is_connection_in_progress_iterator(
 
 	mac_handle = hdd_ctx->mac_handle;
 
-	hdd_debug("Adapter with device mode %s(%d) exists",
-		  qdf_opmode_str(adapter->device_mode),
-		  adapter->device_mode);
 	if (((QDF_STA_MODE == adapter->device_mode)
 		|| (QDF_P2P_CLIENT_MODE == adapter->device_mode)
 		|| (QDF_P2P_DEVICE_MODE == adapter->device_mode))
 		&& (eConnectionState_Connecting ==
 			(WLAN_HDD_GET_STATION_CTX_PTR(adapter))->
 				conn_info.conn_state)) {
-		hdd_debug("%pK(%d) Connection is in progress",
+		hdd_debug("%pK(%d) mode %d Connection is in progress",
 			  WLAN_HDD_GET_STATION_CTX_PTR(adapter),
-			  adapter->vdev_id);
+			  adapter->vdev_id, adapter->device_mode);
 
 		context->out_vdev_id = adapter->vdev_id;
 		context->out_reason = CONNECTION_IN_PROGRESS;
@@ -15927,9 +15924,9 @@ static QDF_STATUS hdd_is_connection_in_progress_iterator(
 		     mac_handle,
 		     adapter->vdev_id)) ||
 		     hdd_is_roaming_in_progress(hdd_ctx)) {
-		hdd_debug("%pK(%d) Reassociation in progress",
+		hdd_debug("%pK(%d) mode %d Reassociation in progress",
 			  WLAN_HDD_GET_STATION_CTX_PTR(adapter),
-			  adapter->vdev_id);
+			  adapter->vdev_id, adapter->device_mode);
 
 		context->out_vdev_id = adapter->vdev_id;
 		context->out_reason = REASSOC_IN_PROGRESS;
@@ -15977,7 +15974,8 @@ static QDF_STATUS hdd_is_connection_in_progress_iterator(
 			return QDF_STATUS_E_ABORTED;
 		}
 		if (hdd_ctx->connection_in_progress) {
-			hdd_debug("AP/GO: connection is in progress");
+			hdd_debug("AP/GO: vdev %d connection is in progress",
+				  adapter->vdev_id);
 			context->out_reason = SAP_CONNECTION_IN_PROGRESS;
 			context->out_vdev_id = adapter->vdev_id;
 			context->connection_in_progress = true;

+ 0 - 1
core/hdd/src/wlan_hdd_p2p.c

@@ -718,7 +718,6 @@ struct wireless_dev *__wlan_hdd_add_virtual_intf(struct wiphy *wiphy,
 			wlan_abort_scan(hdd_ctx->pdev, INVAL_PDEV_ID,
 					adapter->vdev_id, INVALID_SCAN_ID,
 					false);
-			hdd_debug("Abort Scan while adding virtual interface");
 		}
 	}
 

+ 2 - 8
core/hdd/src/wlan_hdd_scan.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -464,8 +464,6 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 	QDF_STATUS qdf_status;
 	bool enable_connected_scan;
 
-	hdd_enter();
-
 	if (cds_is_fw_down()) {
 		hdd_err("firmware is down, scan cmd cannot be processed");
 		return -EINVAL;
@@ -509,10 +507,6 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 		return 0;
 	}
 
-	hdd_debug("Device_mode %s(%d)",
-		  qdf_opmode_str(adapter->device_mode),
-		  adapter->device_mode);
-
 	/*
 	 * IBSS vdev does not need to scan to establish
 	 * IBSS connection. If IBSS vdev need to support scan,
@@ -697,7 +691,7 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 error:
 	if (params.default_ie.ptr)
 		qdf_mem_free(params.default_ie.ptr);
-	hdd_exit();
+
 	return status;
 }
 

+ 1 - 4
core/hdd/src/wlan_hdd_stats.c

@@ -5005,9 +5005,6 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
 	int status;
 	bool filled = false;
 
-	hdd_enter_dev(dev);
-
-	hdd_debug("dump survey index: %d", idx);
 	if (idx > QDF_MAX_NUM_CHAN - 1)
 		return -EINVAL;
 
@@ -5040,7 +5037,7 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
 
 	if (!filled)
 		return -ENONET;
-	hdd_exit();
+
 	return 0;
 }
 

+ 5 - 13
core/wma/src/wma_features.c

@@ -4973,8 +4973,6 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 	struct wlan_objmgr_vdev *vdev;
 	enum QDF_OPMODE mode;
 
-	WMA_LOGD("%s: Enter", __func__);
-
 	if (wma && wma->cds_context)
 		mac = (struct mac_context *)cds_get_context(QDF_MODULE_ID_PE);
 
@@ -4995,7 +4993,6 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 	}
 
 	snr_monitor_enabled = wlan_scan_is_snr_monitor_enabled(mac->psoc);
-	WMA_LOGD("%s: monitor:%d", __func__, snr_monitor_enabled);
 	if (snr_monitor_enabled && mac->chan_info_cb) {
 		buf.tx_frame_count = event->tx_frame_cnt;
 		buf.clock_freq = event->mac_clk_mhz;
@@ -5011,26 +5008,21 @@ int wma_chan_info_event_handler(void *handle, uint8_t *event_buf,
 						    WLAN_LEGACY_WMA_ID);
 
 	if (!vdev) {
-		WMA_LOGE("%s: vdev is NULL for vdev %d",
-			 __func__, event->vdev_id);
+		wma_err("vdev not found for vdev %d", event->vdev_id);
 		return -EINVAL;
 	}
 	mode = wlan_vdev_mlme_get_opmode(vdev);
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_LEGACY_WMA_ID);
-	WMA_LOGD("Vdevid %d mode %d", event->vdev_id, mode);
 
 	if (mac->sap.acs_with_more_param && mode == QDF_SAP_MODE) {
 		channel_status = qdf_mem_malloc(sizeof(*channel_status));
 		if (!channel_status)
 			return -ENOMEM;
 
-		WMA_LOGD(FL("freq=%d nf=%d rxcnt=%u cyccnt=%u tx_r=%d tx_t=%d"),
-			 event->freq,
-			 event->noise_floor,
-			 event->rx_clear_count,
-			 event->cycle_count,
-			 event->chan_tx_pwr_range,
-			 event->chan_tx_pwr_tp);
+		wma_debug("freq %d nf %d rxcnt %u cyccnt %u tx_r %d tx_t %d",
+			  event->freq, event->noise_floor,
+			  event->rx_clear_count, event->cycle_count,
+			  event->chan_tx_pwr_range, event->chan_tx_pwr_tp);
 
 		channel_status->channelfreq = event->freq;
 		channel_status->noise_floor = event->noise_floor;