|
@@ -237,6 +237,7 @@ wlansap_filter_unsafe_ch(struct wlan_objmgr_psoc *psoc,
|
|
|
{
|
|
|
uint16_t i;
|
|
|
uint16_t num_safe_ch = 0;
|
|
|
+ uint32_t freq;
|
|
|
|
|
|
/*
|
|
|
* There are two channel list, one acs cfg channel list, and one
|
|
@@ -252,13 +253,12 @@ wlansap_filter_unsafe_ch(struct wlan_objmgr_psoc *psoc,
|
|
|
* the acs channel list before chosing one of them as a default channel
|
|
|
*/
|
|
|
for (i = 0; i < sap_ctx->acs_cfg->ch_list_count; i++) {
|
|
|
- if (!policy_mgr_is_safe_channel(
|
|
|
- psoc, sap_ctx->acs_cfg->freq_list[i])) {
|
|
|
- sap_debug("unsafe freq %d removed from acs list",
|
|
|
- sap_ctx->acs_cfg->freq_list[i]);
|
|
|
+ freq = sap_ctx->acs_cfg->freq_list[i];
|
|
|
+ if (!policy_mgr_is_sap_freq_allowed(psoc, freq)) {
|
|
|
+ sap_debug("remove freq %d from acs list", freq);
|
|
|
continue;
|
|
|
}
|
|
|
- /* Add only safe channels to the acs cfg ch list */
|
|
|
+ /* Add only allowed channels to the acs cfg ch list */
|
|
|
sap_ctx->acs_cfg->freq_list[num_safe_ch++] =
|
|
|
sap_ctx->acs_cfg->freq_list[i];
|
|
|
}
|