mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
device: Add device_set_scan_results
This commit is contained in:
parent
9c9e6f6f29
commit
42fb2a7c0f
15
src/device.c
15
src/device.c
@ -319,10 +319,12 @@ static bool bss_match(const void *a, const void *b)
|
||||
return !memcmp(bss_a->addr, bss_b->addr, sizeof(bss_a->addr));
|
||||
}
|
||||
|
||||
static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex,
|
||||
struct l_queue *bss_list, void *userdata)
|
||||
/*
|
||||
* Used when scan results were obtained; either from passive scan running
|
||||
* inside device.c or active scans running in other state machines, e.g. wsc.c
|
||||
*/
|
||||
void device_set_scan_results(struct device *device, struct l_queue *bss_list)
|
||||
{
|
||||
struct device *device = userdata;
|
||||
struct network *network;
|
||||
const struct l_queue_entry *bss_entry;
|
||||
struct timespec now;
|
||||
@ -375,7 +377,14 @@ static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex,
|
||||
|
||||
if (device->state == DEVICE_STATE_AUTOCONNECT)
|
||||
device_autoconnect_next(device);
|
||||
}
|
||||
|
||||
static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex,
|
||||
struct l_queue *bss_list, void *userdata)
|
||||
{
|
||||
struct device *device = userdata;
|
||||
|
||||
device_set_scan_results(device, bss_list);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,7 @@ uint32_t device_add_state_watch(struct device *device,
|
||||
device_destroy_func_t destroy);
|
||||
bool device_remove_state_watch(struct device *device, uint32_t id);
|
||||
|
||||
void device_set_scan_results(struct device *device, struct l_queue *bss_list);
|
||||
struct network *device_network_find(struct device *device, const char *ssid,
|
||||
enum security security);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user