diff --git a/umac/scan/core/src/wlan_scan_manager_6ghz.c b/umac/scan/core/src/wlan_scan_manager_6ghz.c index 4af36bfb2cb4..d3a45823c6c3 100644 --- a/umac/scan/core/src/wlan_scan_manager_6ghz.c +++ b/umac/scan/core/src/wlan_scan_manager_6ghz.c @@ -66,7 +66,7 @@ scm_sort_6ghz_channel_list(struct wlan_objmgr_vdev *vdev, for (i = 0; i < chan_list->num_chan; i++) if (WLAN_REG_IS_6GHZ_CHAN_FREQ(chan_list->chan[i].freq)) - temp_list[j++].freq = chan_list->chan[i].freq; + temp_list[j++] = chan_list->chan[i]; tmp_list_count = j; scm_debug("Total 6ghz channels %d", tmp_list_count); @@ -88,6 +88,8 @@ scm_sort_6ghz_channel_list(struct wlan_objmgr_vdev *vdev, channel->saved_profile_count * SAVED_PROFILE_WEIGHTAGE; rnr_chan_info[j].weight = weight; rnr_chan_info[j].chan_freq = temp_list[i].freq; + rnr_chan_info[j].phymode = temp_list[i].phymode; + rnr_chan_info[j].flags = temp_list[i].flags; j++; /* * Log the info only if weight or bss_beacon_probe_count are @@ -119,8 +121,11 @@ scm_sort_6ghz_channel_list(struct wlan_objmgr_vdev *vdev, /* update the 6g list based on the weightage */ for (i = 0, j = 0; (i < NUM_CHANNELS && j < tmp_list_count); i++) - if (wlan_reg_is_6ghz_chan_freq(chan_list->chan[i].freq)) - chan_list->chan[i].freq = rnr_chan_info[j++].chan_freq; + if (wlan_reg_is_6ghz_chan_freq(chan_list->chan[i].freq)) { + chan_list->chan[i].freq = rnr_chan_info[j].chan_freq; + chan_list->chan[i].flags = rnr_chan_info[j].flags; + chan_list->chan[i].phymode = rnr_chan_info[j++].phymode; + } qdf_mem_free(rnr_chan_info); } diff --git a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h index fe32fceda537..2369902dde9a 100644 --- a/umac/scan/dispatcher/inc/wlan_scan_public_structs.h +++ b/umac/scan/dispatcher/inc/wlan_scan_public_structs.h @@ -692,22 +692,25 @@ struct probe_req_whitelist_attr { }; /** - * Set this flag for a 6g channel to scan it only if an RNR IE is found - * with that channel while scanning 2g/5g bands + * enum scan_flags: scan flags + * @FLAG_SCAN_ONLY_IF_RNR_FOUND: Set this flag for a 6g channel to scan it only + * if an RNR IE is found with that channel while scanning 2g/5g bands. */ -#define FLAG_SCAN_ONLY_IF_RNR_FOUND 0x1 +enum scan_flags { + FLAG_SCAN_ONLY_IF_RNR_FOUND = 0x1, +}; /** * struct chan_info - channel information * @freq: frequency to scan * @phymode: phymode in which @frequency should be scanned - * @flags: Flags to define channel property. Firmware can use this info for - * different operations, e.g.: scan + * @flags: Flags to define channel property as defined @enum scan_flags. + * Firmware can use this info for different operations, e.g.: scan */ struct chan_info { qdf_freq_t freq; - uint32_t phymode; - uint8_t flags; + enum scan_phy_mode phymode; + enum scan_flags flags; }; /** @@ -1384,9 +1387,14 @@ struct channel_list_db { * rnr_chan_weight - RNR channel weightage * @chan_freq: channel frequency * @weight: weightage of the channel + * @phymode: phymode in which @frequency should be scanned + * @flags: Flags to define channel property as defined @enum scan_flags. + * Firmware can use this info for different operations, e.g.: scan */ struct rnr_chan_weight { uint32_t chan_freq; uint32_t weight; + enum scan_phy_mode phymode; + enum scan_flags flags; }; #endif