aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wps_supplicant.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-12-21 15:59:25 +0200
committerJouni Malinen <j@w1.fi>2009-12-21 15:59:25 +0200
commitc0e4dd9eeb96fa39cc8bd6151fbf5a7a9cc46a97 (patch)
treed376612ff9471a2b92ec23ef32a710d22a4435ca /wpa_supplicant/wps_supplicant.c
parentb64576fcf511dc7f705708e6640bbef76ead4b7b (diff)
downloadexternal_wpa_supplicant_8_ti-c0e4dd9eeb96fa39cc8bd6151fbf5a7a9cc46a97.zip
external_wpa_supplicant_8_ti-c0e4dd9eeb96fa39cc8bd6151fbf5a7a9cc46a97.tar.gz
external_wpa_supplicant_8_ti-c0e4dd9eeb96fa39cc8bd6151fbf5a7a9cc46a97.tar.bz2
WPS: Make Config Methods configurable for wpa_supplicant
This adds config_methods configuration option for wpa_supplicant following the design used in hostapd. In addition, the string is now parsed in common code from src/wps/wps_common.c and the list of configurable methods include all the defined methods from WPS 1.0h spec.
Diffstat (limited to 'wpa_supplicant/wps_supplicant.c')
-rw-r--r--wpa_supplicant/wps_supplicant.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wpa_supplicant/wps_supplicant.c b/wpa_supplicant/wps_supplicant.c
index 1231d44..e7b2a7a 100644
--- a/wpa_supplicant/wps_supplicant.c
+++ b/wpa_supplicant/wps_supplicant.c
@@ -841,6 +841,8 @@ int wpas_wps_init(struct wpa_supplicant *wpa_s)
wps->dev.model_name = wpa_s->conf->model_name;
wps->dev.model_number = wpa_s->conf->model_number;
wps->dev.serial_number = wpa_s->conf->serial_number;
+ wps->config_methods =
+ wps_config_methods_str2bin(wpa_s->conf->config_methods);
if (wpa_s->conf->device_type &&
wps_dev_type_str2bin(wpa_s->conf->device_type,
wps->dev.pri_dev_type) < 0) {
@@ -1116,8 +1118,6 @@ int wpas_wps_er_start(struct wpa_supplicant *wpa_s)
wps_er_refresh(wpa_s->wps_er);
return 0;
}
- wpa_s->wps->config_methods |= WPS_CONFIG_DISPLAY;
- wpa_s->wps->config_methods |= WPS_CONFIG_KEYPAD;
wpa_s->wps_er = wps_er_init(wpa_s->wps, wpa_s->ifname);
if (wpa_s->wps_er == NULL)
return -1;