浏览代码

qcacld-3.0: Parse data stall info for appropriate trigger reason

Data stall info received as part of wmi debug msg flush
event is parsed for all reasons. Since fw populates this
info only when the reason is data_stall_trigger, in all
other cases this info would be garbage values and is sent
to userspace.

Fix is to parse data stall info only for the appropriate
trigger reason.

Change-Id: I70004e5825e67df375e9bc14c2db2a398d860c97
CRs-Fixed: 2724248
Yeshwanth Sriram Guntuka 4 年之前
父节点
当前提交
c719f2d546
共有 2 个文件被更改,包括 12 次插入5 次删除
  1. 2 0
      core/wma/inc/wma_types.h
  2. 10 5
      core/wma/src/wma_main.c

+ 2 - 0
core/wma/inc/wma_types.h

@@ -435,6 +435,8 @@
 
 #define WMA_ROAM_INIT_PARAM                  SIR_HAL_INIT_ROAM_OFFLOAD_PARAM
 
+#define WMA_DATA_STALL_TRIGGER 6
+
 /* Bit 6 will be used to control BD rate for Management frames */
 #define HAL_USE_BD_RATE2_FOR_MANAGEMENT_FRAME 0x40
 

+ 10 - 5
core/wma/src/wma_main.c

@@ -1986,12 +1986,17 @@ static int wma_flush_complete_evt_handler(void *handle,
 	reason_code = wmi_event->reserved0;
 	wma_debug("Received reason code %d from FW", reason_code);
 
-	buf_ptr = (uint8_t *)wmi_event;
-	buf_ptr = buf_ptr + sizeof(wmi_debug_mesg_flush_complete_fixed_param) +
-		  WMI_TLV_HDR_SIZE;
-	data_stall_event = (wmi_debug_mesg_fw_data_stall_param *) buf_ptr;
+	if (reason_code == WMA_DATA_STALL_TRIGGER) {
+		buf_ptr = (uint8_t *)wmi_event;
+		buf_ptr = buf_ptr +
+			  sizeof(wmi_debug_mesg_flush_complete_fixed_param) +
+			  WMI_TLV_HDR_SIZE;
+		data_stall_event =
+				(wmi_debug_mesg_fw_data_stall_param *)buf_ptr;
+	}
 
-	if (((data_stall_event->tlv_header & 0xFFFF0000) >> 16 ==
+	if (reason_code == WMA_DATA_STALL_TRIGGER &&
+	    ((data_stall_event->tlv_header & 0xFFFF0000) >> 16 ==
 	      WMITLV_TAG_STRUC_wmi_debug_mesg_fw_data_stall_param)) {
 		/**
 		 * Log data stall info received from FW: