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
This commit is contained in:
Yeshwanth Sriram Guntuka 2020-07-02 18:00:52 +05:30 committed by nshrivas
parent 1cb73d1aed
commit c719f2d546
2 changed files with 12 additions and 5 deletions

View File

@ -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

View File

@ -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: