summary refs log tree commit diff
path: root/src/devices/wifi/nm-device-olpc-mesh.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-07-14 19:38:58 +0200
committerMichael Biebl <biebl@debian.org>2015-07-14 19:38:58 +0200
commit50a58f0fabd8a34c1b6108a107e08abe3c1ccd24 (patch)
tree6790165f39daee79e2b6c6617483320613493367 /src/devices/wifi/nm-device-olpc-mesh.c
parentf408e27bccfacf347605a8d98649975a68f38a17 (diff)
Imported Upstream version 1.0.4 upstream/1.0.4
Diffstat (limited to 'src/devices/wifi/nm-device-olpc-mesh.c')
-rw-r--r--src/devices/wifi/nm-device-olpc-mesh.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c
index dc3dfbc6..e67d1a20 100644
--- a/src/devices/wifi/nm-device-olpc-mesh.c
+++ b/src/devices/wifi/nm-device-olpc-mesh.c
@@ -197,8 +197,8 @@ _mesh_set_channel (NMDeviceOlpcMesh *self, guint32 channel)
 {
 	int ifindex = nm_device_get_ifindex (NM_DEVICE (self));
 
-	if (nm_platform_mesh_get_channel (ifindex) != channel) {
-		if (nm_platform_mesh_set_channel (ifindex, channel))
+	if (nm_platform_mesh_get_channel (NM_PLATFORM_GET, ifindex) != channel) {
+		if (nm_platform_mesh_set_channel (NM_PLATFORM_GET, ifindex, channel))
 			g_object_notify (G_OBJECT (self), NM_DEVICE_OLPC_MESH_ACTIVE_CHANNEL);
 	}
 }
@@ -224,7 +224,8 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *reason)
 		_mesh_set_channel (self, channel);
 
 	ssid = nm_setting_olpc_mesh_get_ssid (s_mesh);
-	nm_platform_mesh_set_ssid (nm_device_get_ifindex (device),
+	nm_platform_mesh_set_ssid (NM_PLATFORM_GET,
+	                           nm_device_get_ifindex (device),
 	                           g_bytes_get_data (ssid, NULL),
 	                           g_bytes_get_size (ssid));
 
@@ -368,9 +369,9 @@ device_added_cb (NMManager *manager, NMDevice *other, gpointer user_data)
 	NMDeviceOlpcMeshPrivate *priv = NM_DEVICE_OLPC_MESH_GET_PRIVATE (self);
 
 	if (!priv->companion && check_companion (self, other)) {
-		nm_device_state_changed (NM_DEVICE (self),
-		                         NM_DEVICE_STATE_DISCONNECTED,
-		                         NM_DEVICE_STATE_REASON_NONE);
+		nm_device_queue_recheck_available (NM_DEVICE (self),
+		                                   NM_DEVICE_STATE_REASON_NONE,
+		                                   NM_DEVICE_STATE_REASON_NONE);
 		nm_device_remove_pending_action (NM_DEVICE (self), "waiting for companion", TRUE);
 	}
 }
@@ -398,9 +399,9 @@ find_companion (NMDeviceOlpcMesh *self)
 	/* Try to find the companion if it's already known to the NMManager */
 	for (list = nm_manager_get_devices (nm_manager_get ()); list ; list = g_slist_next (list)) {
 		if (check_companion (self, NM_DEVICE (list->data))) {
-			nm_device_queue_state (NM_DEVICE (self),
-			                       NM_DEVICE_STATE_DISCONNECTED,
-			                       NM_DEVICE_STATE_REASON_NONE);
+			nm_device_queue_recheck_available (NM_DEVICE (self),
+			                                   NM_DEVICE_STATE_REASON_NONE,
+			                                   NM_DEVICE_STATE_REASON_NONE);
 			nm_device_remove_pending_action (NM_DEVICE (self), "waiting for companion", TRUE);
 			break;
 		}
@@ -453,7 +454,7 @@ constructor (GType type,
 
 	self = NM_DEVICE_OLPC_MESH (object);
 
-	if (!nm_platform_wifi_get_capabilities (nm_device_get_ifindex (NM_DEVICE (self)), &caps)) {
+	if (!nm_platform_wifi_get_capabilities (NM_PLATFORM_GET, nm_device_get_ifindex (NM_DEVICE (self)), &caps)) {
 		_LOGW (LOGD_HW | LOGD_OLPC, "failed to initialize WiFi driver");
 		g_object_unref (object);
 		return NULL;
@@ -482,7 +483,7 @@ get_property (GObject *object, guint prop_id,
 			g_value_set_boxed (value, "/");
 		break;
 	case PROP_ACTIVE_CHANNEL:
-		g_value_set_uint (value, nm_platform_mesh_get_channel (nm_device_get_ifindex (NM_DEVICE (device))));
+		g_value_set_uint (value, nm_platform_mesh_get_channel (NM_PLATFORM_GET, nm_device_get_ifindex (NM_DEVICE (device))));
 		break;
 	default:
 		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);