aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/bss.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-11-06 15:31:02 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-07 21:29:00 (GMT)
commit422ef7d2056e982bbd83415f5a329e996b0c2608 (patch)
treeee7d77b826ed8d6cc2352f7c0af7740f14b6d3cb /wlantest/bss.c
parentd84d38935127dc6f64ed1c1b8aa986e85d99c9b6 (diff)
downloadhostap-422ef7d2056e982bbd83415f5a329e996b0c2608.zip
hostap-422ef7d2056e982bbd83415f5a329e996b0c2608.tar.gz
hostap-422ef7d2056e982bbd83415f5a329e996b0c2608.tar.bz2
wlantest: Create station list for each BSS
Diffstat (limited to 'wlantest/bss.c')
-rw-r--r--wlantest/bss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wlantest/bss.c b/wlantest/bss.c
index 11b9248..70eb888 100644
--- a/wlantest/bss.c
+++ b/wlantest/bss.c
@@ -33,6 +33,7 @@ struct wlantest_bss * bss_get(struct wlantest *wt, const u8 *bssid)
bss = os_zalloc(sizeof(*bss));
if (bss == NULL)
return NULL;
+ dl_list_init(&bss->sta);
os_memcpy(bss->bssid, bssid, ETH_ALEN);
dl_list_add(&wt->bss, &bss->list);
wpa_printf(MSG_DEBUG, "Discovered new BSS - " MACSTR,
@@ -43,6 +44,9 @@ struct wlantest_bss * bss_get(struct wlantest *wt, const u8 *bssid)
void bss_deinit(struct wlantest_bss *bss)
{
+ struct wlantest_sta *sta, *n;
+ dl_list_for_each_safe(sta, n, &bss->sta, struct wlantest_sta, list)
+ sta_deinit(sta);
dl_list_del(&bss->list);
os_free(bss);
}