}
nic->interface = if_setting->value;
+ snprintf ( device->dev.name, sizeof ( device->dev.name ), "%s",
+ nic->interface );
+ device->dev.desc.bus_type = BUS_TYPE_TAP;
if_setting->applied = 1;
/* Apply rest of the settings */
[BUS_TYPE_EISA] = "EISA",
[BUS_TYPE_MCA] = "MCA",
[BUS_TYPE_ISA] = "ISA",
+ [BUS_TYPE_TAP] = "TAP",
};
struct device_description *desc = &netdev->dev->desc;
const char *bustype;
assert ( desc->bus_type < ( sizeof ( bustypes ) /
sizeof ( bustypes[0] ) ) );
bustype = bustypes[desc->bus_type];
- assert ( bustypes != NULL );
+ assert ( bustype != NULL );
strncpy ( data, bustype, len );
return strlen ( bustype );
}