mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
device: Move device structure definition
Temporarily move device structure definition into device.h and out of wiphy.c. Eventually the device structure should be opaque to device.c
This commit is contained in:
parent
432ec3e69f
commit
9d4baab8bd
31
src/device.h
31
src/device.h
@ -27,9 +27,40 @@ struct wiphy;
|
||||
struct netdev;
|
||||
struct device;
|
||||
|
||||
enum device_state {
|
||||
DEVICE_STATE_DISCONNECTED = 0, /* Disconnected, no auto-connect */
|
||||
DEVICE_STATE_AUTOCONNECT, /* Disconnected, try auto-connect */
|
||||
DEVICE_STATE_CONNECTING, /* Connecting */
|
||||
DEVICE_STATE_CONNECTED,
|
||||
DEVICE_STATE_DISCONNECTING,
|
||||
};
|
||||
|
||||
typedef void (*device_watch_func_t)(struct device *device, void *userdata);
|
||||
typedef void (*device_destroy_func_t)(void *userdata);
|
||||
|
||||
struct device {
|
||||
uint32_t index;
|
||||
enum device_state state;
|
||||
struct l_queue *bss_list;
|
||||
struct l_queue *old_bss_list;
|
||||
struct l_dbus_message *scan_pending;
|
||||
struct l_hashmap *networks;
|
||||
struct l_queue *networks_sorted;
|
||||
struct scan_bss *connected_bss;
|
||||
struct network *connected_network;
|
||||
struct l_queue *autoconnect_list;
|
||||
struct l_dbus_message *connect_pending;
|
||||
struct l_dbus_message *disconnect_pending;
|
||||
struct l_io *eapol_io;
|
||||
|
||||
uint32_t pairwise_new_key_cmd_id;
|
||||
uint32_t pairwise_set_key_cmd_id;
|
||||
uint32_t group_new_key_cmd_id;
|
||||
|
||||
struct wiphy *wiphy;
|
||||
struct netdev *netdev;
|
||||
};
|
||||
|
||||
uint32_t device_watch_add(device_watch_func_t added,
|
||||
device_watch_func_t removed,
|
||||
void *userdata, device_destroy_func_t destroy);
|
||||
|
31
src/wiphy.c
31
src/wiphy.c
@ -54,37 +54,6 @@
|
||||
|
||||
static struct l_genl_family *nl80211 = NULL;
|
||||
|
||||
enum device_state {
|
||||
DEVICE_STATE_DISCONNECTED = 0, /* Disconnected, no auto-connect */
|
||||
DEVICE_STATE_AUTOCONNECT, /* Disconnected, try auto-connect */
|
||||
DEVICE_STATE_CONNECTING, /* Connecting */
|
||||
DEVICE_STATE_CONNECTED,
|
||||
DEVICE_STATE_DISCONNECTING,
|
||||
};
|
||||
|
||||
struct device {
|
||||
uint32_t index;
|
||||
enum device_state state;
|
||||
struct l_queue *bss_list;
|
||||
struct l_queue *old_bss_list;
|
||||
struct l_dbus_message *scan_pending;
|
||||
struct l_hashmap *networks;
|
||||
struct l_queue *networks_sorted;
|
||||
struct scan_bss *connected_bss;
|
||||
struct network *connected_network;
|
||||
struct l_queue *autoconnect_list;
|
||||
struct l_dbus_message *connect_pending;
|
||||
struct l_dbus_message *disconnect_pending;
|
||||
struct l_io *eapol_io;
|
||||
|
||||
uint32_t pairwise_new_key_cmd_id;
|
||||
uint32_t pairwise_set_key_cmd_id;
|
||||
uint32_t group_new_key_cmd_id;
|
||||
|
||||
struct wiphy *wiphy;
|
||||
struct netdev *netdev;
|
||||
};
|
||||
|
||||
struct wiphy {
|
||||
uint32_t id;
|
||||
char name[20];
|
||||
|
Loading…
Reference in New Issue
Block a user