diff options
Diffstat (limited to 'src/nm-udev-manager.c')
-rw-r--r-- | src/nm-udev-manager.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c index ff0ef68c81..5e3da0b8d6 100644 --- a/src/nm-udev-manager.c +++ b/src/nm-udev-manager.c @@ -15,9 +15,10 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * - * Copyright (C) 2009 - 2010 Red Hat, Inc. + * Copyright (C) 2009 - 2011 Red Hat, Inc. */ +#include <config.h> #include <signal.h> #include <string.h> #include <stdlib.h> @@ -38,6 +39,9 @@ #include "nm-device-wifi.h" #include "nm-device-olpc-mesh.h" #include "nm-device-ethernet.h" +#if WITH_WIMAX +#include "nm-device-wimax.h" +#endif typedef struct { GUdevClient *client; @@ -335,6 +339,15 @@ is_olpc_mesh (GUdevDevice *device) return (prop != NULL); } +static gboolean +is_wimax (const char *driver) +{ + /* FIXME: check 'DEVTYPE' instead; but since we only support Intel + * WiMAX devices for now this is appropriate. + */ + return g_strcmp0 (driver, "i2400m_usb") == 0; +} + static GObject * device_creator (NMUdevManager *manager, GUdevDevice *udev_device, @@ -387,7 +400,11 @@ device_creator (NMUdevManager *manager, device = (GObject *) nm_device_olpc_mesh_new (path, ifname, driver); else if (is_wireless (udev_device)) device = (GObject *) nm_device_wifi_new (path, ifname, driver); - else + else if (is_wimax (driver)) { +#if WITH_WIMAX + device = (GObject *) nm_device_wimax_new (path, ifname, driver); +#endif + } else device = (GObject *) nm_device_ethernet_new (path, ifname, driver); out: |