Rename ethernet interfaces to wan0 and lan0
(b2b0b4bcad5b3e1c240ecf24cf1469d37f5d9006 with new file location)
Change-Id: I7e10bcef8138b65168d0d5ac899a97d3c116cc81
diff --git a/drivers/qtn/topaz/switch_emac.c b/drivers/qtn/topaz/switch_emac.c
index 894fa89..a1cd80b 100644
--- a/drivers/qtn/topaz/switch_emac.c
+++ b/drivers/qtn/topaz/switch_emac.c
@@ -1126,7 +1126,13 @@
}
/* Allocate device structure */
- sprintf(devname, "eth%d_emac%d", soc_id(), port_num);
+
+ if (port_num == 0)
+ strcpy(devname, "wan0");
+ else if (port_num == 1)
+ strcpy(devname, "lan0");
+ else
+ sprintf(devname, "eth%d_emac%d", soc_id(), port_num);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
dev = alloc_netdev(sizeof(struct topaz_emac_priv), devname, NET_NAME_UNKNOWN, ether_setup);
#else