f5872cd5979e48aa0f918635af0852f2c1acb027
[openwrt/staging/dedeckeh.git] / package / network / services / hostapd / patches / 400-wps_single_auth_enc_type.patch
1 --- a/src/ap/wps_hostapd.c
2 +++ b/src/ap/wps_hostapd.c
3 @@ -352,8 +352,7 @@ static int hapd_wps_reconfig_in_memory(s
4 bss->wpa_pairwise |= WPA_CIPHER_GCMP;
5 else
6 bss->wpa_pairwise |= WPA_CIPHER_CCMP;
7 - }
8 - if (cred->encr_type & WPS_ENCR_TKIP)
9 + } else if (cred->encr_type & WPS_ENCR_TKIP)
10 bss->wpa_pairwise |= WPA_CIPHER_TKIP;
11 bss->rsn_pairwise = bss->wpa_pairwise;
12 bss->wpa_group = wpa_select_ap_group_cipher(bss->wpa,
13 @@ -1073,8 +1072,7 @@ int hostapd_init_wps(struct hostapd_data
14 if (conf->rsn_pairwise & (WPA_CIPHER_CCMP | WPA_CIPHER_GCMP)) {
15 wps->encr_types |= WPS_ENCR_AES;
16 wps->encr_types_rsn |= WPS_ENCR_AES;
17 - }
18 - if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
19 + } else if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
20 wps->encr_types |= WPS_ENCR_TKIP;
21 wps->encr_types_rsn |= WPS_ENCR_TKIP;
22 }