| author | Dan Williams <dcbw@redhat.com> | 2009-08-14 14:44:02 (GMT) |
|---|---|---|
| committer | Dan Williams <dcbw@redhat.com> | 2009-08-14 14:44:02 (GMT) |
| commit | d185695d80b248354dd7a95fd896daa5c45085e5 (patch) (side-by-side diff) | |
| tree | c56808b36b45f72a6e0d16e94ca16ec92e7e4f74 | |
| parent | 272c6a626a27f4d3a88a1aedd7887d63f6a818d5 (diff) | |
| download | NetworkManager-d185695d80b248354dd7a95fd896daa5c45085e5.zip NetworkManager-d185695d80b248354dd7a95fd896daa5c45085e5.tar.gz | |
core: handle new 'ssb' bus from HAL 0.5.13 (deb #540613)
HAL added 'ssb' (Silicon Sonics Backplane, used internally on most
Broadcom ethernet and wifi chipsets) in 0.5.13, which changed the
device list layout and made NM unable to get the driver for the
wifi device. Fix that.
| -rw-r--r-- | src/nm-hal-manager.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/nm-hal-manager.c b/src/nm-hal-manager.c index 581d79e..a49e9e6 100644 --- a/src/nm-hal-manager.c +++ b/src/nm-hal-manager.c @@ -146,9 +146,14 @@ nm_get_device_driver_name (LibHalContext *ctx, const char *origdev_udi) /* s390 driver name is on the grandparent of the net device */ subsystem = hal_get_subsystem (ctx, origdev_udi); - if (subsystem && !strcmp (subsystem, "ibmebus")) { - od_parent = libhal_device_get_property_string (ctx, origdev_udi, "info.parent", NULL); - origdev_udi = (const char *) od_parent; + if (subsystem) { + if (!strcmp (subsystem, "ibmebus")) { + od_parent = libhal_device_get_property_string (ctx, origdev_udi, "info.parent", NULL); + origdev_udi = (const char *) od_parent; + } else if (!strcmp (subsystem, "ssb")) { + od_parent = libhal_device_get_property_string (ctx, origdev_udi, "info.parent", NULL); + origdev_udi = (const char *) od_parent; + } } drv = libhal_device_get_property_string (ctx, origdev_udi, "info.linux.driver", NULL); @@ -1214,8 +1219,9 @@ emit_udi_added (NMHalManager *self, const char *udi, DeviceCreator *creator) libhal_free_string (subsys); libhal_free_string (parent); - /* For non-USB devices, and ss a fallback, just use the originating device - * of the tty; though this might result in more than one modem being detected by NM. + /* For non-USB devices, and as a fallback, just use the originating device + * of the tty; though this might result in more than one modem being + * detected by NM. */ if (!od) od = hal_get_originating_device (priv->hal_ctx, udi, creator->category); |
