about summary refs log tree commit diff
path: root/libnm/nm-device.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm/nm-device.c')
-rw-r--r--libnm/nm-device.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 4bcd7c6c..5965cb3b 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -23,7 +23,6 @@
 
 #include "nm-device.h"
 
-#include <string.h>
 #include <libudev.h>
 
 #include "nm-libnm-utils.h"
@@ -295,6 +294,7 @@ coerce_type (NMDeviceType type)
 	case NM_DEVICE_TYPE_WPAN:
 	case NM_DEVICE_TYPE_6LOWPAN:
 	case NM_DEVICE_TYPE_WIREGUARD:
+	case NM_DEVICE_TYPE_WIFI_P2P:
 		return type;
 	}
 	return NM_DEVICE_TYPE_UNKNOWN;
@@ -356,7 +356,7 @@ get_property (GObject *object,
 
 	switch (prop_id) {
 	case PROP_DEVICE_TYPE:
-		g_value_set_enum (value, coerce_type (nm_device_get_device_type (device)));
+		g_value_set_enum (value, nm_device_get_device_type (device));
 		break;
 	case PROP_UDI:
 		g_value_set_string (value, nm_device_get_udi (device));
@@ -937,7 +937,7 @@ nm_device_get_device_type (NMDevice *self)
 {
 	g_return_val_if_fail (NM_IS_DEVICE (self), NM_DEVICE_TYPE_UNKNOWN);
 
-	return NM_DEVICE_GET_PRIVATE (self)->device_type;
+	return coerce_type (NM_DEVICE_GET_PRIVATE (self)->device_type);
 }
 
 /**
@@ -1428,6 +1428,8 @@ get_type_name (NMDevice *device)
 		return _("6LoWPAN");
 	case NM_DEVICE_TYPE_WIREGUARD:
 		return _("WireGuard");
+	case NM_DEVICE_TYPE_WIFI_P2P:
+		return _("Wi-Fi P2P");
 	case NM_DEVICE_TYPE_GENERIC:
 	case NM_DEVICE_TYPE_UNUSED1:
 	case NM_DEVICE_TYPE_UNUSED2:
@@ -2133,7 +2135,7 @@ nm_device_reapply_finish (NMDevice *device,
  * nm_device_get_applied_connection:
  * @device: a #NMDevice
  * @flags: the flags argument. Currently this value must always be zero.
- * @version_id: (out): (allow-none): returns the current version id of
+ * @version_id: (out) (allow-none): returns the current version id of
  *   the applied connection
  * @cancellable: a #GCancellable, or %NULL
  * @error: location for a #GError, or %NULL
@@ -2267,7 +2269,7 @@ nm_device_get_applied_connection_async  (NMDevice *device,
  * nm_device_get_applied_connection_finish:
  * @device: a #NMDevice
  * @result: the result passed to the #GAsyncReadyCallback
- * @version_id: (out): (allow-none): the current version id of the applied
+ * @version_id: (out) (allow-none): the current version id of the applied
  *   connection.
  * @error: location for a #GError, or %NULL
  *