Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/bwn/bwn_mac.c
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | bwn_attach(device_t dev) | ||||
if ((error = bhnd_alloc_resources(dev, sc->rspec, sc->res))) | if ((error = bhnd_alloc_resources(dev, sc->rspec, sc->res))) | ||||
return (error); | return (error); | ||||
// XXX TODO | // XXX TODO | ||||
r = sc->res[0]; | r = sc->res[0]; | ||||
device_printf(dev, "got rid=%d res=%p\n", sc->rspec[0].rid, r); | device_printf(dev, "got rid=%d res=%p\n", sc->rspec[0].rid, r); | ||||
uint8_t macaddr[6]; | uint8_t macaddr[6]; | ||||
error = bhnd_nvram_getvar(dev, BHND_NVAR_MACADDR, macaddr, | error = bhnd_nvram_getvar_array(dev, BHND_NVAR_MACADDR, macaddr, | ||||
sizeof(macaddr)); | sizeof(macaddr), BHND_NVRAM_TYPE_UINT8); | ||||
if (error) | if (error) | ||||
return (error); | return (error); | ||||
device_printf(dev, "got macaddr %6D\n", macaddr, ":"); | device_printf(dev, "got macaddr %6D\n", macaddr, ":"); | ||||
return (0); | return (0); | ||||
} | } | ||||
static int | static int | ||||
bwn_detach(device_t dev) | bwn_detach(device_t dev) | ||||
{ | { | ||||
struct bwn_softc *sc; | struct bwn_softc *sc; | ||||
Show All 34 Lines |