Author: hselasky Date: Mon Nov 28 17:22:45 2016 New Revision: 309254 URL: https://svnweb.freebsd.org/changeset/base/309254
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/11/sys/dev/usb/net/if_smsc.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/usb/net/if_smsc.c ============================================================================== --- stable/11/sys/dev/usb/net/if_smsc.c Mon Nov 28 17:06:35 2016 (r309253) +++ stable/11/sys/dev/usb/net/if_smsc.c Mon Nov 28 17:22:45 2016 (r309254) @@ -152,7 +152,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...) \ @@ -822,7 +822,6 @@ static int smsc_sethwcsum(struct smsc_so return (0); } - /** * smsc_setmacaddress - Sets the mac address in the device * @sc: driver soft context @@ -905,6 +904,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; _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"