From db9af0da709aef32c3bbcc985b21ac00c71d6548 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 27 Oct 2011 23:13:14 +0300 Subject: [PATCH] TDLS: Disable previous link to fix renegotiation --- src/rsn_supp/tdls.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index b336ba9db..f7b1dc457 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -2106,6 +2106,14 @@ int wpa_tdls_reneg(struct wpa_sm *sm, const u8 *addr) if (peer == NULL || !peer->tpk_success) return -1; + if (sm->tdls_external_setup) { + /* + * Disable previous link to allow renegotiation to be completed + * on AP path. + */ + wpa_sm_tdls_oper(sm, TDLS_DISABLE_LINK, peer->addr); + } + return wpa_tdls_start(sm, addr); }