diff --git a/include/NetworkManager.h b/include/NetworkManager.h
index e0194b6..bb2e464 100644
--- a/include/NetworkManager.h
+++ b/include/NetworkManager.h
@@ -495,6 +495,9 @@ typedef enum {
 	/* ModemManager not running */
 	NM_DEVICE_STATE_REASON_MODEM_MANAGER_UNAVAILABLE = 52,
 
+	/* Saving power */
+	NM_DEVICE_STATE_REASON_POWERSAVE = 53,
+
 	/* Unused */
 	NM_DEVICE_STATE_REASON_LAST = 0xFFFF
 } NMDeviceStateReason;
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 57b1ee3..d2dc6a6 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1180,6 +1180,87 @@ activate_slave_connections (NMPolicy *policy, NMConnection *connection,
 }
 
 static void
+_deactivate_nonwired (NMPolicy *policy)
+{
+	GSList *iter, *devices;
+
+	devices = nm_manager_get_devices (policy->manager);
+	/* find connections that are not wired and deactivate them */
+	for (iter = devices; iter; iter = g_slist_next (iter)) {
+		NMDevice *dev = NM_DEVICE (iter->data);
+		NMSettingConnection *s_con;
+		
+		if (nm_device_get_device_type (dev) == NM_DEVICE_TYPE_ETHERNET ||
+			nm_device_get_device_type (dev) == NM_DEVICE_TYPE_UNKNOWN ||
+			nm_device_get_device_type (dev) == NM_DEVICE_TYPE_VLAN ||
+			nm_device_get_device_type (dev) == NM_DEVICE_TYPE_ADSL ||
+			nm_device_get_device_type (dev) == NM_DEVICE_TYPE_MODEM)
+			continue;
+		
+		if (nm_device_get_state (dev) > NM_DEVICE_STATE_DISCONNECTED &&
+		    nm_device_get_state (dev) != NM_DEVICE_STATE_DEACTIVATING)) {
+			connection = nm_device_get_connection (dev);
+			/*_deactivate_if_active(policy->manager, connection);*/
+			nm_device_set_managed (dev, FALSE, NM_DEVICE_STATE_REASON_POWERSAVE);
+		}
+	}
+}
+
+static gboolean
+_have_one_wired_connected (NMPolicy *policy)
+{
+	GSList *iter, *devices;
+
+	devices = nm_manager_get_devices (policy->manager);
+	/* find connections that are wired and active */
+	for (iter = devices; iter; iter = g_slist_next (iter)) {
+		NMDevice *dev = NM_DEVICE (iter->data);
+		NMSettingConnection *s_con;
+		
+		if (!(nm_device_get_device_type(dev) == NM_DEVICE_TYPE_ETHERNET ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_UNKNOWN ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_VLAN ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_ADSL ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_MODEM))
+			continue;
+		
+		if (nm_device_get_state (dev) > NM_DEVICE_STATE_DISCONNECTED) {
+			/* this is a wired connection that is still kind of connected */
+			return TRUE;
+		}
+	}
+	return FALSE;
+}
+
+
+static gboolean
+_activate_nonwired (NMPolicy *policy)
+{
+	GSList *iter, *devices;
+
+	devices = nm_manager_get_devices (policy->manager);
+	/* enable auto-connect for wireless networks */
+	for (iter = devices; iter; iter = g_slist_next (iter)) {
+		NMDevice *dev = NM_DEVICE (iter->data);
+		NMSettingConnection *s_con;
+		
+		if (!(nm_device_get_device_type(dev) == NM_DEVICE_TYPE_ETHERNET ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_UNKNOWN ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_VLAN ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_ADSL ||
+			nm_device_get_device_type(dev) == NM_DEVICE_TYPE_MODEM))
+			continue;
+		
+		/* remanage disabled devices */
+		if (nm_device_spec_match_list (device, unmanaged_specs))
+			nm_device_set_managed (device, FALSE, NM_DEVICE_STATE_REASON_NOW_UNMANAGED);
+		else
+			nm_device_set_managed (device, TRUE, NM_DEVICE_STATE_REASON_NOW_MANAGED);
+	}
+	return FALSE;
+}
+
+static void
 device_state_changed (NMDevice *device,
                       NMDeviceState new_state,
                       NMDeviceState old_state,
@@ -1269,6 +1350,10 @@ device_state_changed (NMDevice *device,
 		/* And make sure the best devices have the default route */
 		update_ip4_routing (policy, FALSE);
 		update_ip6_routing (policy, FALSE);
+		
+		/* This device is working now, so if it is a wired connection, we can drop the others */
+		_deactivate_nonwired(policy);
+		
 		break;
 	case NM_DEVICE_STATE_UNMANAGED:
 	case NM_DEVICE_STATE_UNAVAILABLE:
@@ -1286,6 +1371,11 @@ device_state_changed (NMDevice *device,
 
 		/* Device is now available for auto-activation */
 		schedule_activate_check (policy, device, 0);
+		
+		/* If no devices left, we should re-activate the wifi ones */
+		if (!_have_wired(policy))
+			_activate_nonwired(policy);
+		
 		break;
 
 	case NM_DEVICE_STATE_PREPARE:
@@ -1544,6 +1634,7 @@ firewall_update_zone (NMPolicy *policy, NMConnection *connection)
 	}
 }
 
+
 static void
 firewall_started (NMFirewallManager *manager,
                   gpointer user_data)
@@ -1610,6 +1701,7 @@ _deactivate_if_active (NMManager *manager, NMConnection *connection)
 	g_ptr_array_free (list, TRUE);
 }
 
+
 static void
 connection_removed (NMSettings *settings,
                     NMConnection *connection,
