hostapd: enter DFS state if no available channel is found
[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 @@ -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 @@ -1178,8 +1177,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;