diff options
| author | Arend van Spriel <arend@broadcom.com> | 2013-10-08 11:07:25 +0530 |
|---|---|---|
| committer | Sunil Dutt <duttus@codeaurora.org> | 2013-10-08 11:10:32 +0530 |
| commit | be7086c41a38c3728724f52a3b2dc96505f5b4a2 (patch) | |
| tree | 6f8a67f26f83c8f8914bab86c33c02de50c7844d | |
| parent | 48119a1eaaa1798aef056c7935ede5531745dd25 (diff) | |
| download | android_external_wpa_supplicant_8-be7086c41a38c3728724f52a3b2dc96505f5b4a2.tar.gz android_external_wpa_supplicant_8-be7086c41a38c3728724f52a3b2dc96505f5b4a2.tar.bz2 android_external_wpa_supplicant_8-be7086c41a38c3728724f52a3b2dc96505f5b4a2.zip | |
TDLS: Tear down TDLS using wpas_drv_tlds_oper() if not external
When the device indicates to take care of TDLS operations the TDLS
setup is done calling wpas_drv_tdls_oper(). This patch does a similar
thing for the teardown. This fixes failure of teardown:
"TDLS: Could not find peer <mac> for link Teardown"
Signed-hostap: Arend van Spriel <arend@broadcom.com>
Git-commit: 4ed8d954dd4f714ac648b25fc3ec260592fda41b
Git-repo : git://w1.fi/srv/git/hostap.git
CRs-fixed: 555255
Change-Id: I9134b3edece3c6e9d7fb5328910d4c9c41df4fb7
| -rw-r--r-- | wpa_supplicant/ctrl_iface.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 5e5391f2..6509ab13 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -572,6 +572,7 @@ static int wpa_supplicant_ctrl_iface_tdls_teardown( 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_TEARDOWN: invalid " @@ -582,8 +583,14 @@ static int wpa_supplicant_ctrl_iface_tdls_teardown( wpa_printf(MSG_DEBUG, "CTRL_IFACE TDLS_TEARDOWN " MACSTR, MAC2STR(peer)); - return wpa_tdls_teardown_link(wpa_s->wpa, peer, - WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED); + if (wpa_tdls_is_external_setup(wpa_s->wpa)) + ret = wpa_tdls_teardown_link( + wpa_s->wpa, peer, + WLAN_REASON_TDLS_TEARDOWN_UNSPECIFIED); + else + ret = wpa_drv_tdls_oper(wpa_s, TDLS_TEARDOWN, peer); + + return ret; } #endif /* CONFIG_TDLS */ |
