aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2011-01-24 14:33:48 +0200
committerJouni Malinen <j@w1.fi>2011-01-24 14:34:54 +0200
commit719e7eb28d5679e9a3c7e44366a80d4403bc5cdc (patch)
treed6911a465160416a5e97d6c3f38b6820e16dd112 /wlantest
parent0d2e395d74e5d4a77faad08bedb8609209ea0a12 (diff)
downloadexternal_wpa_supplicant_8_ti-719e7eb28d5679e9a3c7e44366a80d4403bc5cdc.zip
external_wpa_supplicant_8_ti-719e7eb28d5679e9a3c7e44366a80d4403bc5cdc.tar.gz
external_wpa_supplicant_8_ti-719e7eb28d5679e9a3c7e44366a80d4403bc5cdc.tar.bz2
wlantest: Set direct links down on deauth/disassoc
Diffstat (limited to 'wlantest')
-rw-r--r--wlantest/rx_mgmt.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c
index dd430be..6772376 100644
--- a/wlantest/rx_mgmt.c
+++ b/wlantest/rx_mgmt.c
@@ -170,6 +170,20 @@ static void deauth_all_stas(struct wlantest_bss *bss)
}
+static void tdls_link_down(struct wlantest_bss *bss, struct wlantest_sta *sta)
+{
+ struct wlantest_tdls *tdls;
+ dl_list_for_each(tdls, &bss->tdls, struct wlantest_tdls, list) {
+ if ((tdls->init == sta || tdls->resp == sta) && tdls->link_up)
+ {
+ wpa_printf(MSG_DEBUG, "TDLS: Set link down based on "
+ "STA deauth/disassoc");
+ tdls->link_up = 0;
+ }
+ }
+}
+
+
static void rx_mgmt_deauth(struct wlantest *wt, const u8 *data, size_t len,
int valid)
{
@@ -228,6 +242,7 @@ static void rx_mgmt_deauth(struct wlantest *wt, const u8 *data, size_t len,
MAC2STR(sta->addr), MAC2STR(bss->bssid));
sta->state = STATE1;
}
+ tdls_link_down(bss, sta);
}
@@ -564,6 +579,7 @@ static void rx_mgmt_disassoc(struct wlantest *wt, const u8 *data, size_t len,
MAC2STR(sta->addr), MAC2STR(bss->bssid));
sta->state = STATE2;
}
+ tdls_link_down(bss, sta);
}