hostapd: update to latest version from trunk (fixes #10455)
[openwrt-10.03/.git] / package / hostapd / patches / 730-wps_single_auth_enc_type.patch
1 --- a/src/ap/wps_hostapd.c
2 +++ b/src/ap/wps_hostapd.c
3 @@ -799,11 +799,9 @@ int hostapd_init_wps(struct hostapd_data
4  
5                 if (conf->rsn_pairwise & WPA_CIPHER_CCMP)
6                         wps->encr_types |= WPS_ENCR_AES;
7 -               if (conf->rsn_pairwise & WPA_CIPHER_TKIP)
8 +               else if (conf->rsn_pairwise & WPA_CIPHER_TKIP)
9                         wps->encr_types |= WPS_ENCR_TKIP;
10 -       }
11 -
12 -       if (conf->wpa & WPA_PROTO_WPA) {
13 +       } else if (conf->wpa & WPA_PROTO_WPA) {
14                 if (conf->wpa_key_mgmt & WPA_KEY_MGMT_PSK)
15                         wps->auth_types |= WPS_AUTH_WPAPSK;
16                 if (conf->wpa_key_mgmt & WPA_KEY_MGMT_IEEE8021X)
17 @@ -811,7 +809,7 @@ int hostapd_init_wps(struct hostapd_data
18  
19                 if (conf->wpa_pairwise & WPA_CIPHER_CCMP)
20                         wps->encr_types |= WPS_ENCR_AES;
21 -               if (conf->wpa_pairwise & WPA_CIPHER_TKIP)
22 +               else if (conf->wpa_pairwise & WPA_CIPHER_TKIP)
23                         wps->encr_types |= WPS_ENCR_TKIP;
24         }
25