瀏覽代碼

qcacmn: Fix high latency during BTM roaming

While processing the WMA_ROAM_OFFLOAD_SYNCH_IND event, The
driver takes nearly 150 to 200 msec time to just write fatal,
error and info messages to the kmsg log buffer. Also to get
tx power supplicant runs another thread while roaming. These
cause more latency(300ms) to send WMA_ROAM_OFFLOAD_SYNCH_CNF
message to fw. To decrease roam latency, the driver should
write the only necessary error message to kmsg buffer.

Fix is to change irrelevant fatal, error and info message type
to debug.

Change-Id: I521104c692eb42112ce2528c15d09785ff3470b6
CRs-Fixed: 2261592
Abhinav Kumar 6 年之前
父節點
當前提交
9791957823

+ 2 - 0
umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h

@@ -59,6 +59,8 @@
 #define obj_mgr_debug(format, args...) \
 		obj_mgr_logfl(QDF_TRACE_LEVEL_DEBUG, format, ## args)
 
+#define obj_mgr_log_level(level, format, args...)\
+		obj_mgr_logfl(level, format, ## args)
 
 /**
  * enum WLAN_OBJ_STATE - State of Object

+ 2 - 2
umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c

@@ -161,7 +161,7 @@ void wlan_objmgr_notify_log_delete(void *obj,
 	node->obj = obj;
 	node->obj_type = obj_type;
 	node->tstamp = tstamp;
-	obj_mgr_alert("#%s : mac_addr :" QDF_MAC_ADDR_STR" entered L-state",
+	obj_mgr_debug("#%s : mac_addr :" QDF_MAC_ADDR_STR" entered L-state",
 		      obj_name, QDF_MAC_ADDR_ARRAY(macaddr));
 	wlan_objmgr_insert_ld_obj_to_list(debug_info, &node->node);
 }
@@ -225,7 +225,7 @@ void wlan_objmgr_notify_destroy(void *obj,
 		obj_mgr_err("obj_name is null");
 		return;
 	}
-	obj_mgr_alert("#%s, macaddr: " QDF_MAC_ADDR_STR" exited L-state",
+	obj_mgr_debug("#%s, macaddr: " QDF_MAC_ADDR_STR" exited L-state",
 		      obj_name, QDF_MAC_ADDR_ARRAY(macaddr));
 
 	wlan_objmgr_rem_ld_obj_from_list(obj, debug_info, obj_type);

+ 4 - 3
umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c

@@ -770,16 +770,17 @@ QDF_STATUS wlan_objmgr_global_obj_can_destroyed(void)
 }
 qdf_export_symbol(wlan_objmgr_global_obj_can_destroyed);
 
-void wlan_objmgr_print_ref_ids(qdf_atomic_t *id)
+void wlan_objmgr_print_ref_ids(qdf_atomic_t *id,
+				QDF_TRACE_LEVEL log_level)
 {
 	uint32_t i;
 	uint32_t pending_ref;
 
-	obj_mgr_alert("Pending references of object");
+	obj_mgr_log_level(log_level, "Pending references of object");
 	for (i = 0; i < WLAN_REF_ID_MAX; i++) {
 		pending_ref = qdf_atomic_read(&id[i]);
 		if (pending_ref)
-			obj_mgr_alert("%s -- %d",
+			obj_mgr_log_level(log_level, "%s -- %d",
 				string_from_dbgid(i), pending_ref);
 	}
 

+ 3 - 1
umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj_i.h

@@ -128,10 +128,12 @@ QDF_STATUS wlan_objmgr_psoc_object_detach(
 /**
  * wlan_objmgr_print_ref_ids() - Print ref counts of modules
  * @id - array of ref debug
+ * @log_level - log level
  *
  * Itertes through array, and prints the ref count debug
  *
  * Return: nothing
  */
-void wlan_objmgr_print_ref_ids(qdf_atomic_t *id);
+void wlan_objmgr_print_ref_ids(qdf_atomic_t *id,
+				QDF_TRACE_LEVEL log_level);
 #endif /* _WLAN_OBJMGR_GLOBAL_OBJ_I_H_ */

+ 4 - 6
umac/cmn_services/obj_mgr/src/wlan_objmgr_pdev_obj.c

@@ -246,11 +246,8 @@ QDF_STATUS wlan_objmgr_pdev_obj_delete(struct wlan_objmgr_pdev *pdev)
 		     pdev->pdev_objmgr.wlan_pdev_id);
 
 	print_idx = qdf_get_pidx();
-	if (qdf_print_is_verbose_enabled(print_idx, QDF_MODULE_ID_OBJ_MGR,
-		QDF_TRACE_LEVEL_DEBUG)) {
-		wlan_objmgr_print_ref_ids(pdev->pdev_objmgr.ref_id_dbg);
-	}
-
+	wlan_objmgr_print_ref_ids(pdev->pdev_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_DEBUG);
 	/*
 	 * Update PDEV object state to LOGICALLY DELETED
 	 * It prevents further access of this object
@@ -847,7 +844,8 @@ void wlan_objmgr_pdev_release_ref(struct wlan_objmgr_pdev *pdev,
 	if (!qdf_atomic_read(&pdev->pdev_objmgr.ref_id_dbg[id])) {
 		obj_mgr_err("pdev (id:%d)ref cnt was not taken by %d",
 				pdev_id, id);
-		wlan_objmgr_print_ref_ids(pdev->pdev_objmgr.ref_id_dbg);
+		wlan_objmgr_print_ref_ids(pdev->pdev_objmgr.ref_id_dbg,
+					  QDF_TRACE_LEVEL_FATAL);
 		WLAN_OBJMGR_BUG(0);
 	}
 

+ 4 - 6
umac/cmn_services/obj_mgr/src/wlan_objmgr_peer_obj.c

@@ -330,11 +330,8 @@ QDF_STATUS wlan_objmgr_peer_obj_delete(struct wlan_objmgr_peer *peer)
 		      QDF_MAC_ADDR_ARRAY(macaddr));
 
 	print_idx = qdf_get_pidx();
-	if (qdf_print_is_verbose_enabled(print_idx, QDF_MODULE_ID_OBJ_MGR,
-		QDF_TRACE_LEVEL_DEBUG)) {
-		wlan_objmgr_print_ref_ids(peer->peer_objmgr.ref_id_dbg);
-	}
-
+	wlan_objmgr_print_ref_ids(peer->peer_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_DEBUG);
 	/**
 	 * Update VDEV object state to LOGICALLY DELETED
 	 * It prevents further access of this object
@@ -644,7 +641,8 @@ void wlan_objmgr_peer_release_ref(struct wlan_objmgr_peer *peer,
 		"peer(%02x:%02x:%02x:%02x:%02x:%02x) ref was not taken by %d",
 			macaddr[0], macaddr[1], macaddr[2],
 			macaddr[3], macaddr[4], macaddr[5], id);
-		wlan_objmgr_print_ref_ids(peer->peer_objmgr.ref_id_dbg);
+		wlan_objmgr_print_ref_ids(peer->peer_objmgr.ref_id_dbg,
+					  QDF_TRACE_LEVEL_FATAL);
 		WLAN_OBJMGR_BUG(0);
 	}
 

+ 12 - 10
umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c

@@ -254,11 +254,8 @@ QDF_STATUS wlan_objmgr_psoc_obj_delete(struct wlan_objmgr_psoc *psoc)
 	obj_mgr_info("Logically deleting psoc %d", psoc->soc_objmgr.psoc_id);
 
 	print_idx = qdf_get_pidx();
-	if (qdf_print_is_verbose_enabled(print_idx, QDF_MODULE_ID_OBJ_MGR,
-		QDF_TRACE_LEVEL_DEBUG)) {
-		wlan_objmgr_print_ref_ids(psoc->soc_objmgr.ref_id_dbg);
-	}
-
+	wlan_objmgr_print_ref_ids(psoc->soc_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_DEBUG);
 	/*
 	 * Update PSOC object state to LOGICALLY DELETED
 	 * It prevents further access of this object
@@ -1900,7 +1897,8 @@ void wlan_objmgr_psoc_release_ref(struct wlan_objmgr_psoc *psoc,
 
 	if (!qdf_atomic_read(&psoc->soc_objmgr.ref_id_dbg[id])) {
 		obj_mgr_err("psoc ref cnt was not taken by %d", id);
-		wlan_objmgr_print_ref_ids(psoc->soc_objmgr.ref_id_dbg);
+		wlan_objmgr_print_ref_ids(psoc->soc_objmgr.ref_id_dbg,
+					  QDF_TRACE_LEVEL_FATAL);
 		WLAN_OBJMGR_BUG(0);
 	}
 
@@ -1936,7 +1934,8 @@ static void wlan_objmgr_psoc_peer_ref_print(struct wlan_objmgr_psoc *psoc,
 	obj_mgr_alert("Peer MAC:%02x:%02x:%02x:%02x:%02x:%02x state:%d vdev_id:%d",
 		  macaddr[0], macaddr[1], macaddr[2], macaddr[3],
 		  macaddr[4], macaddr[5], obj_state, vdev_id);
-	wlan_objmgr_print_ref_ids(peer->peer_objmgr.ref_id_dbg);
+	wlan_objmgr_print_ref_ids(peer->peer_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_FATAL);
 }
 
 static void wlan_objmgr_psoc_vdev_ref_print(struct wlan_objmgr_psoc *psoc,
@@ -1952,7 +1951,8 @@ static void wlan_objmgr_psoc_vdev_ref_print(struct wlan_objmgr_psoc *psoc,
 	wlan_vdev_obj_unlock(vdev);
 	obj_mgr_alert("Vdev ID is %d, state %d", id, obj_state);
 
-	wlan_objmgr_print_ref_ids(vdev->vdev_objmgr.ref_id_dbg);
+	wlan_objmgr_print_ref_ids(vdev->vdev_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_FATAL);
 }
 
 static void wlan_objmgr_psoc_pdev_ref_print(struct wlan_objmgr_psoc *psoc,
@@ -1966,7 +1966,8 @@ static void wlan_objmgr_psoc_pdev_ref_print(struct wlan_objmgr_psoc *psoc,
 	wlan_pdev_obj_unlock(pdev);
 	obj_mgr_alert("pdev ID is %d", id);
 
-	wlan_objmgr_print_ref_ids(pdev->pdev_objmgr.ref_id_dbg);
+	wlan_objmgr_print_ref_ids(pdev->pdev_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_FATAL);
 }
 
 QDF_STATUS wlan_objmgr_print_ref_all_objects_per_psoc(
@@ -1983,7 +1984,8 @@ QDF_STATUS wlan_objmgr_print_ref_all_objects_per_psoc(
 				wlan_objmgr_psoc_pdev_ref_print, NULL);
 
 	obj_mgr_alert(" Ref counts of PSOC");
-	wlan_objmgr_print_ref_ids(psoc->soc_objmgr.ref_id_dbg);
+	wlan_objmgr_print_ref_ids(psoc->soc_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_FATAL);
 
 	return QDF_STATUS_SUCCESS;
 }

+ 4 - 6
umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c

@@ -332,11 +332,8 @@ QDF_STATUS wlan_objmgr_vdev_obj_delete(struct wlan_objmgr_vdev *vdev)
 	obj_mgr_info("Logically deleting vdev %d", vdev->vdev_objmgr.vdev_id);
 
 	print_idx = qdf_get_pidx();
-	if (qdf_print_is_verbose_enabled(print_idx, QDF_MODULE_ID_OBJ_MGR,
-		QDF_TRACE_LEVEL_DEBUG)) {
-		wlan_objmgr_print_ref_ids(vdev->vdev_objmgr.ref_id_dbg);
-	}
-
+	wlan_objmgr_print_ref_ids(vdev->vdev_objmgr.ref_id_dbg,
+				  QDF_TRACE_LEVEL_DEBUG);
 	/*
 	 * Update VDEV object state to LOGICALLY DELETED
 	 * It prevents further access of this object
@@ -857,7 +854,8 @@ void wlan_objmgr_vdev_release_ref(struct wlan_objmgr_vdev *vdev,
 	if (!qdf_atomic_read(&vdev->vdev_objmgr.ref_id_dbg[id])) {
 		obj_mgr_err("vdev (id:%d)ref cnt was not taken by %d",
 				vdev_id, id);
-		wlan_objmgr_print_ref_ids(vdev->vdev_objmgr.ref_id_dbg);
+		wlan_objmgr_print_ref_ids(vdev->vdev_objmgr.ref_id_dbg,
+					  QDF_TRACE_LEVEL_FATAL);
 		WLAN_OBJMGR_BUG(0);
 	}
 

+ 1 - 1
umac/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -799,7 +799,7 @@ static bool policy_mgr_is_restart_sap_allowed(
 		QDF_MCC_TO_SCC_SWITCH_FORCE_PREFERRED_WITHOUT_DISCONNECTION) &&
 		((policy_mgr_get_concurrency_mode(psoc) & sta_go_bit_mask)
 			== sta_go_bit_mask)))) {
-		policy_mgr_err("MCC switch disabled or not concurrent STA/SAP, STA/GO");
+		policy_mgr_debug("MCC switch disabled or not concurrent STA/SAP, STA/GO");
 		return false;
 	}