diff options
author | Jouni Malinen <jouni@qca.qualcomm.com> | 2011-08-11 16:51:40 +0300 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-08-11 16:51:40 +0300 |
commit | 59639fa11234a8f219a39601d1593537b871677e (patch) | |
tree | 923c216f858ca9eb93e28e2c5754301fb28cbe33 /src/wps | |
parent | ccb941e6da3122937cf87a8145a17907dae534a5 (diff) | |
download | external_wpa_supplicant_8_ti-59639fa11234a8f219a39601d1593537b871677e.zip external_wpa_supplicant_8_ti-59639fa11234a8f219a39601d1593537b871677e.tar.gz external_wpa_supplicant_8_ti-59639fa11234a8f219a39601d1593537b871677e.tar.bz2 |
WPS: Fix default virt/phy pushbutton config method setting
Instead of always adding PHY PushButton config method, only add this
if neither virtual nor physical push button is advertised.
Diffstat (limited to 'src/wps')
-rw-r--r-- | src/wps/wps_registrar.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index 2d7f632..0626214 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -485,10 +485,8 @@ static void wps_set_pushbutton(u16 *methods, u16 conf_methods) *methods |= WPS_CONFIG_VIRT_PUSHBUTTON; if (conf_methods & WPS_CONFIG_PHY_PUSHBUTTON) *methods |= WPS_CONFIG_PHY_PUSHBUTTON; - if ((*methods & WPS_CONFIG_VIRT_PUSHBUTTON) != - WPS_CONFIG_VIRT_PUSHBUTTON || - (*methods & WPS_CONFIG_PHY_PUSHBUTTON) != - WPS_CONFIG_PHY_PUSHBUTTON) { + if (!(*methods & (WPS_CONFIG_VIRT_PUSHBUTTON | + WPS_CONFIG_PHY_PUSHBUTTON))) { /* * Required to include virtual/physical flag, but we were not * configured with push button type, so have to default to one |