Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/iwi/if_iwi.c
Show All 12 Lines | |||||
*/ | */ | ||||
static void | static void | ||||
iwi_sysctlattach(struct iwi_softc *sc) | iwi_sysctlattach(struct iwi_softc *sc) | ||||
{ | { | ||||
struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); | struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); | ||||
struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); | struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "radio", | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "radio", | ||||
CTLTYPE_INT | CTLFLAG_RD, sc, 0, iwi_sysctl_radio, "I", | CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, | ||||
iwi_sysctl_radio, "I", | |||||
"radio transmitter switch state (0=off, 1=on)"); | "radio transmitter switch state (0=off, 1=on)"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "stats", | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "stats", | ||||
CTLTYPE_OPAQUE | CTLFLAG_RD, sc, 0, iwi_sysctl_stats, "S", | CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_NEEDGIANT, sc, 0, | ||||
"statistics"); | iwi_sysctl_stats, "S", "statistics"); | ||||
sc->bluetooth = 0; | sc->bluetooth = 0; | ||||
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "bluetooth", | SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "bluetooth", | ||||
CTLFLAG_RW, &sc->bluetooth, 0, "bluetooth coexistence"); | CTLFLAG_RW, &sc->bluetooth, 0, "bluetooth coexistence"); | ||||
sc->antenna = IWI_ANTENNA_AUTO; | sc->antenna = IWI_ANTENNA_AUTO; | ||||
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "antenna", | SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "antenna", | ||||
CTLFLAG_RW, &sc->antenna, 0, "antenna (0=auto)"); | CTLFLAG_RW, &sc->antenna, 0, "antenna (0=auto)"); | ||||
Show All 24 Lines | |||||
struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); | struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); | ||||
sc->sc_blinking = 0; | sc->sc_blinking = 0; | ||||
sc->sc_ledstate = 1; | sc->sc_ledstate = 1; | ||||
sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */ | sc->sc_ledidle = (2700*hz)/1000; /* 2.7sec */ | ||||
callout_init_mtx(&sc->sc_ledtimer, &sc->sc_mtx, 0); | callout_init_mtx(&sc->sc_ledtimer, &sc->sc_mtx, 0); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"softled", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "softled", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | ||||
iwi_sysctl_softled, "I", "enable/disable software LED support"); | iwi_sysctl_softled, "I", "enable/disable software LED support"); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"ledpin", CTLFLAG_RW, &sc->sc_ledpin, 0, | "ledpin", CTLFLAG_RW, &sc->sc_ledpin, 0, | ||||
"pin setting to turn activity LED on"); | "pin setting to turn activity LED on"); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0, | "ledidle", CTLFLAG_RW, &sc->sc_ledidle, 0, | ||||
"idle time for inactivity LED (ticks)"); | "idle time for inactivity LED (ticks)"); | ||||
/* XXX for debugging */ | /* XXX for debugging */ | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
Show All 12 Lines |