else if (g_str_has_prefix(devname, "bnep") == TRUE)
devtype = CONNMAN_DEVICE_TYPE_UNKNOWN;
else if (g_str_has_prefix(devname, "wmx") == TRUE)
- devtype = CONNMAN_DEVICE_TYPE_UNKNOWN;
+ devtype = CONNMAN_DEVICE_TYPE_WIMAX;
else if (stat(wimax_path, &st) == 0 && (st.st_mode & S_IFDIR))
- devtype = CONNMAN_DEVICE_TYPE_UNKNOWN;
+ devtype = CONNMAN_DEVICE_TYPE_WIMAX;
else if (stat(bridge_path, &st) == 0 && (st.st_mode & S_IFDIR))
devtype = CONNMAN_DEVICE_TYPE_UNKNOWN;
else if (ioctl(sk, SIOCGIWNAME, &iwr) == 0)
unsigned flags, unsigned change)
{
struct connman_device *device;
+ enum connman_device_type devtype;
DBG("type %d index %d", type, index);
+ devtype = __connman_inet_get_device_type(index);
+
+ switch (devtype) {
+ case CONNMAN_DEVICE_TYPE_UNKNOWN:
+ case CONNMAN_DEVICE_TYPE_VENDOR:
+ case CONNMAN_DEVICE_TYPE_WIMAX:
+ case CONNMAN_DEVICE_TYPE_BLUETOOTH:
+ case CONNMAN_DEVICE_TYPE_GPS:
+ case CONNMAN_DEVICE_TYPE_NOZOMI:
+ case CONNMAN_DEVICE_TYPE_HUAWEI:
+ case CONNMAN_DEVICE_TYPE_NOVATEL:
+ return;
+ case CONNMAN_DEVICE_TYPE_ETHERNET:
+ case CONNMAN_DEVICE_TYPE_WIFI:
+ case CONNMAN_DEVICE_TYPE_MBM:
+ case CONNMAN_DEVICE_TYPE_HSO:
+ break;
+ }
+
device = find_device(index);
if (device != NULL)
return;
static void add_device(struct udev_device *udev_device)
{
- struct connman_device *device;
struct udev_list_entry *entry;
- const char *type;
+ struct connman_device *device;
+ enum connman_device_type devtype;
+ const char *systype;
int index = -1;
DBG("");
- type = udev_device_get_sysattr_value(udev_device, "type");
- if (type == NULL || atoi(type) != 1)
+ systype = udev_device_get_sysattr_value(udev_device, "type");
+ if (systype == NULL || atoi(systype) != 1)
return;
entry = udev_device_get_properties_list_entry(udev_device);
if (index < 0)
return;
+ devtype = __connman_inet_get_device_type(index);
+
+ switch (devtype) {
+ case CONNMAN_DEVICE_TYPE_UNKNOWN:
+ case CONNMAN_DEVICE_TYPE_VENDOR:
+ case CONNMAN_DEVICE_TYPE_WIMAX:
+ case CONNMAN_DEVICE_TYPE_BLUETOOTH:
+ case CONNMAN_DEVICE_TYPE_GPS:
+ case CONNMAN_DEVICE_TYPE_NOZOMI:
+ case CONNMAN_DEVICE_TYPE_HUAWEI:
+ case CONNMAN_DEVICE_TYPE_NOVATEL:
+ return;
+ case CONNMAN_DEVICE_TYPE_ETHERNET:
+ case CONNMAN_DEVICE_TYPE_WIFI:
+ case CONNMAN_DEVICE_TYPE_MBM:
+ case CONNMAN_DEVICE_TYPE_HSO:
+ break;
+ }
+
device = find_device(index);
if (device != NULL)
return;
static void remove_device(struct udev_device *udev_device)
{
- struct connman_device *device;
struct udev_list_entry *entry;
+ struct connman_device *device;
int index = -1;
DBG("");