[PATCH] acs: don't select indoor channel on outdoor operation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don't select channels designated for exclusive indoor use when the
country3 element is set for outdoor operation.

Signed-off-by: David Bauer <mail@xxxxxxxxxxxxxxx>
---
 src/ap/acs.c | 9 +++++++++
 src/ap/dfs.c | 3 +++
 2 files changed, 12 insertions(+)

diff --git a/src/ap/acs.c b/src/ap/acs.c
index 7708bc283..deeccabe1 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -553,6 +553,9 @@ 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 +690,9 @@ 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 +1074,9 @@ 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;
 	}
 
diff --git a/src/ap/dfs.c b/src/ap/dfs.c
index 146dd1ada..bd4acc964 100644
--- a/src/ap/dfs.c
+++ b/src/ap/dfs.c
@@ -281,6 +281,9 @@ 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);
-- 
2.35.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux