Set correct subtype for transition period
[connman] / src / device.c
index ef89933..590b955 100644 (file)
@@ -72,8 +72,6 @@ static const char *type2string(enum connman_device_type type)
                return "wifi";
        case CONNMAN_DEVICE_TYPE_WIMAX:
                return "wimax";
-       case CONNMAN_DEVICE_TYPE_MODEM:
-               return "modem";
        case CONNMAN_DEVICE_TYPE_BLUETOOTH:
                return "bluetooth";
        case CONNMAN_DEVICE_TYPE_HSO:
@@ -540,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;