diff options
Diffstat (limited to 'src/devices/wimax/nm-device-wimax.c')
-rw-r--r-- | src/devices/wimax/nm-device-wimax.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/devices/wimax/nm-device-wimax.c b/src/devices/wimax/nm-device-wimax.c index 69f8b8bcc3..3a101a8e31 100644 --- a/src/devices/wimax/nm-device-wimax.c +++ b/src/devices/wimax/nm-device-wimax.c @@ -332,7 +332,7 @@ check_connection_compatible (NMDevice *device, NMConnection *connection) return FALSE; mac = nm_setting_wimax_get_mac_address (s_wimax); - if (mac && !nm_utils_hwaddr_equal (mac->data, mac->len, nm_device_get_hw_address (device, NULL), ETH_ALEN)) + if (mac && !nm_utils_hwaddr_equal (mac->data, mac->len, nm_device_get_hw_address (device), -1)) return FALSE; return TRUE; @@ -372,7 +372,7 @@ complete_connection (NMDevice *device, NMDeviceWimaxPrivate *priv = NM_DEVICE_WIMAX_GET_PRIVATE (self); NMSettingWimax *s_wimax; const GByteArray *setting_mac; - const guint8 *hw_address; + const char *hw_address; char *format; const char *nsp_name = NULL; NMWimaxNsp *nsp = NULL; @@ -449,10 +449,10 @@ complete_connection (NMDevice *device, g_object_set (G_OBJECT (s_wimax), NM_SETTING_WIMAX_NETWORK_NAME, nsp_name, NULL); setting_mac = nm_setting_wimax_get_mac_address (s_wimax); - hw_address = nm_device_get_hw_address (device, NULL); + hw_address = nm_device_get_hw_address (device); if (setting_mac) { /* Make sure the setting MAC (if any) matches the device's permanent MAC */ - if (!nm_utils_hwaddr_equal (setting_mac->data, setting_mac->len, hw_address, ETH_ALEN)) { + if (!nm_utils_hwaddr_equal (setting_mac->data, setting_mac->len, hw_address, -1)) { g_set_error (error, NM_SETTING_WIMAX_ERROR, NM_SETTING_WIMAX_ERROR_INVALID_PROPERTY, @@ -463,9 +463,8 @@ complete_connection (NMDevice *device, GByteArray *mac; /* Lock the connection to this device by default */ - if (!nm_utils_hwaddr_equal (hw_address, ETH_ALEN, NULL, ETH_ALEN)) { - mac = g_byte_array_sized_new (ETH_ALEN); - g_byte_array_append (mac, hw_address, ETH_ALEN); + if (!nm_utils_hwaddr_equal (hw_address, -1, NULL, ETH_ALEN)) { + mac = nm_utils_hwaddr_atoba (hw_address, ETH_ALEN); g_object_set (G_OBJECT (s_wimax), NM_SETTING_WIMAX_MAC_ADDRESS, mac, NULL); g_byte_array_free (mac, TRUE); } |