aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/events.c
diff options
context:
space:
mode:
authorSunil Dutt <c_duttus@qti.qualcomm.com>2013-09-30 14:10:18 (GMT)
committerJouni Malinen <j@w1.fi>2013-09-30 14:10:18 (GMT)
commitf130b105ec4462b55e829dffe8b3c6b6003227ca (patch)
tree39e34c100542d780170aad9ddcbb607bd45113bb /wpa_supplicant/events.c
parentf9174c3b4e4ca4f624fb05e486bfa61fdbfa4179 (diff)
downloadhostap-f130b105ec4462b55e829dffe8b3c6b6003227ca.zip
hostap-f130b105ec4462b55e829dffe8b3c6b6003227ca.tar.gz
hostap-f130b105ec4462b55e829dffe8b3c6b6003227ca.tar.bz2
TDLS: Clean up wpa_tdls_teardown_link() uses
Making this function be used only for external setup case simplifies the implementation and makes core wpa_supplicant calls in ctrl_iface.c and events.c consistent. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/events.c')
-rw-r--r--wpa_supplicant/events.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
index 69e4030..977564c 100644
--- a/wpa_supplicant/events.c
+++ b/wpa_supplicant/events.c
@@ -2281,8 +2281,12 @@ static void wpa_supplicant_event_tdls(struct wpa_supplicant *wpa_s,
wpa_drv_tdls_oper(wpa_s, TDLS_SETUP, data->tdls.peer);
break;
case TDLS_REQUEST_TEARDOWN:
- wpa_tdls_teardown_link(wpa_s->wpa, data->tdls.peer,
- data->tdls.reason_code);
+ if (wpa_tdls_is_external_setup(wpa_s->wpa))
+ wpa_tdls_teardown_link(wpa_s->wpa, data->tdls.peer,
+ data->tdls.reason_code);
+ else
+ wpa_drv_tdls_oper(wpa_s, TDLS_TEARDOWN,
+ data->tdls.peer);
break;
}
}