3 * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
15 #include "utils/includes.h"
17 #include "utils/common.h"
21 struct wlantest_bss * bss_get(struct wlantest *wt, const u8 *bssid)
23 struct wlantest_bss *bss;
26 return NULL; /* Skip group addressed frames */
28 dl_list_for_each(bss, &wt->bss, struct wlantest_bss, list) {
29 if (os_memcmp(bss->bssid, bssid, ETH_ALEN) == 0)
33 bss = os_zalloc(sizeof(*bss));
36 os_memcpy(bss->bssid, bssid, ETH_ALEN);
37 dl_list_add(&wt->bss, &bss->list);
38 wpa_printf(MSG_DEBUG, "Discovered new BSS - " MACSTR,
44 void bss_deinit(struct wlantest_bss *bss)
46 dl_list_del(&bss->list);