소스 검색

qcacld-3.0: Add debug log to print link vote id

Add debug log to print more details about the link vote id when
PCIe link suspend is not allowed.

Change-Id: I5069202436e0da37b8ae22f84e28ac06d35002b5
CRs-Fixed: 2964957
Alan Chen 3 년 전
부모
커밋
27aeb4863e
4개의 변경된 파일18개의 추가작업 그리고 9개의 파일을 삭제
  1. 3 0
      Kbuild
  2. 3 1
      components/pmo/core/src/wlan_pmo_suspend_resume.c
  3. 2 0
      configs/default_defconfig
  4. 10 8
      core/wma/src/wma_dev_if.c

+ 3 - 0
Kbuild

@@ -3073,6 +3073,9 @@ cppflags-$(CONFIG_WLAN_POWER_DEBUG) += -DWLAN_POWER_DEBUG
 
 cppflags-$(CONFIG_WLAN_MWS_INFO_DEBUGFS) += -DWLAN_MWS_INFO_DEBUGFS
 
+ifeq ($(CONFIG_WLAN_DEBUG_LINK_VOTE), y)
+cppflags-$(CONFIG_WLAN_DEBUG_LINK_VOTE) += -DWLAN_DEBUG_LINK_VOTE
+endif
 # Enable object manager reference count debug infrastructure
 cppflags-$(CONFIG_WLAN_OBJMGR_DEBUG) += -DWLAN_OBJMGR_DEBUG
 cppflags-$(CONFIG_WLAN_OBJMGR_DEBUG) += -DWLAN_OBJMGR_REF_ID_DEBUG

+ 3 - 1
components/pmo/core/src/wlan_pmo_suspend_resume.c

@@ -809,8 +809,10 @@ pmo_core_enable_wow_in_fw(struct wlan_objmgr_psoc *psoc,
 		}
 	} else {
 		pmo_info("Prevent link down, non-drv wow is enabled");
-		if (hif_ctx)
+		if (hif_ctx) {
 			hif_print_runtime_pm_prevent_list(hif_ctx);
+			htc_log_link_user_votes();
+		}
 	}
 
 	if (type == QDF_SYSTEM_SUSPEND) {

+ 2 - 0
configs/default_defconfig

@@ -1388,3 +1388,5 @@ endif
 CONFIG_WLAN_FEATURE_11BE := n
 #Enable 11BE MLO
 CONFIG_WLAN_FEATURE_11BE_MLO := n
+
+CONFIG_WLAN_DEBUG_LINK_VOTE := y

+ 10 - 8
core/wma/src/wma_dev_if.c

@@ -4865,7 +4865,7 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
 				wmi_service_enabled(wma->wmi_handle,
 					wmi_service_sap_connected_d3_wow));
 		if (!is_bus_suspend_allowed_in_sap_mode) {
-			htc_vote_link_up(htc_handle);
+			htc_vote_link_up(htc_handle, HTC_LINK_VOTE_SAP_USER_ID);
 			wmi_info("sap d0 wow");
 		} else {
 			wmi_info("sap d3 wow");
@@ -4882,7 +4882,7 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
 				wmi_service_enabled(wma->wmi_handle,
 					wmi_service_go_connected_d3_wow));
 		if (!is_bus_suspend_allowed_in_go_mode) {
-			htc_vote_link_up(htc_handle);
+			htc_vote_link_up(htc_handle, HTC_LINK_VOTE_GO_USER_ID);
 			wmi_info("p2p go d0 wow");
 		} else {
 			wmi_info("p2p go d3 wow");
@@ -4895,11 +4895,11 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
 	/* handle wow for nan with 1 or more peer in same way */
 	if (BSS_OPERATIONAL_MODE_NDI == oper_mode) {
 		wma_debug("disable runtime pm and vote for link up");
-		htc_vote_link_up(htc_handle);
+		htc_vote_link_up(htc_handle, HTC_LINK_VOTE_NDP_USER_ID);
 		wma_sap_prevent_runtime_pm(wma);
 	} else if (wma_add_sta_allow_sta_mode_vote_link(oper_mode)) {
 		wma_debug("vote for link up");
-		htc_vote_link_up(htc_handle);
+		htc_vote_link_up(htc_handle, HTC_LINK_VOTE_STA_USER_ID);
 	}
 }
 
@@ -4961,7 +4961,8 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 				wmi_service_enabled(wma->wmi_handle,
 					wmi_service_sap_connected_d3_wow));
 		if (!is_bus_suspend_allowed_in_sap_mode) {
-			htc_vote_link_down(htc_handle);
+			htc_vote_link_down(htc_handle,
+					   HTC_LINK_VOTE_SAP_USER_ID);
 			wmi_info("sap d0 wow");
 		} else {
 			wmi_info("sap d3 wow");
@@ -4977,7 +4978,8 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 				wmi_service_enabled(wma->wmi_handle,
 					wmi_service_go_connected_d3_wow));
 		if (!is_bus_suspend_allowed_in_go_mode) {
-			htc_vote_link_down(htc_handle);
+			htc_vote_link_down(htc_handle,
+					   HTC_LINK_VOTE_GO_USER_ID);
 			wmi_info("p2p go d0 wow");
 		} else {
 			wmi_info("p2p go d3 wow");
@@ -4989,11 +4991,11 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 
 	if (BSS_OPERATIONAL_MODE_NDI == oper_mode) {
 		wma_debug("allow runtime pm and vote for link down");
-		htc_vote_link_down(htc_handle);
+		htc_vote_link_down(htc_handle, HTC_LINK_VOTE_NDP_USER_ID);
 		wma_sap_allow_runtime_pm(wma);
 	} else if (wma_add_sta_allow_sta_mode_vote_link(oper_mode)) {
 		wma_debug("vote for link down");
-		htc_vote_link_down(htc_handle);
+		htc_vote_link_down(htc_handle, HTC_LINK_VOTE_STA_USER_ID);
 	}
 }