From: Sunil Dutt Date: Tue, 7 May 2013 13:27:31 +0000 (+0300) Subject: TDLS: Do not overwrite the reason code in the Tear Down Request X-Git-Tag: aosp-kk-from-upstream~286 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=55293aa;p=thirdparty%2Fhostap.git TDLS: Do not overwrite the reason code in the Tear Down Request The reason code for the teardown request is overwritten for open mode. This commit removes the code that does so by reverting parts of commit 0cb12963b69abf493e456c8b2ed2b0be30ce11e7. Signed-hostap: Jouni Malinen --- diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 441628f40..81e2a5c0a 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -698,13 +698,8 @@ int wpa_tdls_send_teardown(struct wpa_sm *sm, const u8 *addr, u16 reason_code) return -1; pos = rbuf; - if (!wpa_tdls_get_privacy(sm) || !peer->tpk_set || !peer->tpk_success) { - if (reason_code != WLAN_REASON_DEAUTH_LEAVING) { - /* Overwrite the reason code */ - reason_code = WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED; - } + if (!wpa_tdls_get_privacy(sm) || !peer->tpk_set || !peer->tpk_success) goto skip_ies; - } ftie = (struct wpa_tdls_ftie *) pos; ftie->ie_type = WLAN_EID_FAST_BSS_TRANSITION;