Add detection support for Nozomi based hardware
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 2 Jan 2009 22:53:25 +0000 (23:53 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 2 Jan 2009 22:53:25 +0000 (23:53 +0100)
src/connman.rules
src/udev.c

index 8a935ce..84b3b4b 100644 (file)
@@ -1,6 +1,8 @@
 
 SUBSYSTEM=="net", DRIVERS=="hso", ENV{CONNMAN_TYPE}="hso"
 
+SUBSYSTEM=="tty", KERNEL=="noz[0-9]*", ENV{CONNMAN_TYPE}="nozomi"
+
 SUBSYSTEM=="tty", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1003", \
                                                ENV{CONNMAN_TYPE}="huawei"
 
index 623962a..95faf60 100644 (file)
@@ -100,10 +100,13 @@ static void add_device(struct udev_device *udev_device)
        if (type == NULL || interface == NULL)
                return;
 
-       if (g_str_equal(interface, "ttyUSB0") == FALSE)
+       if (g_str_equal(interface, "ttyUSB0") == FALSE &&
+                               g_str_equal(interface, "noz0") == FALSE)
                return;
 
-       if (g_str_equal(type, "huawei") == TRUE)
+       if (g_str_equal(type, "nozomi") == TRUE)
+               devtype = CONNMAN_DEVICE_TYPE_NOZOMI;
+       else if (g_str_equal(type, "huawei") == TRUE)
                devtype = CONNMAN_DEVICE_TYPE_HUAWEI;
        else if (g_str_equal(type, "novatel") == TRUE)
                devtype = CONNMAN_DEVICE_TYPE_NOVATEL;