aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2015-03-30 17:49:54 -0700
committerEtan Cohen <etancohen@google.com>2015-03-30 17:49:54 -0700
commitee8bc35776d52fe8f03464b2f7f31dd33ed2f461 (patch)
tree79425d2a9d9322d1e5787c290053fe257076de85 /hostapd
parent2cbf3de767cc1918074cf60c5ed3896cbcf8290a (diff)
parentdda10c2afb8378747491ea5d329a1de635d6d58e (diff)
downloadandroid_external_wpa_supplicant_8-ee8bc35776d52fe8f03464b2f7f31dd33ed2f461.tar.gz
android_external_wpa_supplicant_8-ee8bc35776d52fe8f03464b2f7f31dd33ed2f461.tar.bz2
android_external_wpa_supplicant_8-ee8bc35776d52fe8f03464b2f7f31dd33ed2f461.zip
Merge commit 'dda10c2afb8378747491ea5d329a1de635d6d58e' into merge
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/Android.mk13
-rw-r--r--hostapd/Makefile13
-rw-r--r--hostapd/config_file.c25
-rw-r--r--hostapd/hostapd.conf5
4 files changed, 31 insertions, 25 deletions
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 123d2c90..85ac8c5a 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -557,17 +557,6 @@ CONFIG_INTERNAL_RC4=y
CONFIG_INTERNAL_DH_GROUP5=y
endif
-ifeq ($(CONFIG_TLS), schannel)
-ifdef TLS_FUNCS
-OBJS += src/crypto/tls_schannel.c
-endif
-OBJS += src/crypto/crypto_cryptoapi.c
-OBJS_p += src/crypto/crypto_cryptoapi.c
-CONFIG_INTERNAL_SHA256=y
-CONFIG_INTERNAL_RC4=y
-CONFIG_INTERNAL_DH_GROUP5=y
-endif
-
ifeq ($(CONFIG_TLS), internal)
ifndef CONFIG_CRYPTO
CONFIG_CRYPTO=internal
@@ -805,8 +794,10 @@ OBJS += src/crypto/random.c
HOBJS += src/crypto/random.c
HOBJS += src/utils/eloop.c
HOBJS += $(SHA1OBJS)
+ifneq ($(CONFIG_TLS), openssl)
HOBJS += src/crypto/md5.c
endif
+endif
ifdef CONFIG_RADIUS_SERVER
L_CFLAGS += -DRADIUS_SERVER
diff --git a/hostapd/Makefile b/hostapd/Makefile
index eace68cd..d718c15e 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -553,17 +553,6 @@ CONFIG_INTERNAL_RC4=y
CONFIG_INTERNAL_DH_GROUP5=y
endif
-ifeq ($(CONFIG_TLS), schannel)
-ifdef TLS_FUNCS
-OBJS += ../src/crypto/tls_schannel.o
-endif
-OBJS += ../src/crypto/crypto_cryptoapi.o
-OBJS_p += ../src/crypto/crypto_cryptoapi.o
-CONFIG_INTERNAL_SHA256=y
-CONFIG_INTERNAL_RC4=y
-CONFIG_INTERNAL_DH_GROUP5=y
-endif
-
ifeq ($(CONFIG_TLS), internal)
ifndef CONFIG_CRYPTO
CONFIG_CRYPTO=internal
@@ -803,8 +792,10 @@ OBJS += ../src/crypto/random.o
HOBJS += ../src/crypto/random.o
HOBJS += ../src/utils/eloop.o
HOBJS += $(SHA1OBJS)
+ifneq ($(CONFIG_TLS), openssl)
HOBJS += ../src/crypto/md5.o
endif
+endif
ifdef CONFIG_RADIUS_SERVER
CFLAGS += -DRADIUS_SERVER
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 53143f76..cae9fd30 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;
diff --git a/hostapd/hostapd.conf b/hostapd/hostapd.conf
index 9e81e9e9..90d15232 100644
--- a/hostapd/hostapd.conf
+++ b/hostapd/hostapd.conf
@@ -170,8 +170,11 @@ channel=1
# Channel list restriction. This option allows hostapd to select one of the
# provided channels when a channel should be automatically selected.
-# Default: not set (allow any enabled channel to be selected)
+# Channel list can be provided as range using hyphen ('-') or individual
+# channels can be specified by space (' ') seperated values
+# Default: all channels allowed in selected hw_mode
#chanlist=100 104 108 112 116
+#chanlist=1 6 11-13
# Beacon interval in kus (1.024 ms) (default: 100; range 15..65535)
beacon_int=100