mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
device: Add device_network_find
This commit is contained in:
parent
29d5eeb3ca
commit
dc3a6a2f77
@ -446,6 +446,14 @@ bool device_remove_state_watch(struct device *device, uint32_t id)
|
|||||||
return watchlist_remove(&device->state_watches, id);
|
return watchlist_remove(&device->state_watches, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct network *device_network_find(struct device *device, const char *ssid,
|
||||||
|
enum security security)
|
||||||
|
{
|
||||||
|
const char *path = iwd_network_get_path(device, ssid, security);
|
||||||
|
|
||||||
|
return l_hashmap_lookup(device->networks, path);
|
||||||
|
}
|
||||||
|
|
||||||
static void device_enter_state(struct device *device, enum device_state state)
|
static void device_enter_state(struct device *device, enum device_state state)
|
||||||
{
|
{
|
||||||
struct l_dbus *dbus = dbus_get_bus();
|
struct l_dbus *dbus = dbus_get_bus();
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
enum security;
|
||||||
struct scan_bss;
|
struct scan_bss;
|
||||||
struct wiphy;
|
struct wiphy;
|
||||||
struct netdev;
|
struct netdev;
|
||||||
@ -65,6 +66,9 @@ uint32_t device_add_state_watch(struct device *device,
|
|||||||
device_destroy_func_t destroy);
|
device_destroy_func_t destroy);
|
||||||
bool device_remove_state_watch(struct device *device, uint32_t id);
|
bool device_remove_state_watch(struct device *device, uint32_t id);
|
||||||
|
|
||||||
|
struct network *device_network_find(struct device *device, const char *ssid,
|
||||||
|
enum security security);
|
||||||
|
|
||||||
void device_connect_network(struct device *device, struct network *network,
|
void device_connect_network(struct device *device, struct network *network,
|
||||||
struct scan_bss *bss,
|
struct scan_bss *bss,
|
||||||
struct l_dbus_message *message);
|
struct l_dbus_message *message);
|
||||||
|
Loading…
Reference in New Issue
Block a user