aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/bss.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-24 12:26:35 (GMT)
committerJouni Malinen <j@w1.fi>2011-01-24 12:34:45 (GMT)
commit0d2e395d74e5d4a77faad08bedb8609209ea0a12 (patch)
tree803ebddc417155ec193f67f294751f209206d793 /wlantest/bss.c
parenteb4923fdae82a8d9609762bfc87d3012e9f29414 (diff)
downloadhostap-0d2e395d74e5d4a77faad08bedb8609209ea0a12.zip
hostap-0d2e395d74e5d4a77faad08bedb8609209ea0a12.tar.gz
hostap-0d2e395d74e5d4a77faad08bedb8609209ea0a12.tar.bz2
wlantest: Maintain only a single entry for an active direct link
The TDLS link itself is bidirectional, but there is explicit initiator/responder roles. Remove the other direction of the link if it exists when processing TDLS Setup Confirm to make sure that the link counters are stored for the current TDLS entery. This is also changing the control interface search for TDLS counters to require initiator/responder addresses in the correct order instead of matching entries regardless of the role.
Diffstat (limited to 'wlantest/bss.c')
-rw-r--r--wlantest/bss.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/wlantest/bss.c b/wlantest/bss.c
index a4a3155..34dee50 100644
--- a/wlantest/bss.c
+++ b/wlantest/bss.c
@@ -67,6 +67,13 @@ void pmk_deinit(struct wlantest_pmk *pmk)
}
+void tdls_deinit(struct wlantest_tdls *tdls)
+{
+ dl_list_del(&tdls->list);
+ os_free(tdls);
+}
+
+
void bss_deinit(struct wlantest_bss *bss)
{
struct wlantest_sta *sta, *n;
@@ -77,7 +84,7 @@ void bss_deinit(struct wlantest_bss *bss)
dl_list_for_each_safe(pmk, np, &bss->pmk, struct wlantest_pmk, list)
pmk_deinit(pmk);
dl_list_for_each_safe(tdls, nt, &bss->tdls, struct wlantest_tdls, list)
- os_free(tdls);
+ tdls_deinit(tdls);
dl_list_del(&bss->list);
os_free(bss);
}