From: Jouni Malinen Date: Fri, 28 Jan 2011 17:28:19 +0000 (+0200) Subject: TDLS: Add tdls_testing 0x400 for ignoring AP prohibit TDLS X-Git-Tag: hostap-1-bp~510 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8fb017272ed4794339978c9fbc0e74571a44728;p=thirdparty%2Fhostap.git TDLS: Add tdls_testing 0x400 for ignoring AP prohibit TDLS --- diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index a6e7f952a..4ee363951 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -38,6 +38,7 @@ #define TDLS_TESTING_CONCURRENT_INIT BIT(7) #define TDLS_TESTING_NO_TPK_EXPIRATION BIT(8) #define TDLS_TESTING_DECLINE_RESP BIT(9) +#define TDLS_TESTING_IGNORE_AP_PROHIBIT BIT(10) unsigned int tdls_testing = 0; #endif /* CONFIG_TDLS_TESTING */ @@ -1225,6 +1226,13 @@ static int wpa_tdls_process_tpk_m1(struct wpa_sm *sm, const u8 *src_addr, peer->initiator = 1; wpa_tdls_send_tpk_m1(sm, peer); } + + if ((tdls_testing & TDLS_TESTING_IGNORE_AP_PROHIBIT) && + tdls_prohibited) { + wpa_printf(MSG_DEBUG, "TDLS: Testing - ignore AP prohibition " + "on TDLS"); + tdls_prohibited = 0; + } #endif /* CONFIG_TDLS_TESTING */ if (tdls_prohibited) { @@ -1817,6 +1825,15 @@ int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr) struct wpa_tdls_peer *peer; int tdls_prohibited = sm->tdls_prohibited; +#ifdef CONFIG_TDLS_TESTING + if ((tdls_testing & TDLS_TESTING_IGNORE_AP_PROHIBIT) && + tdls_prohibited) { + wpa_printf(MSG_DEBUG, "TDLS: Testing - ignore AP prohibition " + "on TDLS"); + tdls_prohibited = 0; + } +#endif /* CONFIG_TDLS_TESTING */ + if (tdls_prohibited) { wpa_printf(MSG_DEBUG, "TDLS: TDLS is prohibited in this BSS - " "reject request to start setup");