summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/nm-device.c11
-rw-r--r--src/devices/nm-device.h2
-rw-r--r--src/devices/wifi/nm-device-olpc-mesh.c1
-rw-r--r--src/devices/wifi/nm-device-wifi-p2p.c1
-rw-r--r--src/devices/wifi/nm-device-wifi.c1
-rw-r--r--src/devices/wwan/nm-device-modem.c2
6 files changed, 12 insertions, 6 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 5ea94c7959..27ef6b29c1 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -21,6 +21,7 @@
#include <linux/if_arp.h>
#include <linux/rtnetlink.h>
#include <linux/pkt_sched.h>
+#include <linux/rfkill.h>
#include "nm-std-aux/unaligned.h"
#include "nm-glib-aux/nm-dedup-multi.h"
@@ -285,7 +286,7 @@ typedef struct _NMDevicePrivate {
char * driver;
char * driver_version;
char * firmware_version;
- RfKillType rfkill_type;
+ int rfkill_type;
bool firmware_missing:1;
bool nm_plugin_missing:1;
bool hw_addr_perm_fake:1; /* whether the permanent HW address could not be read and is a fake */
@@ -2537,7 +2538,7 @@ nm_device_get_applied_setting (NMDevice *self, GType setting_type)
return connection ? nm_connection_get_setting (connection, setting_type) : NULL;
}
-RfKillType
+int
nm_device_get_rfkill_type (NMDevice *self)
{
g_return_val_if_fail (NM_IS_DEVICE (self), FALSE);
@@ -16530,7 +16531,7 @@ nm_device_init (NMDevice *self)
priv->capabilities = NM_DEVICE_CAP_NM_SUPPORTED;
priv->state = NM_DEVICE_STATE_UNMANAGED;
priv->state_reason = NM_DEVICE_STATE_REASON_NONE;
- priv->rfkill_type = RFKILL_TYPE_UNKNOWN;
+ priv->rfkill_type = 0;
priv->unmanaged_flags = NM_UNMANAGED_PLATFORM_INIT;
priv->unmanaged_mask = priv->unmanaged_flags;
priv->available_connections = g_hash_table_new_full (nm_direct_hash, NULL, g_object_unref, NULL);
@@ -17332,8 +17333,8 @@ nm_device_class_init (NMDeviceClass *klass)
obj_properties[PROP_RFKILL_TYPE] =
g_param_spec_uint (NM_DEVICE_RFKILL_TYPE, "", "",
RFKILL_TYPE_WLAN,
- RFKILL_TYPE_MAX,
- RFKILL_TYPE_UNKNOWN,
+ NUM_RFKILL_TYPES,
+ 0,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_STATIC_STRINGS);
obj_properties[PROP_IFINDEX] =
diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h
index 72c269c653..1793c450a0 100644
--- a/src/devices/nm-device.h
+++ b/src/devices/nm-device.h
@@ -602,7 +602,7 @@ gboolean nm_device_get_enabled (NMDevice *device);
void nm_device_set_enabled (NMDevice *device, gboolean enabled);
-RfKillType nm_device_get_rfkill_type (NMDevice *device);
+int nm_device_get_rfkill_type (NMDevice *device);
/* IPv6 prefix delegation */
diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c
index 8bdded8ae8..718e12b103 100644
--- a/src/devices/wifi/nm-device-olpc-mesh.c
+++ b/src/devices/wifi/nm-device-olpc-mesh.c
@@ -14,6 +14,7 @@
#include "nm-device-olpc-mesh.h"
+#include <linux/rfkill.h>
#include <netinet/in.h>
#include <sys/stat.h>
#include <sys/wait.h>
diff --git a/src/devices/wifi/nm-device-wifi-p2p.c b/src/devices/wifi/nm-device-wifi-p2p.c
index 10aad9d1c2..7e881d4eab 100644
--- a/src/devices/wifi/nm-device-wifi-p2p.c
+++ b/src/devices/wifi/nm-device-wifi-p2p.c
@@ -8,6 +8,7 @@
#include "nm-device-wifi-p2p.h"
+#include <linux/rfkill.h>
#include <sys/socket.h>
#include "supplicant/nm-supplicant-manager.h"
diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c
index 25f3b5c701..119d711062 100644
--- a/src/devices/wifi/nm-device-wifi.c
+++ b/src/devices/wifi/nm-device-wifi.c
@@ -9,6 +9,7 @@
#include "nm-device-wifi.h"
+#include <linux/rfkill.h>
#include <netinet/in.h>
#include <unistd.h>
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c
index 9a8faeff23..b94d603d1d 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -6,6 +6,8 @@
#include "nm-default.h"
+#include <linux/rfkill.h>
+
#include "nm-device-modem.h"
#include "nm-modem.h"