wiphy: Move network object definition

This commit is contained in:
Denis Kenzior 2016-05-11 21:59:03 -05:00
parent 76e4d9478e
commit 414bc3198d
3 changed files with 16 additions and 13 deletions

View File

@ -31,6 +31,7 @@
#include "linux/nl80211.h" #include "linux/nl80211.h"
#include "src/iwd.h"
#include "src/netdev.h" #include "src/netdev.h"
#include "src/device.h" #include "src/device.h"
#include "src/wiphy.h" #include "src/wiphy.h"

View File

@ -22,6 +22,21 @@
#include <stdbool.h> #include <stdbool.h>
struct netdev;
struct network {
char *object_path;
struct netdev *netdev;
char ssid[33];
unsigned char *psk;
unsigned int agent_request;
enum security security;
struct l_queue *bss_list;
struct l_settings *settings;
bool update_psk:1; /* Whether PSK should be written to storage */
bool ask_psk:1; /* Whether we should force-ask agent for PSK */
};
bool network_seen(uint32_t type, const char *ssid); bool network_seen(uint32_t type, const char *ssid);
bool network_connected(uint32_t type, const char *ssid); bool network_connected(uint32_t type, const char *ssid);
double network_rankmod(uint32_t type, const char *ssid); double network_rankmod(uint32_t type, const char *ssid);

View File

@ -53,19 +53,6 @@
static struct l_genl_family *nl80211 = NULL; static struct l_genl_family *nl80211 = NULL;
struct network {
char *object_path;
struct netdev *netdev;
char ssid[33];
unsigned char *psk;
unsigned int agent_request;
enum security security;
struct l_queue *bss_list;
struct l_settings *settings;
bool update_psk:1; /* Whether PSK should be written to storage */
bool ask_psk:1; /* Whether we should force-ask agent for PSK */
};
enum device_state { enum device_state {
DEVICE_STATE_DISCONNECTED = 0, /* Disconnected, no auto-connect */ DEVICE_STATE_DISCONNECTED = 0, /* Disconnected, no auto-connect */
DEVICE_STATE_AUTOCONNECT, /* Disconnected, try auto-connect */ DEVICE_STATE_AUTOCONNECT, /* Disconnected, try auto-connect */