需求多个网卡统一名字,比如xx1~xx4,其中有usb网卡,pcie,以及RK3399 RGMII +PHY的网卡,以下方式是固定写死的,
PCIE的网卡
index 8fecdf9238ed..7a892e3ab370 100755
--- a/drivers/net/ethernet/realtek/r8169.c
+++ b/drivers/net/ethernet/realtek/r8169.c
@@ -8477,7 +8479,7 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
}
pci_set_drvdata(pdev, dev);
- strcpy(dev->name,"eth0");
+ strcpy(dev->name,"lan3");
rc = register_netdev(dev);
if (rc < 0)
goto err_out_cnt_5;
RK3399 GMAC接出来的网卡
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2985,7 +2985,7 @@ int stmmac_dvr_probe(struct device *device,
goto error_mdio_register;
}
}
-
&#