From 414bc3198d05f075157374a9fa3b716c9187fa64 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 11 May 2016 21:59:03 -0500 Subject: [PATCH] wiphy: Move network object definition --- src/main.c | 1 + src/network.h | 15 +++++++++++++++ src/wiphy.c | 13 ------------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/main.c b/src/main.c index eb614e0a..8c50354c 100644 --- a/src/main.c +++ b/src/main.c @@ -31,6 +31,7 @@ #include "linux/nl80211.h" +#include "src/iwd.h" #include "src/netdev.h" #include "src/device.h" #include "src/wiphy.h" diff --git a/src/network.h b/src/network.h index 811e1687..7dc01f7c 100644 --- a/src/network.h +++ b/src/network.h @@ -22,6 +22,21 @@ #include +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_connected(uint32_t type, const char *ssid); double network_rankmod(uint32_t type, const char *ssid); diff --git a/src/wiphy.c b/src/wiphy.c index 4a8e5d79..f0da3c7c 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -53,19 +53,6 @@ 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 { DEVICE_STATE_DISCONNECTED = 0, /* Disconnected, no auto-connect */ DEVICE_STATE_AUTOCONNECT, /* Disconnected, try auto-connect */