diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-09-08 16:48:06 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-09-08 16:48:06 +0300 |
commit | 25e5d5bc08426309cb6cae19dfff179c51f08f23 (patch) | |
tree | 83991595fc79c1831bc6ed0cdb96ce1de9c38a68 /src/p2p | |
parent | 07fecd3915cdac99eab751606cee85a6729e578a (diff) | |
download | external_wpa_supplicant_8_ti-25e5d5bc08426309cb6cae19dfff179c51f08f23.zip external_wpa_supplicant_8_ti-25e5d5bc08426309cb6cae19dfff179c51f08f23.tar.gz external_wpa_supplicant_8_ti-25e5d5bc08426309cb6cae19dfff179c51f08f23.tar.bz2 |
P2P: Allow advertisement config methods to be limited
The default config methods was hardcoded to claim support for
PushButton, Display, and Keypad. While these are supported by
most P2P devices, there may be some cases where it is convenient
to be able to disable a specific config method. Use config_methods
configuration parameter to set the default values for Config Methods
in the P2P Device Info attribute.
Diffstat (limited to 'src/p2p')
-rw-r--r-- | src/p2p/p2p_build.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c index 5aba1e1..a82e16d 100644 --- a/src/p2p/p2p_build.c +++ b/src/p2p/p2p_build.c @@ -174,6 +174,10 @@ void p2p_buf_add_device_info(struct wpabuf *buf, struct p2p_data *p2p, else if (peer->wps_method == WPS_PIN_DISPLAY || peer->wps_method == WPS_PIN_KEYPAD) methods |= WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD; + } else if (p2p->cfg->config_methods) { + methods |= p2p->cfg->config_methods & + (WPS_CONFIG_PUSHBUTTON | WPS_CONFIG_DISPLAY | + WPS_CONFIG_KEYPAD); } else { methods |= WPS_CONFIG_PUSHBUTTON; methods |= WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD; |