From eb46090d19c7f6fb9b30cb6f3eebe388b0fd5f71 Mon Sep 17 00:00:00 2001 From: Pragaspathi Thilagaraj Date: Sun, 26 Jul 2020 00:17:42 +0530 Subject: [PATCH] qcacld-3.0: Print current RSSI of AP after roam scan is complete In wma_get_trigger_detail_str() driver prints the roam trigger detail for Low rssi and Periodic scan triggers, the RSSI value of the current AP is the value before roam scan is triggered. But the firmware considers the rssi of the current AP after roam scan is complete to calculate the next RSSI threshold. So there could be mismatch in the current rssi value and next rssi threshold when roam_info->rssi_trig_data.threshold is used to print the current AP rssi. Use roam_info->current_rssi to print the current connected AP rssi in the roam trigger logging. Change-Id: Ib154bb3cbdfe13dbcdd8c8830cdafb6daefa34b5 CRs-Fixed: 2739346 --- core/wma/src/wma_scan_roam.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c index 987aac3bb2aa..023b6a287747 100644 --- a/core/wma/src/wma_scan_roam.c +++ b/core/wma/src/wma_scan_roam.c @@ -3533,8 +3533,16 @@ wma_get_trigger_detail_str(struct wmi_roam_trigger_info *roam_info, char *buf) return; case WMI_ROAM_TRIGGER_REASON_LOW_RSSI: case WMI_ROAM_TRIGGER_REASON_PERIODIC: - buf_cons = qdf_snprint(temp, buf_left, "Cur_rssi_threshold: %d", - roam_info->rssi_trig_data.threshold); + /* + * Use roam_info->current_rssi get the RSSI of current AP after + * roam scan is triggered. This avoids discrepency with the + * next rssi threshold value printed in roam scan details. + * roam_info->rssi_trig_data.threshold gives the rssi of AP + * before the roam scan was triggered. + */ + buf_cons = qdf_snprint(temp, buf_left, + " Current AP RSSI: %d", + roam_info->current_rssi); temp += buf_cons; buf_left -= buf_cons; return;