Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb PR/48251: usmsc cannot change link address



details:   https://anonhg.NetBSD.org/src/rev/f9db95ce7f28
branches:  trunk
changeset: 790223:f9db95ce7f28
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Sep 29 07:25:53 2013 +0000

description:
PR/48251: usmsc cannot change link address

Use CLLADDR appropriately.

diffstat:

 sys/dev/usb/if_smsc.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 4b1573a2db4d -r f9db95ce7f28 sys/dev/usb/if_smsc.c
--- a/sys/dev/usb/if_smsc.c     Sat Sep 28 18:01:49 2013 +0000
+++ b/sys/dev/usb/if_smsc.c     Sun Sep 29 07:25:53 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_smsc.c,v 1.10 2013/03/30 14:30:24 christos Exp $    */
+/*     $NetBSD: if_smsc.c,v 1.11 2013/09/29 07:25:53 skrll Exp $       */
 
 /*     $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
 /* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@@ -778,7 +778,9 @@
        usbd_delay_ms(sc->sc_udev, 40);
 
        /* Set the mac address */
-       if ((err = smsc_setmacaddress(sc, sc->sc_enaddr)) != 0) {
+       struct ifnet *ifp = &sc->sc_ec.ec_if;
+       const char *eaddr = CLLADDR(ifp->if_sadl);
+       if ((err = smsc_setmacaddress(sc, eaddr)) != 0) {
                smsc_warn_printf(sc, "failed to set the MAC address\n");
                goto init_failed;
        }



Home | Main Index | Thread Index | Old Index