mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
network: Add network_bss_find_by_addr
This commit is contained in:
parent
dc3a6a2f77
commit
9c9e6f6f29
@ -427,6 +427,22 @@ void network_bss_list_clear(struct network *network)
|
||||
network->bss_list = l_queue_new();
|
||||
}
|
||||
|
||||
struct scan_bss *network_bss_find_by_addr(struct network *network,
|
||||
const uint8_t *addr)
|
||||
{
|
||||
const struct l_queue_entry *bss_entry;
|
||||
|
||||
for (bss_entry = l_queue_get_entries(network->bss_list); bss_entry;
|
||||
bss_entry = bss_entry->next) {
|
||||
struct scan_bss *bss = bss_entry->data;
|
||||
|
||||
if (!memcmp(bss->addr, addr, sizeof(bss->addr)))
|
||||
return bss;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static struct scan_bss *network_select_bss(struct wiphy *wiphy,
|
||||
struct network *network)
|
||||
{
|
||||
|
@ -50,6 +50,8 @@ void network_connect_failed(struct network *network);
|
||||
bool network_bss_add(struct network *network, struct scan_bss *bss);
|
||||
bool network_bss_list_isempty(struct network *network);
|
||||
void network_bss_list_clear(struct network *network);
|
||||
struct scan_bss *network_bss_find_by_addr(struct network *network,
|
||||
const uint8_t *addr);
|
||||
|
||||
bool network_register(struct network *network, const char *path);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user