Oh, I see. I didn't think init_netdev would be a static function. A bit strange really, isn't it? Anyway, restore the old line there and do this change instead, then:
Original code:
Code:
if (!(Adapter->net = init_etherdev(NULL, 0))) {
MOD_DEC_USE_COUNT;
kfree(Adapter);
usb_dec_dev_use(dev);
return NULL;
}
ether_setup(Adapter->net); Change to (just one line added):
Code:
if (!(Adapter->net = init_etherdev(NULL, 0))) {
MOD_DEC_USE_COUNT;
kfree(Adapter);
usb_dec_dev_use(dev);
return NULL;
}
dev_alloc_name(Adapter->net, "wlan%d");
ether_setup(Adapter->net); And yes, it is a little bit ugly, but so little that noone will notice. I wouldn't choose it as a permanent solution for the official driver code, of course, but IMHO it doesn't hurt here.