struct connman_element *device;
GSList *list;
gboolean exists = FALSE;
- gchar *name;
+ gchar *name, *devname;
DBG("index %d", index);
if (exists == TRUE)
return;
- name = inet_index2name(index);
+ name = inet_index2ident(index, "dev_");
+ devname = inet_index2name(index);
if (type == ARPHRD_ETHER) {
char bridge_path[PATH_MAX], wimax_path[PATH_MAX];
"/sys/class/net/%s/wimax", name);
memset(&iwr, 0, sizeof(iwr));
- strncpy(iwr.ifr_ifrn.ifrn_name, name, IFNAMSIZ);
+ strncpy(iwr.ifr_ifrn.ifrn_name, devname, IFNAMSIZ);
sk = socket(PF_INET, SOCK_DGRAM, 0);
device->index = index;
device->name = name;
+ device->devname = devname;
connman_element_register(device, NULL);
device_list = g_slist_append(device_list, device);
struct connman_element *device;
GSList *list;
gboolean exists = FALSE;
- gchar *name;
+ gchar *name, *devname;
struct iwreq iwr;
int sk;
if (type != ARPHRD_ETHER)
return;
- name = inet_index2name(index);
+ name = inet_index2ident(index, "dev_");
+ devname = inet_index2name(index);
memset(&iwr, 0, sizeof(iwr));
- strncpy(iwr.ifr_ifrn.ifrn_name, name, IFNAMSIZ);
+ strncpy(iwr.ifr_ifrn.ifrn_name, devname, IFNAMSIZ);
sk = socket(PF_INET, SOCK_DGRAM, 0);
device->index = index;
device->name = name;
+ device->devname = devname;
connman_element_register(device, NULL);
device_list = g_slist_append(device_list, device);