2008-05-13 Dan Williams <dcbw@redhat.com>

* src/nm-device-private.h
	  src/nm-device.c
		- (nm_device_hw_bring_up, nm_device_hw_take_down): export

	* src/nm-device-802-11-wireless.c
		- (nm_device_802_11_wireless_set_enabled): take devices up
			and down as appropriate for the rfkill state



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3666 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-05-14 01:55:49 +00:00
parent e868d1cef6
commit aa44d70038
4 changed files with 21 additions and 4 deletions

View File

@@ -1,3 +1,13 @@
2008-05-13 Dan Williams <dcbw@redhat.com>
* src/nm-device-private.h
src/nm-device.c
- (nm_device_hw_bring_up, nm_device_hw_take_down): export
* src/nm-device-802-11-wireless.c
- (nm_device_802_11_wireless_set_enabled): take devices up
and down as appropriate for the rfkill state
2008-05-13 Dan Williams <dcbw@redhat.com> 2008-05-13 Dan Williams <dcbw@redhat.com>
* marshallers/nm-marshal.list * marshallers/nm-marshal.list

View File

@@ -3306,10 +3306,13 @@ nm_device_802_11_wireless_set_enabled (NMDevice80211Wireless *self, gboolean ena
state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self)); state = nm_device_interface_get_state (NM_DEVICE_INTERFACE (self));
if (state >= NM_DEVICE_STATE_UNAVAILABLE) { if (state >= NM_DEVICE_STATE_UNAVAILABLE) {
if (enabled) if (enabled) {
nm_device_hw_bring_up (NM_DEVICE (self), TRUE);
nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_DISCONNECTED);
else } else {
nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE); nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_UNAVAILABLE);
nm_device_hw_take_down (NM_DEVICE (self), TRUE);
}
} }
} }

View File

@@ -33,4 +33,8 @@ void nm_device_activate_schedule_stage3_ip_config_start (NMDevice *device);
void nm_device_state_changed (NMDevice *device, NMDeviceState state); void nm_device_state_changed (NMDevice *device, NMDeviceState state);
gboolean nm_device_hw_bring_up (NMDevice *self, gboolean wait);
void nm_device_hw_take_down (NMDevice *self, gboolean wait);
#endif /* NM_DEVICE_PRIVATE_H */ #endif /* NM_DEVICE_PRIVATE_H */

View File

@@ -1386,7 +1386,7 @@ nm_device_is_up (NMDevice *self)
return TRUE; return TRUE;
} }
static gboolean gboolean
nm_device_hw_bring_up (NMDevice *self, gboolean wait) nm_device_hw_bring_up (NMDevice *self, gboolean wait)
{ {
gboolean success; gboolean success;
@@ -1423,7 +1423,7 @@ out:
return TRUE; return TRUE;
} }
static void void
nm_device_hw_take_down (NMDevice *self, gboolean wait) nm_device_hw_take_down (NMDevice *self, gboolean wait)
{ {
guint32 tries = 0; guint32 tries = 0;