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:
parent
ad79dba127
commit
94377fbc52
3 changed files with 22 additions and 1 deletions
|
@ -1825,6 +1825,22 @@ int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr)
|
|||
}
|
||||
|
||||
|
||||
int wpa_tdls_reneg(struct wpa_sm *sm, const u8 *addr)
|
||||
{
|
||||
struct wpa_tdls_peer *peer;
|
||||
|
||||
for (peer = sm->tdls; peer; peer = peer->next) {
|
||||
if (os_memcmp(peer->addr, addr, ETH_ALEN) == 0)
|
||||
break;
|
||||
}
|
||||
|
||||
if (peer == NULL || !peer->tpk_success)
|
||||
return -1;
|
||||
|
||||
return wpa_tdls_start(sm, addr);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* wpa_supplicant_rx_tdls - Receive TDLS data frame
|
||||
*
|
||||
|
|
|
@ -339,6 +339,7 @@ wpa_ft_validate_reassoc_resp(struct wpa_sm *sm, const u8 *ies, size_t ies_len,
|
|||
|
||||
/* tdls.c */
|
||||
int wpa_tdls_start(struct wpa_sm *sm, const u8 *addr);
|
||||
int wpa_tdls_reneg(struct wpa_sm *sm, const u8 *addr);
|
||||
int wpa_tdls_recv_teardown_notify(struct wpa_sm *sm, const u8 *addr,
|
||||
u16 reason_code);
|
||||
int wpa_tdls_init(struct wpa_sm *sm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue