aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/ap_drv_ops.c
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@qti.qualcomm.com>2017-05-16 10:42:38 (GMT)
committerJouni Malinen <j@w1.fi>2017-05-27 08:50:21 (GMT)
commit2d18ab40826ecaec26bfd82d42dcb08f2715e362 (patch)
tree1e42a579e505927cd3544599fbdd1b4a89a04156 /src/ap/ap_drv_ops.c
parent3c2bd55f032be82dfacb81d270060beec702b0f2 (diff)
downloadhostap-2d18ab40826ecaec26bfd82d42dcb08f2715e362.zip
hostap-2d18ab40826ecaec26bfd82d42dcb08f2715e362.tar.gz
hostap-2d18ab40826ecaec26bfd82d42dcb08f2715e362.tar.bz2
Add a config parameter to exclude DFS channels from ACS
The new acs_exclude_dfs=1 parameter can be used to request hostapd to exclude all DFS channels from ACS consideration. This is mainly of use for cases where the driver supports DFS channels, but for some reason a non-DFS channel is desired when using automatic channel selection. Previously, the chanlist parameter could have been used for this, but that required listing all the acceptable channels. The new parameter allows this to be done without such a list. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/ap/ap_drv_ops.c')
-rw-r--r--src/ap/ap_drv_ops.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ap/ap_drv_ops.c b/src/ap/ap_drv_ops.c
index ecf60e2..b3d4f03 100644
--- a/src/ap/ap_drv_ops.c
+++ b/src/ap/ap_drv_ops.c
@@ -816,7 +816,9 @@ static void hostapd_get_hw_mode_any_channels(struct hostapd_data *hapd,
if ((acs_ch_list_all ||
freq_range_list_includes(&hapd->iface->conf->acs_ch_list,
chan->chan)) &&
- !(chan->flag & HOSTAPD_CHAN_DISABLED))
+ !(chan->flag & HOSTAPD_CHAN_DISABLED) &&
+ !(hapd->iface->conf->acs_exclude_dfs &&
+ (chan->flag & HOSTAPD_CHAN_RADAR)))
int_array_add_unique(freq_list, chan->freq);
}
}
@@ -871,6 +873,9 @@ int hostapd_drv_do_acs(struct hostapd_data *hapd)
&hapd->iface->conf->acs_ch_list,
chan->chan))
continue;
+ if (hapd->iface->conf->acs_exclude_dfs &&
+ (chan->flag & HOSTAPD_CHAN_RADAR))
+ continue;
if (!(chan->flag & HOSTAPD_CHAN_DISABLED)) {
channels[num_channels++] = chan->chan;
int_array_add_unique(&freq_list, chan->freq);