ACS: Don't select indoor channel on outdoor operation

Don't select channels designated for exclusive indoor use when the
country string is set for outdoor operation (country3=0x4f, i.e., the
third character of the country string is 'O').

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer 2022-09-11 18:41:12 +02:00 committed by Jouni Malinen
parent 1f795df7aa
commit 7ed17eee3a
2 changed files with 16 additions and 0 deletions

View file

@ -553,6 +553,10 @@ static void acs_survey_mode_interference_factor(
if (chan->max_tx_power < iface->conf->min_tx_power)
continue;
if ((chan->flag & HOSTAPD_CHAN_INDOOR_ONLY) &&
iface->conf->country[2] == 0x4f)
continue;
wpa_printf(MSG_DEBUG, "ACS: Survey analysis for channel %d (%d MHz)",
chan->chan, chan->freq);
@ -687,6 +691,10 @@ acs_find_ideal_chan_mode(struct hostapd_iface *iface,
if (chan->max_tx_power < iface->conf->min_tx_power)
continue;
if ((chan->flag & HOSTAPD_CHAN_INDOOR_ONLY) &&
iface->conf->country[2] == 0x4f)
continue;
if (!chan_bw_allowed(chan, bw, 1, 1)) {
wpa_printf(MSG_DEBUG,
"ACS: Channel %d: BW %u is not supported",
@ -1068,6 +1076,10 @@ static int * acs_request_scan_add_freqs(struct hostapd_iface *iface,
if (chan->max_tx_power < iface->conf->min_tx_power)
continue;
if ((chan->flag & HOSTAPD_CHAN_INDOOR_ONLY) &&
iface->conf->country[2] == 0x4f)
continue;
*freq++ = chan->freq;
}

View file

@ -281,6 +281,10 @@ static int dfs_find_channel(struct hostapd_iface *iface,
if (chan->max_tx_power < iface->conf->min_tx_power)
continue;
if ((chan->flag & HOSTAPD_CHAN_INDOOR_ONLY) &&
iface->conf->country[2] == 0x4f)
continue;
if (ret_chan && idx == channel_idx) {
wpa_printf(MSG_DEBUG, "Selected channel %d (%d)",
chan->freq, chan->chan);