aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/config_file.c
diff options
context:
space:
mode:
authorShan Palanisamy <shanp@qca.qualcomm.com>2012-02-16 19:36:48 +0200
committerJouni Malinen <j@w1.fi>2012-02-16 19:36:48 +0200
commit31b79e11973e87ddd4abc2782ad1374fee80f17b (patch)
tree8cf64edff00fa90a8c6db71704ffa698e677f395 /hostapd/config_file.c
parenta7f5b74d43c1c9b280d9663dd0443d333ad78013 (diff)
downloadexternal_wpa_supplicant_8_ti-31b79e11973e87ddd4abc2782ad1374fee80f17b.zip
external_wpa_supplicant_8_ti-31b79e11973e87ddd4abc2782ad1374fee80f17b.tar.gz
external_wpa_supplicant_8_ti-31b79e11973e87ddd4abc2782ad1374fee80f17b.tar.bz2
hostapd: Allow config parameters to be set through ctrl_iface
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/config_file.c')
-rw-r--r--hostapd/config_file.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 6949d52..77a34fb 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -2276,3 +2276,28 @@ struct hostapd_config * hostapd_config_read(const char *fname)
return conf;
}
+
+
+int hostapd_set_iface(struct hostapd_config *conf,
+ struct hostapd_bss_config *bss, char *field, char *value)
+{
+ int errors = 0;
+ size_t i;
+
+ errors = hostapd_config_fill(conf, bss, field, value, 0);
+ if (errors) {
+ wpa_printf(MSG_INFO, "Failed to set configuration field '%s' "
+ "to value '%s'", field, value);
+ return -1;
+ }
+
+ for (i = 0; i < conf->num_bss; i++)
+ hostapd_set_security_params(&conf->bss[i]);
+
+ if (hostapd_config_check(conf)) {
+ wpa_printf(MSG_ERROR, "Configuration check failed");
+ errors++;
+ }
+
+ return 0;
+}