diff --git a/src/nm-device-olpc-mesh.c b/src/nm-device-olpc-mesh.c index ec9f5394e..244780d6f 100644 --- a/src/nm-device-olpc-mesh.c +++ b/src/nm-device-olpc-mesh.c @@ -652,7 +652,7 @@ dispose (GObject *object) device_cleanup (self); - manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL); if (priv->device_added_id) g_signal_handler_disconnect (manager, priv->device_added_id); g_object_unref (manager); @@ -850,7 +850,7 @@ is_companion (NMDeviceOlpcMesh *self, NMDevice *other) priv->companion = other; /* When we've found the companion, stop listening for other devices */ - manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, NULL); + manager = nm_manager_get (NULL, NULL, NULL, FALSE, FALSE, FALSE, FALSE, NULL); if (priv->device_added_id) { g_signal_handler_disconnect (manager, priv->device_added_id); priv->device_added_id = 0; diff --git a/src/wimax/nm-wimax-device.c b/src/wimax/nm-wimax-device.c index 6a5aed934..a98bee7d4 100644 --- a/src/wimax/nm-wimax-device.c +++ b/src/wimax/nm-wimax-device.c @@ -26,7 +26,7 @@ #include "nm-wimax-util.h" #include "nm-device-interface.h" #include "nm-device-private.h" -#include "NetworkManagerSystem.h" +#include "nm-system.h" #include "NetworkManagerUtils.h" #include "nm-properties-changed-signal.h" #include "nm-connection.h" @@ -65,7 +65,7 @@ static guint signals[LAST_SIGNAL] = { 0 }; #define GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_WIMAX_DEVICE, NMWimaxDevicePrivate)) typedef struct { - struct WIMAX_API_DEVICE_ID device_id; + WIMAX_API_DEVICE_ID device_id; NMWimaxDevice *object; gboolean enabled; @@ -192,7 +192,6 @@ rf_state_update (NMWimaxDevice *self) case WIMAX_API_DEVICE_STATUS_Scanning: case WIMAX_API_DEVICE_STATUS_Connecting: case WIMAX_API_DEVICE_STATUS_Data_Connected: - case WIMAX_API_DEVICE_STATUS_Connection_Idle: if (enable) /* Already matches */ goto out; @@ -301,7 +300,7 @@ activation_timed_out (gpointer data) } static void -wimax_status_change_cb (struct WIMAX_API_DEVICE_ID *device_id, +wimax_status_change_cb (WIMAX_API_DEVICE_ID *device_id, WIMAX_API_DEVICE_STATUS status, WIMAX_API_STATUS_REASON reason, WIMAX_API_CONNECTION_PROGRESS_INFO progress) @@ -328,7 +327,6 @@ wimax_status_change_cb (struct WIMAX_API_DEVICE_ID *device_id, case WIMAX_API_DEVICE_STATUS_Scanning: case WIMAX_API_DEVICE_STATUS_Connecting: case WIMAX_API_DEVICE_STATUS_Data_Connected: - case WIMAX_API_DEVICE_STATUS_Connection_Idle: priv->enabled = TRUE; if (device_state < NM_DEVICE_STATE_DISCONNECTED) nm_device_state_changed (NM_DEVICE (self), @@ -359,7 +357,7 @@ remove_all_nsps (NMWimaxDevice *self) static void remove_outdated_nsps (NMWimaxDevice *self, - struct WIMAX_API_NSP_INFO_EX *nsp_list, + WIMAX_API_NSP_INFO_EX *nsp_list, guint32 list_size) { NMWimaxDevicePrivate *priv = GET_PRIVATE (self); @@ -372,7 +370,7 @@ remove_outdated_nsps (NMWimaxDevice *self, gboolean found = FALSE; for (i = 0; i < list_size; i++) { - struct WIMAX_API_NSP_INFO_EX *info = &nsp_list[i]; + WIMAX_API_NSP_INFO_EX *info = &nsp_list[i]; if (!g_strcmp0 (nm_wimax_nsp_get_name (nsp), (char *) info->NSPName)) { found = TRUE; @@ -412,8 +410,8 @@ get_nsp_by_name (NMWimaxDevice *self, const char *name) } static void -wimax_scan_cb (struct WIMAX_API_DEVICE_ID *device_id, - struct WIMAX_API_NSP_INFO_EX *nsp_list, +wimax_scan_cb (WIMAX_API_DEVICE_ID *device_id, + WIMAX_API_NSP_INFO_EX *nsp_list, guint32 list_size, guint32 progress) { @@ -424,7 +422,7 @@ wimax_scan_cb (struct WIMAX_API_DEVICE_ID *device_id, remove_outdated_nsps (self, nsp_list, list_size); for (i = 0; i < list_size; i++) { - struct WIMAX_API_NSP_INFO_EX *info = &nsp_list[i]; + WIMAX_API_NSP_INFO_EX *info = &nsp_list[i]; NMWimaxNsp *nsp; gboolean new_nsp; guint32 quality; @@ -454,15 +452,15 @@ wimax_scan_cb (struct WIMAX_API_DEVICE_ID *device_id, } static void -wimax_wide_scan_cb (struct WIMAX_API_DEVICE_ID *device_id, - struct WIMAX_API_NSP_INFO_EX *nsp_list, +wimax_wide_scan_cb (WIMAX_API_DEVICE_ID *device_id, + WIMAX_API_NSP_INFO_EX *nsp_list, guint32 list_size) { wimax_scan_cb (device_id, nsp_list, list_size, 0); } static void -wimax_connect_cb (struct WIMAX_API_DEVICE_ID *device_id, +wimax_connect_cb (WIMAX_API_DEVICE_ID *device_id, WIMAX_API_NETWORK_CONNECTION_RESP response) { NMWimaxDevicePrivate *priv = (NMWimaxDevicePrivate *) device_id; @@ -483,7 +481,7 @@ wimax_connect_cb (struct WIMAX_API_DEVICE_ID *device_id, } static void -wimax_disconnect_cb (struct WIMAX_API_DEVICE_ID *device_id, +wimax_disconnect_cb (WIMAX_API_DEVICE_ID *device_id, WIMAX_API_NETWORK_CONNECTION_RESP response) { if (response == WIMAX_API_CONNECTION_SUCCESS) { @@ -635,7 +633,7 @@ static void real_update_hw_address (NMDevice *device) { NMWimaxDevicePrivate *priv = GET_PRIVATE (device); - struct WIMAX_API_DEVICE_INFO info = { 0, }; + WIMAX_API_DEVICE_INFO info = { 0, }; WIMAX_API_RET result; result = GetDeviceInformation (&priv->device_id, &info); @@ -806,7 +804,7 @@ real_act_stage2_config (NMDevice *device, NMDeviceStateReason *reason) g_assert (s_wimax); result = CmdConnectToNetwork (&priv->device_id, - (WIMAX_API_ASTRING) nm_setting_wimax_get_network_name (s_wimax), + (WIMAX_API_WSTRING) nm_setting_wimax_get_network_name (s_wimax), 0, NULL); if (result != WIMAX_API_RET_SUCCESS) { @@ -841,8 +839,7 @@ real_deactivate_quickly (NMDevice *device) nm_wimax_util_error (&priv->device_id, "Reading WiMax device status failed", result); if (status == WIMAX_API_DEVICE_STATUS_Connecting || - status == WIMAX_API_DEVICE_STATUS_Data_Connected || - status == WIMAX_API_DEVICE_STATUS_Connection_Idle) { + status == WIMAX_API_DEVICE_STATUS_Data_Connected) { result = CmdDisconnectFromNetwork (&priv->device_id); if (result != WIMAX_API_RET_SUCCESS) diff --git a/src/wimax/nm-wimax-manager.c b/src/wimax/nm-wimax-manager.c index e223ee3d7..e571f96d9 100644 --- a/src/wimax/nm-wimax-manager.c +++ b/src/wimax/nm-wimax-manager.c @@ -27,7 +27,7 @@ #include "nm-wimax-util.h" typedef struct { - struct WIMAX_API_DEVICE_ID device_id; + WIMAX_API_DEVICE_ID device_id; int refs; } NMWimaxManager; @@ -69,9 +69,8 @@ nm_wimax_manager_unref (NMWimaxManager *manager) } static gboolean -wimax_device_matches (struct WIMAX_API_HW_DEVICE_ID *hw_id, - const char *ifname, - int ifindex) +wimax_device_matches (WIMAX_API_HW_DEVICE_ID *hw_id, + const char *ifname) { const char *device_name; char *s; @@ -91,9 +90,6 @@ wimax_device_matches (struct WIMAX_API_HW_DEVICE_ID *hw_id, if (g_strcmp0 (ifname, hw_ifname)) return FALSE; - if (if_nametoindex (hw_ifname) != ifindex) - return FALSE; - return TRUE; } @@ -103,9 +99,9 @@ nm_wimax_manager_create_device (const char *path, const char *driver) { NMWimaxManager *manager; - struct WIMAX_API_HW_DEVICE_ID device_id_list[5]; + WIMAX_API_HW_DEVICE_ID device_id_list[5]; NMDevice *device = NULL; - gsize device_id_list_size = 5; + guint32 device_id_list_size = 5; WIMAX_API_RET result; g_return_val_if_fail (path != NULL, NULL); @@ -121,7 +117,7 @@ nm_wimax_manager_create_device (const char *path, int i; for (i = 0; i < device_id_list_size; i++) { - if (wimax_device_matches (&device_id_list[i], ifname, ifindex)) { + if (wimax_device_matches (&device_id_list[i], ifname)) { device = nm_wimax_device_new (path, ifname, driver, device_id_list[0].deviceIndex); break; } diff --git a/src/wimax/nm-wimax-util.c b/src/wimax/nm-wimax-util.c index ca1b0dcea..fcb11f1dc 100644 --- a/src/wimax/nm-wimax-util.c +++ b/src/wimax/nm-wimax-util.c @@ -23,13 +23,13 @@ #include "nm-utils.h" void -nm_wimax_util_error (struct WIMAX_API_DEVICE_ID *device_id, +nm_wimax_util_error (WIMAX_API_DEVICE_ID *device_id, const char *message, WIMAX_API_RET result) { char *warning_msg; char str[MAX_SIZE_OF_STRING_BUFFER]; - gsize str_len = MAX_SIZE_OF_STRING_BUFFER; + guint32 str_len = MAX_SIZE_OF_STRING_BUFFER; GetErrorString (device_id, result, str, &str_len); warning_msg = g_strconcat (message, ": %s (%d)", NULL); @@ -109,8 +109,6 @@ nm_wimax_util_device_status_to_str (WIMAX_API_DEVICE_STATUS status) return "Connection in progress"; case WIMAX_API_DEVICE_STATUS_Data_Connected: return "Layer 2 connected"; - case WIMAX_API_DEVICE_STATUS_Connection_Idle: - return "Idle connection"; } return "Unknown device state"; diff --git a/src/wimax/nm-wimax-util.h b/src/wimax/nm-wimax-util.h index e40ed46db..30c5bb68e 100644 --- a/src/wimax/nm-wimax-util.h +++ b/src/wimax/nm-wimax-util.h @@ -22,9 +22,10 @@ #define NM_WIMAX_UTIL_H #include +#include #include "nm-wimax-types.h" -void nm_wimax_util_error (struct WIMAX_API_DEVICE_ID *device_id, +void nm_wimax_util_error (WIMAX_API_DEVICE_ID *device_id, const char *message, WIMAX_API_RET result);