aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorManikandan Mohan <manikand@qca.qualcomm.com>2015-03-11 20:03:58 (GMT)
committerJouni Malinen <j@w1.fi>2015-03-23 10:18:05 (GMT)
commit857d94225a94cdb3b843ce29ad231a842b6229b2 (patch)
tree3431eb08780d276e0bc6fa32a4423736b9974cc2 /hostapd/config_file.c
parent0fd52a612a1a1feb945c96ee744daedf5cf02464 (diff)
downloadhostap-857d94225a94cdb3b843ce29ad231a842b6229b2.zip
hostap-857d94225a94cdb3b843ce29ad231a842b6229b2.tar.gz
hostap-857d94225a94cdb3b843ce29ad231a842b6229b2.tar.bz2
Extend offloaded ACS QCA vendor command to support VHT
Update ACS driver offload feature for VHT configuration. In addition, this allows the chanlist parameter to be used to specify which channels are included as options for the offloaded ACS case. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 53143f7..cae9fd3 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -775,6 +775,24 @@ static int hostapd_config_read_wep(struct hostapd_wep_keys *wep, int keyidx,
}
+static int hostapd_parse_chanlist(struct hostapd_config *conf, char *val)
+{
+ char *pos;
+
+ /* for backwards compatibility, translate ' ' in conf str to ',' */
+ pos = val;
+ while (pos) {
+ pos = os_strchr(pos, ' ');
+ if (pos)
+ *pos++ = ',';
+ }
+ if (freq_range_list_parse(&conf->acs_ch_list, val))
+ return -1;
+
+ return 0;
+}
+
+
static int hostapd_parse_intlist(int **int_list, char *val)
{
int *list;
@@ -2542,12 +2560,15 @@ static int hostapd_config_fill(struct hostapd_config *conf,
line);
return 1;
#else /* CONFIG_ACS */
+ conf->acs = 1;
conf->channel = 0;
#endif /* CONFIG_ACS */
- } else
+ } else {
conf->channel = atoi(pos);
+ conf->acs = conf->channel == 0;
+ }
} else if (os_strcmp(buf, "chanlist") == 0) {
- if (hostapd_parse_intlist(&conf->chanlist, pos)) {
+ if (hostapd_parse_chanlist(conf, pos)) {
wpa_printf(MSG_ERROR, "Line %d: invalid channel list",
line);
return 1;