Jelajahi Sumber

qcacld-3.0: Logs optimization in intf del path

Modify the log level from error/info to debug, to reduce logging
time. henceforth, it reduces intf deletion time and enhance the overall
performance of device.

Change-Id: I3498438e07daa97dc5b4805271397205c7aa0cf2
CRs-Fixed: 3389896
Rahul Gusain 2 tahun lalu
induk
melakukan
b014e14517

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

@@ -5518,8 +5518,8 @@ void wlan_hdd_release_intf_addr(struct hdd_context *hdd_ctx,
 
 	}
 	if (i == QDF_MAX_CONCURRENCY_PERSONA)
-		hdd_err("Releasing non existing MAC "QDF_MAC_ADDR_FMT,
-			QDF_MAC_ADDR_REF(releaseAddr));
+		hdd_debug("Releasing non existing MAC " QDF_MAC_ADDR_FMT,
+			  QDF_MAC_ADDR_REF(releaseAddr));
 }
 
 /**
@@ -6316,7 +6316,7 @@ static int hdd_vdev_destroy_event_wait(struct hdd_context *hdd_ctx,
 		return -EINVAL;
 	}
 
-	hdd_nofl_debug("vdev %d destroyed successfully", vdev_id);
+	hdd_nofl_info("vdev %d destroyed successfully", vdev_id);
 	return 0;
 }
 

+ 3 - 7
core/hdd/src/wlan_hdd_p2p.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
@@ -124,10 +124,8 @@ void wlan_hdd_cleanup_remain_on_channel_ctx(struct hdd_adapter *adapter)
 	}
 
 	vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_P2P_ID);
-	if (!vdev) {
-		hdd_err("vdev is NULL");
+	if (!vdev)
 		return;
-	}
 
 	ucfg_p2p_cleanup_roc_by_vdev(vdev);
 	hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_P2P_ID);
@@ -143,10 +141,8 @@ void wlan_hdd_cleanup_actionframe(struct hdd_adapter *adapter)
 	}
 
 	vdev = hdd_objmgr_get_vdev_by_user(adapter, WLAN_OSIF_P2P_ID);
-	if (!vdev) {
-		hdd_err("vdev is NULL");
+	if (!vdev)
 		return;
-	}
 	ucfg_p2p_cleanup_tx_by_vdev(vdev);
 	hdd_objmgr_put_vdev_by_user(vdev, WLAN_OSIF_P2P_ID);
 }

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

@@ -895,7 +895,7 @@ enum hdd_tsf_op_result __hdd_stop_tsf_sync(struct hdd_adapter *adapter)
 	}
 
 	if (!hdd_get_th_sync_status(adapter)) {
-		hdd_err("Host Target sync has not initialized");
+		hdd_debug("Host Target sync has not initialized");
 		return HDD_TSF_OP_SUCC;
 	}
 

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

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -3315,7 +3315,7 @@ QDF_STATUS sme_roam_ndi_stop(mac_handle_t mac_handle, uint8_t vdev_id)
 			 0));
 
 	if (!CSR_IS_SESSION_VALID(mac_ctx, vdev_id)) {
-		sme_err("Invalid sessionID: %d", vdev_id);
+		sme_debug("Invalid sessionID: %d", vdev_id);
 		return QDF_STATUS_E_INVAL;
 	}
 

+ 1 - 1
core/wma/src/wma_dev_if.c

@@ -416,7 +416,7 @@ QDF_STATUS wma_vdev_detach_callback(struct vdev_delete_response *rsp)
 
 	iface = &wma->interfaces[rsp->vdev_id];
 
-	wma_info("vdev del response received for VDEV_%d", rsp->vdev_id);
+	wma_debug("vdev del response received for VDEV_%d", rsp->vdev_id);
 	iface->del_staself_req = NULL;
 
 	if (iface->roam_scan_stats_req) {

+ 1 - 1
core/wma/src/wma_features.c

@@ -748,7 +748,7 @@ QDF_STATUS wma_sr_update(tp_wma_handle wma, uint8_t vdev_id, bool enable)
 	}
 
 	if (!wlan_vdev_mlme_get_he_spr_enabled(vdev)) {
-		wma_err("Spatial Reuse disabled for vdev_id: %u", vdev_id);
+		wma_debug("Spatial Reuse disabled for vdev_id: %u", vdev_id);
 		status = QDF_STATUS_E_NOSUPPORT;
 		goto release_ref;
 	}

+ 13 - 3
os_if/nan/src/os_if_nan.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -2523,8 +2523,18 @@ void os_if_nan_ndi_session_end(struct wlan_objmgr_vdev *vdev)
 	 * to be informed in that case (response is not expected)
 	 */
 	state = ucfg_nan_get_ndi_state(vdev);
-	if (state != NAN_DATA_NDI_DELETING_STATE &&
-	    state != NAN_DATA_DISCONNECTED_STATE) {
+
+	/*
+	 * With NDP Delete Vendor command, hdd_ndi_delete function modifies NDI
+	 * state to delete "NAN_DATA_NDI_DELETING_STATE".
+	 * But when user issues DEL Virtual Intf cmd, hdd_ndi_delete does not
+	 * call and NDI state remains to created "NAN_DATA_NDI_CREATED_STATE".
+	 */
+	if (state == NAN_DATA_NDI_CREATED_STATE) {
+		osif_err("NDI interface is just created: %u", state);
+		return;
+	} else if (state != NAN_DATA_NDI_DELETING_STATE &&
+		   state != NAN_DATA_DISCONNECTED_STATE) {
 		osif_err("NDI interface deleted: state: %u", state);
 		return;
 	}

+ 3 - 3
os_if/twt/src/osif_twt_ext_req.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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 above
@@ -1447,8 +1447,8 @@ void osif_twt_concurrency_update_handler(struct wlan_objmgr_psoc *psoc,
 		}
 		break;
 	default:
-		osif_err("Unexpected number of connections: %d",
-			 num_connections);
+		osif_debug("Unexpected number of connections: %d",
+			   num_connections);
 		break;
 	}
 }