Lines 1554-1561
static void
Link Here
|
1554 |
smsc_attach_post(struct usb_ether *ue) |
1554 |
smsc_attach_post(struct usb_ether *ue) |
1555 |
{ |
1555 |
{ |
1556 |
struct smsc_softc *sc = uether_getsc(ue); |
1556 |
struct smsc_softc *sc = uether_getsc(ue); |
|
|
1557 |
struct ether_addr eaddr; |
1557 |
uint32_t mac_h, mac_l; |
1558 |
uint32_t mac_h, mac_l; |
1558 |
int err; |
1559 |
int err; |
|
|
1560 |
int i; |
1559 |
|
1561 |
|
1560 |
smsc_dbg_printf(sc, "smsc_attach_post\n"); |
1562 |
smsc_dbg_printf(sc, "smsc_attach_post\n"); |
1561 |
|
1563 |
|
Lines 1589-1597
smsc_attach_post(struct usb_ether *ue)
Link Here
|
1589 |
err = usb_fdt_get_mac_addr(sc->sc_ue.ue_dev, &sc->sc_ue); |
1591 |
err = usb_fdt_get_mac_addr(sc->sc_ue.ue_dev, &sc->sc_ue); |
1590 |
#endif |
1592 |
#endif |
1591 |
if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) { |
1593 |
if ((err != 0) || (!ETHER_IS_VALID(sc->sc_ue.ue_eaddr))) { |
1592 |
read_random(sc->sc_ue.ue_eaddr, ETHER_ADDR_LEN); |
1594 |
device_printf(ue->ue_dev, "No MAC address found. Using ether_gen_addr().\n"); |
1593 |
sc->sc_ue.ue_eaddr[0] &= ~0x01; /* unicast */ |
1595 |
ether_gen_addr(ue->ue_ifp, &eaddr); |
1594 |
sc->sc_ue.ue_eaddr[0] |= 0x02; /* locally administered */ |
1596 |
for (i = 0; i < ETHER_ADDR_LEN; i++) |
|
|
1597 |
sc->sc_ue.ue_eaddr[i] = eaddr.octet[i]; |
1595 |
} |
1598 |
} |
1596 |
} |
1599 |
} |
1597 |
|
1600 |
|