aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorSunil Dutt <usdutt@qti.qualcomm.com>2013-11-13 11:35:44 (GMT)
committerJouni Malinen <j@w1.fi>2013-11-15 01:02:08 (GMT)
commit800d58721c8a5721d1ddb1271093350ab769ade0 (patch)
treeee3d81345ca5fa5af8473ba8cd13ba8de65f5ede /wpa_supplicant/ctrl_iface.c
parent795baf773f6d53bae3cfae4df6edda63e5022344 (diff)
downloadhostap-800d58721c8a5721d1ddb1271093350ab769ade0.zip
hostap-800d58721c8a5721d1ddb1271093350ab769ade0.tar.gz
hostap-800d58721c8a5721d1ddb1271093350ab769ade0.tar.bz2
TDLS: Provide external control to specify the peers for setup
There are use cases requesting the host driver to initiate the TDLS setup with the peer only when configured by the external applications. Thus, enable this control by tdls_external_control=1 and pass the requisite information for the specific TDLS operation to the driver on the request from such use cases. This operation mode expects the driver to initiate TDLS link automatically based on signal strength and traffic to a peer and tear down links whenever they are not used or suitable due to signal strength etc. The list of peers with which such operations are to be performed are provided with the TDLS driver operations. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index ebe08b3..615a972 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -571,6 +571,10 @@ static int wpa_supplicant_ctrl_iface_tdls_setup(
wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_SETUP " MACSTR,
MAC2STR(peer));
+ if ((wpa_s->conf->tdls_external_control) &&
+ wpa_tdls_is_external_setup(wpa_s->wpa))
+ return wpa_drv_tdls_oper(wpa_s, TDLS_SETUP, peer);
+
wpa_tdls_remove(wpa_s->wpa, peer);
if (wpa_tdls_is_external_setup(wpa_s->wpa))
@@ -597,6 +601,10 @@ static int wpa_supplicant_ctrl_iface_tdls_teardown(
wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_TEARDOWN " MACSTR,
MAC2STR(peer));
+ if ((wpa_s->conf->tdls_external_control) &&
+ wpa_tdls_is_external_setup(wpa_s->wpa))
+ return wpa_drv_tdls_oper(wpa_s, TDLS_TEARDOWN, peer);
+
if (wpa_tdls_is_external_setup(wpa_s->wpa))
ret = wpa_tdls_teardown_link(
wpa_s->wpa, peer,