netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] net: usb: asix88179_178a: set permanent address once only
@ 2018-02-28 21:27 Alexander Kurz
  2018-02-28 21:27 ` [PATCH 2/2] net: usb: asix88179_178a: de-duplicate code Alexander Kurz
  0 siblings, 1 reply; 3+ messages in thread
From: Alexander Kurz @ 2018-02-28 21:27 UTC (permalink / raw)
  To: David S . Miller, Andrew F . Davis
  Cc: linux-usb, netdev, Freddy Xin, Alexander Kurz

The permanent address of asix88179_178a devices is read at probe time
and should not be overwritten later. Otherwise it may be overwritten
unintentionally with a configured address.

Signed-off-by: Alexander Kurz <akurz@blala.de>
---
 drivers/net/usb/ax88179_178a.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index f32261ecd215..a6ef75907ae9 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1556,7 +1556,6 @@ static int ax88179_reset(struct usbnet *dev)
 
 	ax88179_read_cmd(dev, AX_ACCESS_MAC, AX_NODE_ID, ETH_ALEN, ETH_ALEN,
 			 dev->net->dev_addr);
-	memcpy(dev->net->perm_addr, dev->net->dev_addr, ETH_ALEN);
 
 	/* RX bulk configuration */
 	memcpy(tmp, &AX88179_BULKIN_SIZE[0], 5);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-03-04 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-28 21:27 [PATCH 1/2] net: usb: asix88179_178a: set permanent address once only Alexander Kurz
2018-02-28 21:27 ` [PATCH 2/2] net: usb: asix88179_178a: de-duplicate code Alexander Kurz
2018-03-04 18:32   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).