-
- ifxmips_mii0_dev.init = switch_init;
-
- strcpy(ifxmips_mii0_dev.name, "eth%d");
- SET_MODULE_OWNER(dev);
-
- result = register_netdev(&ifxmips_mii0_dev);
- if (result)
- {
- printk("error %i registering device \"%s\"\n", result, ifxmips_mii0_dev.name);
+ unsigned char *mac = (unsigned char *)dev->dev.platform_data;
+ ifxmips_mii0_dev = alloc_etherdev(sizeof(struct ifxmips_mii_priv));
+ ifxmips_mii0_dev->init = ifxmips_mii_dev_init;
+ memcpy(mac_addr, mac, 6);
+ strcpy(ifxmips_mii0_dev->name, "eth%d");
+ ifxmips_mii_chip_init(REV_MII_MODE);
+ result = register_netdev(ifxmips_mii0_dev);
+ if (result) {
+ printk(KERN_INFO "ifxmips_mii0: error %i registering device \"%s\"\n", result, ifxmips_mii0_dev->name);