diff options
author | Purushottam Kushwaha <pkushwah@qti.qualcomm.com> | 2016-04-29 16:16:44 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2016-08-24 08:07:38 -0600 |
commit | f9dff7db306a293b3df6fb9fc65fac7549875d5b (patch) | |
tree | 6b6e18ddf7b52e2a7734ecc92a21e3120b44eff2 | |
parent | 774c7923c0233087e50ad0ec8ae93553936bc445 (diff) | |
download | android_external_wpa_supplicant_8-f9dff7db306a293b3df6fb9fc65fac7549875d5b.tar.gz android_external_wpa_supplicant_8-f9dff7db306a293b3df6fb9fc65fac7549875d5b.tar.bz2 android_external_wpa_supplicant_8-f9dff7db306a293b3df6fb9fc65fac7549875d5b.zip |
P2PS: Correct config_methods for different P2P cases
Add P2PS config flag only when config_methods are set. This restores the
pre-P2PS behavioer for the cases where Display or Keypad config method
is specified for a peer (i.e., do not add the new P2PS method in that
case).
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
CRs-Fixed: 1019491
Git-commit: 467fc149d357ddda1dbed57617989252fb4d61d9
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I810f450d873d1a16952bacce911530f89ece1501
-rw-r--r-- | src/p2p/p2p_build.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/p2p/p2p_build.c b/src/p2p/p2p_build.c index 793d28ba..2882c6ad 100644 --- a/src/p2p/p2p_build.c +++ b/src/p2p/p2p_build.c @@ -202,11 +202,11 @@ void p2p_buf_add_device_info(struct wpabuf *buf, struct p2p_data *p2p, if (peer && peer->wps_method != WPS_NOT_READY) { if (peer->wps_method == WPS_PBC) methods |= WPS_CONFIG_PUSHBUTTON; + else if (peer->wps_method == WPS_P2PS) + methods |= WPS_CONFIG_P2PS; else if (peer->wps_method == WPS_PIN_DISPLAY || - peer->wps_method == WPS_PIN_KEYPAD) { + peer->wps_method == WPS_PIN_KEYPAD) methods |= WPS_CONFIG_DISPLAY | WPS_CONFIG_KEYPAD; - methods |= WPS_CONFIG_P2PS; - } } else if (p2p->cfg->config_methods) { methods |= p2p->cfg->config_methods & (WPS_CONFIG_PUSHBUTTON | WPS_CONFIG_DISPLAY | |