mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
device: Add device_connect_network
This commit is contained in:
parent
80aba66e98
commit
2fe80a8f86
@ -23,6 +23,7 @@
|
||||
#include <stdbool.h>
|
||||
|
||||
struct netdev;
|
||||
struct scan_bss;
|
||||
|
||||
typedef void (*device_watch_func_t)(struct netdev *device, void *userdata);
|
||||
typedef void (*device_destroy_func_t)(void *userdata);
|
||||
@ -38,5 +39,8 @@ void __device_watch_call_removed(struct netdev *device);
|
||||
struct network *device_get_connected_network(struct netdev *device);
|
||||
const char *device_get_path(struct netdev *device);
|
||||
|
||||
void device_connect_network(struct netdev *device, struct network *network,
|
||||
struct scan_bss *bss,
|
||||
struct l_dbus_message *message);
|
||||
bool device_init(void);
|
||||
bool device_exit(void);
|
||||
|
14
src/wiphy.c
14
src/wiphy.c
@ -318,6 +318,20 @@ static int mlme_authenticate_cmd(struct network *network, struct scan_bss *bss)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void device_connect_network(struct netdev *device, struct network *network,
|
||||
struct scan_bss *bss,
|
||||
struct l_dbus_message *message)
|
||||
{
|
||||
device->connect_pending = l_dbus_message_ref(message);
|
||||
|
||||
device->connected_bss = bss;
|
||||
device->connected_network = network;
|
||||
|
||||
netdev_enter_state(device, DEVICE_STATE_CONNECTING);
|
||||
|
||||
mlme_authenticate_cmd(network, bss);
|
||||
}
|
||||
|
||||
static void passphrase_callback(enum agent_result result,
|
||||
const char *passphrase, void *user_data)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user