diff options
author | Benjamin Berg <bberg@redhat.com> | 2019-03-07 21:20:28 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-03-07 22:17:09 +0100 |
commit | 8d9365a973025976a15e5e7adb26a6f791957b7c (patch) | |
tree | 79196ce14b8d7fcc35342c24598bfe77300be131 /src | |
parent | bb25a1c80528b737333c25ef62e350e1dc3d146b (diff) | |
download | NetworkManager-8d9365a973025976a15e5e7adb26a6f791957b7c.tar.gz |
core,wifi-p2p: Fix Wi-Fi P2P device type
The device type was set to the GType rather than a new value in the
NMDeviceType enum.
Add the corresponding enum entry, fix the device type and set the
routing priority to the same value as generic devices.
Diffstat (limited to 'src')
-rw-r--r-- | src/devices/nm-device.c | 1 | ||||
-rw-r--r-- | src/devices/wifi/nm-device-wifi-p2p.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index d5f7847f92..6cabee270b 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -2114,6 +2114,7 @@ nm_device_get_route_metric_default (NMDeviceType device_type) return 800; case NM_DEVICE_TYPE_WPAN: return 850; + case NM_DEVICE_TYPE_WIFI_P2P: case NM_DEVICE_TYPE_GENERIC: return 950; case NM_DEVICE_TYPE_UNKNOWN: diff --git a/src/devices/wifi/nm-device-wifi-p2p.c b/src/devices/wifi/nm-device-wifi-p2p.c index 62e23ee931..8381ebc769 100644 --- a/src/devices/wifi/nm-device-wifi-p2p.c +++ b/src/devices/wifi/nm-device-wifi-p2p.c @@ -1241,7 +1241,7 @@ nm_device_wifi_p2p_new (const char *iface) return g_object_new (NM_TYPE_DEVICE_WIFI_P2P, NM_DEVICE_IFACE, iface, NM_DEVICE_TYPE_DESC, "802.11 Wi-Fi P2P", - NM_DEVICE_DEVICE_TYPE, NM_TYPE_DEVICE_WIFI_P2P, + NM_DEVICE_DEVICE_TYPE, NM_DEVICE_TYPE_WIFI_P2P, NM_DEVICE_LINK_TYPE, NM_LINK_TYPE_WIFI, NM_DEVICE_RFKILL_TYPE, RFKILL_TYPE_WLAN, NULL); |