From 6dad04b74454b3f8db334e7612fe6fac308c2361 Mon Sep 17 00:00:00 2001 From: Abhishek Ambure Date: Mon, 6 Jul 2020 00:39:52 +0530 Subject: [PATCH] qcacld-3.0: Add support to set roam scan freq in specific list User configures roam scan frequencies using vendor roaming sub command QCA_WLAN_VENDOR_ROAMING_SUBCMD_CONTROL_SET. If the roam scan frequency list type is QCA_SPECIFIC_SCAN_FREQ_LIST in user command, update specific roam scan channel list in host and FW. Change-Id: Ie9d30999a7cdfdd6fa4d97c64b09d9739dd39633 CRs-Fixed: 2725832 --- core/sme/src/common/sme_api.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 9210f7883703..e3e76dec7d5b 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -7545,23 +7545,23 @@ sme_update_roam_scan_freq_list(mac_handle_t mac_handle, uint8_t vdev_id, } neighbor_roam_info = &mac->roam.neighborRoamInfo[vdev_id]; - if (neighbor_roam_info->cfgParams.specific_chan_info.numOfChannels) { + if (neighbor_roam_info->cfgParams.specific_chan_info.numOfChannels && + freq_list_type == QCA_PREFERRED_SCAN_FREQ_LIST) { sme_err("Specific channel list is already configured"); sme_release_global_lock(&mac->sme); return QDF_STATUS_E_INVAL; } + sme_debug("frequency list type %d", freq_list_type); if (freq_list_type == QCA_PREFERRED_SCAN_FREQ_LIST) { - sme_debug("Preferred frequency list: "); channel_info = &neighbor_roam_info->cfgParams.pref_chan_info; + status = sme_update_roam_scan_channel_list( + mac_handle, vdev_id, channel_info, + freq_list, num_chan); } else { - goto out; + status = sme_change_roam_scan_channel_list(mac_handle, vdev_id, + freq_list, num_chan); } - - status = sme_update_roam_scan_channel_list(mac_handle, vdev_id, - channel_info, freq_list, - num_chan); -out: sme_release_global_lock(&mac->sme); return status;