Calling eth_bind at usb_eth_init time causes renaming of the network
device from 'usb_ether' to 'usb0'. Fixing this to keep the first name.
Signed-off-by: Vitaly Kuzmichev <vkuzmichev@mvista.com>
#include "gadget_chips.h"
-#define USB_NET_NAME "usb0"
+#define USB_NET_NAME "usb_ether"
#define atomic_read
extern struct platform_data brd;
}
dev->net = &l_netdev;
- strcpy(dev->net->name, USB_NET_NAME);
dev->cdc = cdc;
dev->zlp = zlp;
int status = 0;
struct eth_device *netdev = &l_netdev;
- sprintf(netdev->name, "usb_ether");
+ strlcpy(netdev->name, USB_NET_NAME, sizeof(netdev->name));
netdev->init = usb_eth_init;
netdev->send = usb_eth_send;