TDLS: Allow wpa_cli tdls_setup to start renegotiation

If there is already a link the requested peer, request start of
renegotiation instead of completely new link. This seems to be needed
to allow some driver to accept the trigger for a new negotiation.
This commit is contained in:
Jouni Malinen 2011-01-28 01:24:24 +02:00 committed by Jouni Malinen
parent ad79dba127
commit 94377fbc52
3 changed files with 22 additions and 1 deletions

View file

@ -211,6 +211,7 @@ static int wpa_supplicant_ctrl_iface_tdls_setup(
struct wpa_supplicant *wpa_s, char *addr)
{
u8 peer[ETH_ALEN];
int ret;
if (hwaddr_aton(addr, peer)) {
wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_SETUP: invalid "
@ -221,7 +222,10 @@ static int wpa_supplicant_ctrl_iface_tdls_setup(
wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_SETUP " MACSTR,
MAC2STR(peer));
return wpa_drv_tdls_oper(wpa_s, TDLS_SETUP, peer);
ret = wpa_tdls_reneg(wpa_s->wpa, peer);
if (ret)
ret = wpa_drv_tdls_oper(wpa_s, TDLS_SETUP, peer);
return ret;
}