From ffca2ee19e50c718581d625f906f850bbdd1df11 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 16 Feb 2023 06:39:21 -0800 Subject: [PATCH] qcacld-3.0: Send proper RCL list to upper layer Host receives channel list via an event WMI_ROAM_SCAN_CHANNEL_LIST_EVENTID as getroamscanchannels command response on disconnection. Host sorts the channel list in descending order before sending the list to the supplicant. As per current logic, the host fills only the value of LSB for the second channel onward. This results in host respond the RCL list with an invalid format of frequencies to the upper layer. Fix is to make sure the host should respond RCL list with the correct format of frequencies. Change-Id: I1670ec4a99a7c9c7c438c430a9476802f8af83ce CRs-Fixed: 3397397 --- core/hdd/src/wlan_hdd_ioctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c index ae411d5a50..090b53a74a 100644 --- a/core/hdd/src/wlan_hdd_ioctl.c +++ b/core/hdd/src/wlan_hdd_ioctl.c @@ -3288,7 +3288,8 @@ hdd_dump_roam_scan_ch_list(uint32_t *chan_list, uint16_t num_channels) static void hdd_sort_roam_scan_ch_list(uint32_t *chan_list, uint16_t num_channels) { - uint8_t i, j, swap = 0; + uint8_t i, j; + uint32_t swap = 0; for (i = 0; i < (num_channels - 1) && i < WNI_CFG_VALID_CHANNEL_LIST_LEN; i++) {