2004-10-21 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerDevice.c - Don't try to activate/bring up/down unsupported devices * src/NetworkManagerUtils.c - Fix case of PCI ID checks for driver support levels git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@263 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:

committed by
Bryan W. Clark

parent
f8daee7ed9
commit
f145f77bf9
@@ -1,3 +1,12 @@
|
|||||||
|
2004-10-21 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* src/NetworkManagerDevice.c
|
||||||
|
- Don't try to activate/bring up/down unsupported
|
||||||
|
devices
|
||||||
|
|
||||||
|
* src/NetworkManagerUtils.c
|
||||||
|
- Fix case of PCI ID checks for driver support levels
|
||||||
|
|
||||||
2004-10-21 Dan Williams <dcbw@redhat.com>
|
2004-10-21 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
* NetworkManager.h
|
* NetworkManager.h
|
||||||
|
@@ -348,6 +348,8 @@ NMDevice *nm_device_new (const char *iface, const char *udi, gboolean test_dev,
|
|||||||
|
|
||||||
dev->driver_support_level = nm_get_driver_support_level (dev->app_data->hal_ctx, dev);
|
dev->driver_support_level = nm_get_driver_support_level (dev->app_data->hal_ctx, dev);
|
||||||
|
|
||||||
|
if (nm_device_get_driver_support_level (dev) != NM_DRIVER_UNSUPPORTED)
|
||||||
|
{
|
||||||
/* Grab IP config data for this device from the system configuration files */
|
/* Grab IP config data for this device from the system configuration files */
|
||||||
nm_device_update_ip4_address (dev);
|
nm_device_update_ip4_address (dev);
|
||||||
nm_system_device_update_config_info (dev);
|
nm_system_device_update_config_info (dev);
|
||||||
@@ -355,6 +357,7 @@ NMDevice *nm_device_new (const char *iface, const char *udi, gboolean test_dev,
|
|||||||
/* Have to bring the device up before checking link status. */
|
/* Have to bring the device up before checking link status. */
|
||||||
nm_device_bring_up (dev);
|
nm_device_bring_up (dev);
|
||||||
nm_device_update_link_active (dev, TRUE);
|
nm_device_update_link_active (dev, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
return (dev);
|
return (dev);
|
||||||
}
|
}
|
||||||
@@ -1047,6 +1050,9 @@ static void nm_device_set_up_down (NMDevice *dev, gboolean up)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
|
||||||
|
return;
|
||||||
|
|
||||||
iface_fd = nm_get_network_control_socket ();
|
iface_fd = nm_get_network_control_socket ();
|
||||||
if (iface_fd < 0)
|
if (iface_fd < 0)
|
||||||
return;
|
return;
|
||||||
@@ -1211,6 +1217,12 @@ gboolean nm_device_activation_begin (NMDevice *dev)
|
|||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
|
||||||
|
{
|
||||||
|
dev->activating = FALSE;
|
||||||
|
return (FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/* Reset communication flags between worker and main thread */
|
/* Reset communication flags between worker and main thread */
|
||||||
dev->activating = TRUE;
|
dev->activating = TRUE;
|
||||||
dev->just_activated = FALSE;
|
dev->just_activated = FALSE;
|
||||||
@@ -1638,6 +1650,9 @@ gboolean nm_device_deactivate (NMDevice *dev, gboolean just_added)
|
|||||||
|
|
||||||
nm_device_activation_cancel (dev);
|
nm_device_activation_cancel (dev);
|
||||||
|
|
||||||
|
if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
|
||||||
|
return (TRUE);
|
||||||
|
|
||||||
/* Take out any entries in the routing table and any IP address the old device had. */
|
/* Take out any entries in the routing table and any IP address the old device had. */
|
||||||
nm_system_device_flush_routes (dev);
|
nm_system_device_flush_routes (dev);
|
||||||
nm_system_device_flush_addresses (dev);
|
nm_system_device_flush_addresses (dev);
|
||||||
|
@@ -284,7 +284,7 @@ char *nm_get_device_driver_name (LibHalContext *ctx, NMDevice *dev)
|
|||||||
char buf[200];
|
char buf[200];
|
||||||
char id[9];
|
char id[9];
|
||||||
|
|
||||||
snprintf (&id[0], 9, "%4X%4X", vendor, product);
|
snprintf (&id[0], 9, "%4x%4x", vendor, product);
|
||||||
id[8] = '\0';
|
id[8] = '\0';
|
||||||
while (fgets (&buf[0], 200, f) && !feof (f))
|
while (fgets (&buf[0], 200, f) && !feof (f))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user