TDLS: Fully tear down existing link before setup
authorArik Nemtsov <arik@wizery.com>
Thu, 24 Apr 2014 05:45:38 +0000 (08:45 +0300)
committerJouni Malinen <j@w1.fi>
Tue, 29 Apr 2014 15:59:12 +0000 (18:59 +0300)
Disabling the link only clears the local state. The remote peer will
still think we are connected and disallow the setup.

Signed-off-by: Arik Nemtsov <arikx.nemtsov@intel.com>
src/rsn_supp/tdls.c

index d3d0c42..3b14656 100644 (file)
@@ -2463,7 +2463,8 @@ void wpa_tdls_remove(struct wpa_sm *sm, const u8 *addr)
                 * Disable previous link to allow renegotiation to be completed
                 * on AP path.
                 */
-               wpa_tdls_disable_peer_link(sm, peer);
+               wpa_tdls_do_teardown(sm, peer,
+                                    WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED);
        }
 }