diff options
author | Jouni Malinen <jouni.malinen@atheros.com> | 2011-01-28 01:24:24 +0200 |
---|---|---|
committer | Jouni Malinen <j@w1.fi> | 2011-03-06 14:54:44 +0200 |
commit | 94377fbc52dcb54fb8ab76b722e7d947ca34ed08 (patch) | |
tree | bc1cc5996a245f51ec65b2912a7b663ccb3fa414 /src/rsn_supp | |
parent | ad79dba127fa29b8b95dd131e9b11c7088f0eba4 (diff) | |
download | external_wpa_supplicant_8_ti-94377fbc52dcb54fb8ab76b722e7d947ca34ed08.zip external_wpa_supplicant_8_ti-94377fbc52dcb54fb8ab76b722e7d947ca34ed08.tar.gz external_wpa_supplicant_8_ti-94377fbc52dcb54fb8ab76b722e7d947ca34ed08.tar.bz2 |
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.
Diffstat (limited to 'src/rsn_supp')
-rw-r--r-- | src/rsn_supp/tdls.c | 16 | ||||
-rw-r--r-- | src/rsn_supp/wpa.h | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/src/rsn_supp/tdls.c b/src/rsn_supp/tdls.c index 0d892d2..04f544e 100644 --- a/src/rsn_supp/tdls.c +++ b/src/rsn_supp/tdls.c @@ -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 * diff --git a/src/rsn_supp/wpa.h b/src/rsn_supp/wpa.h index f22a831..f14062b 100644 --- a/src/rsn_supp/wpa.h +++ b/src/rsn_supp/wpa.h @@ -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); |