mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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. MFC after: 1 week
This commit is contained in:
parent
2a8e73ea33
commit
33299e3d96
1 changed files with 4 additions and 2 deletions
|
|
@ -152,7 +152,7 @@ static const struct usb_device_id smsc_devs[] = {
|
|||
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_softc *sc)
|
|||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue