From 20fca09e45643550652f0d3db89f8b6b381f17d1 Mon Sep 17 00:00:00 2001 From: Ajay Agarwal Date: Wed, 25 Oct 2017 15:16:11 +0530 Subject: USB: gadget: Replace %pM with %pm commit c173d5504d08ca0 ("USB: gadget: Replace %pK with %pM") modified the MAC address format specifier to %pM. So when the host PC asks for the MAC address, the device sends the address with colons present. Linux Host machines cannot handle this and ECM function fails to bind. Fix this by changing the format specifier to %pm which removes the colons and sends the MAC address. Change-Id: Id3eebfa371bd2cf976ee0f44e8a7b54690f43e77 Signed-off-by: Ajay Agarwal --- drivers/usb/gadget/function/u_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function/u_ether.c b/drivers/usb/gadget/function/u_ether.c index 1ffed7b74d3f..a5f20634ab0a 100644 --- a/drivers/usb/gadget/function/u_ether.c +++ b/drivers/usb/gadget/function/u_ether.c @@ -1132,7 +1132,7 @@ int gether_get_host_addr_cdc(struct net_device *net, char *host_addr, int len) return -EINVAL; dev = netdev_priv(net); - snprintf(host_addr, len, "%pM", dev->host_mac); + snprintf(host_addr, len, "%pm", dev->host_mac); return strlen(host_addr); } -- cgit v1.2.3