From patchwork Tue Aug 14 05:26:50 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [RFC] hostapd: disable WPS when WPA-TKIP configuration is set Date: Mon, 13 Aug 2012 19:26:50 -0000 From: Avinash Patil X-Patchwork-Id: 177162 Message-Id: To: hostap@lists.shmoo.com Cc: j@w1.fi TC4.1.11 from WSC2.0 test plan mandates to disable WPS when AP is configured as WPA-TKIP only. This patches disables WPS if AP configuration is WPA-TKIP. Signed-off-by: Avinash Patil --- hostapd/config_file.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) return 0; diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 03f29ad..ad66744 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -1288,6 +1288,13 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, "disabled"); bss->wps_state = 0; } + if (bss->wps_state && bss->wpa == 1 && + !(bss->wpa_pairwise & WPA_CIPHER_CCMP) && + !(bss->rsn_pairwise & WPA_CIPHER_CCMP)) { + bss->wps_state = 0; + wpa_printf(MSG_INFO, "WPS: WPA-TKIP configuration forced WPS to" + " be disabled"); + } #endif /* CONFIG_WPS2 */