svn commit: r309255 - stable/10/sys/dev/usb/net
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Nov 28 17:24:25 UTC 2016
Author: hselasky
Date: Mon Nov 28 17:24:24 2016
New Revision: 309255
URL: https://svnweb.freebsd.org/changeset/base/309255
Log:
MFC r308730:
Make sure MAC address is reprogrammed when if_init() callback is
invoked. Else promiscious mode must be used to pass traffic. While at
it fix a debug print macro.
Modified:
stable/10/sys/dev/usb/net/if_smsc.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/sys/dev/usb/net/if_smsc.c
==============================================================================
--- stable/10/sys/dev/usb/net/if_smsc.c Mon Nov 28 17:22:45 2016 (r309254)
+++ stable/10/sys/dev/usb/net/if_smsc.c Mon Nov 28 17:24:24 2016 (r309255)
@@ -131,7 +131,7 @@ static const struct usb_device_id smsc_d
device_printf((sc)->sc_ue.ue_dev, "debug: " fmt, ##args); \
} while(0)
#else
-#define smsc_dbg_printf(sc, fmt, args...)
+#define smsc_dbg_printf(sc, fmt, args...) do { } while (0)
#endif
#define smsc_warn_printf(sc, fmt, args...) \
@@ -801,7 +801,6 @@ static int smsc_sethwcsum(struct smsc_so
return (0);
}
-
/**
* smsc_setmacaddress - Sets the mac address in the device
* @sc: driver soft context
@@ -884,6 +883,9 @@ smsc_init(struct usb_ether *ue)
SMSC_LOCK_ASSERT(sc, MA_OWNED);
+ if (smsc_setmacaddress(sc, IF_LLADDR(ifp)))
+ smsc_dbg_printf(sc, "setting MAC address failed\n");
+
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
return;
More information about the svn-src-all
mailing list