blob: edcd98525743ed4313f066bae14e788bdf59c649 [file] [log] [blame]
developer29c4d2d2022-12-26 19:41:22 +08001--- a/src/ap/wps_hostapd.c
2+++ b/src/ap/wps_hostapd.c
3@@ -394,9 +394,8 @@ 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 #ifndef CONFIG_NO_TKIP
9- if (cred->encr_type & WPS_ENCR_TKIP)
10+ } else if (cred->encr_type & WPS_ENCR_TKIP)
11 bss->wpa_pairwise |= WPA_CIPHER_TKIP;
12 #endif /* CONFIG_NO_TKIP */
13 bss->rsn_pairwise = bss->wpa_pairwise;
14@@ -1181,8 +1180,7 @@ int hostapd_init_wps(struct hostapd_data
15 WPA_CIPHER_GCMP_256)) {
16 wps->encr_types |= WPS_ENCR_AES;
17 wps->encr_types_rsn |= WPS_ENCR_AES;
18- }
19- if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
20+ } else if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
21 #ifdef CONFIG_NO_TKIP
22 wpa_printf(MSG_INFO, "WPS: TKIP not supported");
23 goto fail;