From 5821833f157a5a7946bb44241c3076bc04b63bbb Mon Sep 17 00:00:00 2001 From: abhinav kumar Date: Thu, 25 Feb 2021 15:32:17 +0530 Subject: [PATCH] qcacld-3.0: BTM resp print is coming with all zeros Host need to print BTM resp TLV info (wmi_roam_btm_response_info) only when trigger reason is BTM or WTC_BTM. As for other roam triggers this TLV contains zeros, so host should not print. Change-Id: Ic76a1b88b9e641745420c372b275392e86d4ba35 CRs-Fixed: 2884639 --- core/wma/src/wma_scan_roam.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index b264b436379e..30b511449d20 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -2317,7 +2317,18 @@ int wma_roam_stats_event_handler(WMA_HANDLE handle, uint8_t *event, qdf_mem_free(roam_info); return -EINVAL; } - if (roam_info->btm_rsp.present) + + /* + * Print BTM resp TLV info (wmi_roam_btm_response_info) only + * when trigger reason is BTM or WTC_BTM. As for other roam + * triggers this TLV contains zeros, so host should not print. + */ + if ((roam_info->btm_rsp.present) && + (roam_info->trigger.present && + (roam_info->trigger.trigger_reason == + WMI_ROAM_TRIGGER_REASON_WTC_BTM || + roam_info->trigger.trigger_reason == + WMI_ROAM_TRIGGER_REASON_BTM))) wma_rso_print_btm_rsp_info(&roam_info->btm_rsp, vdev_id);