Set correct subtype for transition period
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 28 Dec 2008 06:40:50 +0000 (07:40 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 28 Dec 2008 06:40:50 +0000 (07:40 +0100)
src/device.c

index ec453e9..590b955 100644 (file)
@@ -538,6 +538,15 @@ struct connman_device *connman_device_create(const char *node,
        device->element.type = CONNMAN_ELEMENT_TYPE_DEVICE;
        device->element.index = -1;
 
+       switch (type) {
+       case CONNMAN_DEVICE_TYPE_ETHERNET:
+               device->element.subtype = CONNMAN_ELEMENT_SUBTYPE_ETHERNET;
+               break;
+       default:
+               device->element.subtype = CONNMAN_ELEMENT_SUBTYPE_UNKNOWN;
+               break;
+       }
+
        device->element.device = device;
        device->element.destruct = device_destruct;