hostapd: adjust patches to work with git am
[openwrt/staging/xback.git] / package / network / services / hostapd / patches / 400-wps_single_auth_enc_type.patch
1 From: Felix Fietkau <nbd@openwrt.org>
2 Date: Sat, 9 Jul 2011 07:19:55 +0000
3 Subject: [PATCH] hostapd: only advertise a single encryption type via WPS if
4 multiple are supported
5
6 Fixes windows 7 interop issues
7
8 --- a/src/ap/wps_hostapd.c
9 +++ b/src/ap/wps_hostapd.c
10 @@ -394,9 +394,8 @@ static int hapd_wps_reconfig_in_memory(s
11 bss->wpa_pairwise |= WPA_CIPHER_GCMP;
12 else
13 bss->wpa_pairwise |= WPA_CIPHER_CCMP;
14 - }
15 #ifndef CONFIG_NO_TKIP
16 - if (cred->encr_type & WPS_ENCR_TKIP)
17 + } else if (cred->encr_type & WPS_ENCR_TKIP)
18 bss->wpa_pairwise |= WPA_CIPHER_TKIP;
19 #endif /* CONFIG_NO_TKIP */
20 bss->rsn_pairwise = bss->wpa_pairwise;
21 @@ -1181,8 +1180,7 @@ int hostapd_init_wps(struct hostapd_data
22 WPA_CIPHER_GCMP_256)) {
23 wps->encr_types |= WPS_ENCR_AES;
24 wps->encr_types_rsn |= WPS_ENCR_AES;
25 - }
26 - if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
27 + } else if (conf->rsn_pairwise & WPA_CIPHER_TKIP) {
28 #ifdef CONFIG_NO_TKIP
29 wpa_printf(MSG_INFO, "WPS: TKIP not supported");
30 goto fail;