Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/if_ath_sysctl.c
Show All 12 Lines | |||||
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "alq", CTLFLAG_RD, | tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "alq", CTLFLAG_RD, | ||||
NULL, "Atheros ALQ logging parameters"); | NULL, "Atheros ALQ logging parameters"); | ||||
child = SYSCTL_CHILDREN(tree); | child = SYSCTL_CHILDREN(tree); | ||||
SYSCTL_ADD_STRING(ctx, child, OID_AUTO, "filename", | SYSCTL_ADD_STRING(ctx, child, OID_AUTO, "filename", | ||||
CTLFLAG_RW, sc->sc_alq.sc_alq_filename, 0, "ALQ filename"); | CTLFLAG_RW, sc->sc_alq.sc_alq_filename, 0, "ALQ filename"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"enable", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "enable", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, | ||||
sc, 0, | |||||
ath_sysctl_alq_log, "I", ""); | ath_sysctl_alq_log, "I", ""); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"debugmask", CTLFLAG_RW, &sc->sc_alq.sc_alq_debug, 0, | "debugmask", CTLFLAG_RW, &sc->sc_alq.sc_alq_debug, 0, | ||||
"ALQ debug mask"); | "ALQ debug mask"); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"numlost", CTLFLAG_RW, &sc->sc_alq.sc_alq_numlost, 0, | "numlost", CTLFLAG_RW, &sc->sc_alq.sc_alq_numlost, 0, | ||||
Show All 20 Lines | |||||
"control debugging printfs"); | "control debugging printfs"); | ||||
#endif | #endif | ||||
#ifdef ATH_DEBUG_ALQ | #ifdef ATH_DEBUG_ALQ | ||||
SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_QUAD(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"ktrdebug", CTLFLAG_RW, &sc->sc_ktrdebug, | "ktrdebug", CTLFLAG_RW, &sc->sc_ktrdebug, | ||||
"control debugging KTR"); | "control debugging KTR"); | ||||
#endif /* ATH_DEBUG_ALQ */ | #endif /* ATH_DEBUG_ALQ */ | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"slottime", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "slottime", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_slottime, "I", "802.11 slot time (us)"); | ath_sysctl_slottime, "I", "802.11 slot time (us)"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"acktimeout", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "acktimeout", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_acktimeout, "I", "802.11 ACK timeout (us)"); | ath_sysctl_acktimeout, "I", "802.11 ACK timeout (us)"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"ctstimeout", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "ctstimeout", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_ctstimeout, "I", "802.11 CTS timeout (us)"); | ath_sysctl_ctstimeout, "I", "802.11 CTS timeout (us)"); | ||||
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, | |||||
ath_sysctl_softled, "I", "enable/disable software LED support"); | ath_sysctl_softled, "I", "enable/disable software LED support"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"ledpin", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "ledpin", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_ledpin, "I", "GPIO pin connected to LED"); | ath_sysctl_ledpin, "I", "GPIO pin connected to LED"); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"ledon", CTLFLAG_RW, &sc->sc_ledon, 0, | "ledon", CTLFLAG_RW, &sc->sc_ledon, 0, | ||||
"setting to turn LED on"); | "setting to turn 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)"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"hardled", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "hardled", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_hardled, "I", "enable/disable hardware LED support"); | ath_sysctl_hardled, "I", "enable/disable hardware LED support"); | ||||
/* XXX Laziness - configure pins, then flip hardled off/on */ | /* XXX Laziness - configure pins, then flip hardled off/on */ | ||||
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"led_net_pin", CTLFLAG_RW, &sc->sc_led_net_pin, 0, | "led_net_pin", CTLFLAG_RW, &sc->sc_led_net_pin, 0, | ||||
"MAC Network LED pin, or -1 to disable"); | "MAC Network LED pin, or -1 to disable"); | ||||
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"led_pwr_pin", CTLFLAG_RW, &sc->sc_led_pwr_pin, 0, | "led_pwr_pin", CTLFLAG_RW, &sc->sc_led_pwr_pin, 0, | ||||
"MAC Power LED pin, or -1 to disable"); | "MAC Power LED pin, or -1 to disable"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"txantenna", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "txantenna", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_txantenna, "I", "antenna switch"); | ath_sysctl_txantenna, "I", "antenna switch"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"rxantenna", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "rxantenna", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_rxantenna, "I", "default/rx antenna"); | ath_sysctl_rxantenna, "I", "default/rx antenna"); | ||||
if (ath_hal_hasdiversity(ah)) | if (ath_hal_hasdiversity(ah)) | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"diversity", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "diversity", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_diversity, "I", "antenna diversity"); | ath_sysctl_diversity, "I", "antenna diversity"); | ||||
sc->sc_txintrperiod = ATH_TXINTR_PERIOD; | sc->sc_txintrperiod = ATH_TXINTR_PERIOD; | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"txintrperiod", CTLFLAG_RW, &sc->sc_txintrperiod, 0, | "txintrperiod", CTLFLAG_RW, &sc->sc_txintrperiod, 0, | ||||
"tx descriptor batching"); | "tx descriptor batching"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"diag", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "diag", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | ||||
ath_sysctl_diag, "I", "h/w diagnostic control"); | ath_sysctl_diag, "I", "h/w diagnostic control"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"tpscale", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "tpscale", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | ||||
ath_sysctl_tpscale, "I", "tx power scaling"); | ath_sysctl_tpscale, "I", "tx power scaling"); | ||||
if (ath_hal_hastpc(ah)) { | if (ath_hal_hastpc(ah)) { | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"tpc", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "tpc", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_tpc, "I", "enable/disable per-packet TPC"); | ath_sysctl_tpc, "I", "enable/disable per-packet TPC"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"tpack", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "tpack", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_tpack, "I", "tx power for ack frames"); | ath_sysctl_tpack, "I", "tx power for ack frames"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"tpcts", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "tpcts", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_tpcts, "I", "tx power for cts frames"); | ath_sysctl_tpcts, "I", "tx power for cts frames"); | ||||
} | } | ||||
if (ath_hal_hasrfsilent(ah)) { | if (ath_hal_hasrfsilent(ah)) { | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"rfsilent", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "rfsilent", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_rfsilent, "I", "h/w RF silent config"); | ath_sysctl_rfsilent, "I", "h/w RF silent config"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"rfkill", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "rfkill", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_rfkill, "I", "enable/disable RF kill switch"); | ath_sysctl_rfkill, "I", "enable/disable RF kill switch"); | ||||
} | } | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"txagg", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "txagg", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | ||||
ath_sysctl_txagg, "I", ""); | ath_sysctl_txagg, "I", ""); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"forcebstuck", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "forcebstuck", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_forcebstuck, "I", ""); | ath_sysctl_forcebstuck, "I", ""); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"hangcheck", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "hangcheck", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_hangcheck, "I", ""); | ath_sysctl_hangcheck, "I", ""); | ||||
if (ath_hal_hasintmit(ah)) { | if (ath_hal_hasintmit(ah)) { | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"intmit", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "intmit", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_intmit, "I", "interference mitigation"); | ath_sysctl_intmit, "I", "interference mitigation"); | ||||
} | } | ||||
sc->sc_monpass = HAL_RXERR_DECRYPT | HAL_RXERR_MIC; | sc->sc_monpass = HAL_RXERR_DECRYPT | HAL_RXERR_MIC; | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"monpass", CTLFLAG_RW, &sc->sc_monpass, 0, | "monpass", CTLFLAG_RW, &sc->sc_monpass, 0, | ||||
"mask of error frames to pass when monitoring"); | "mask of error frames to pass when monitoring"); | ||||
SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
Show All 24 Lines | |||||
"TDMA SWBA preparation time"); | "TDMA SWBA preparation time"); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"guardtime", CTLFLAG_RW, &sc->sc_tdmaguard, 0, | "guardtime", CTLFLAG_RW, &sc->sc_tdmaguard, 0, | ||||
"TDMA slot guard time"); | "TDMA slot guard time"); | ||||
SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"superframe", CTLFLAG_RD, &sc->sc_tdmabintval, 0, | "superframe", CTLFLAG_RD, &sc->sc_tdmabintval, 0, | ||||
"TDMA calculated super frame"); | "TDMA calculated super frame"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"setcca", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "setcca", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_sysctl_setcca, "I", "enable CCA control"); | ath_sysctl_setcca, "I", "enable CCA control"); | ||||
} | } | ||||
#endif | #endif | ||||
#ifdef ATH_DEBUG_ALQ | #ifdef ATH_DEBUG_ALQ | ||||
ath_sysctl_alq_attach(sc); | ath_sysctl_alq_attach(sc); | ||||
#endif | #endif | ||||
} | } | ||||
Show All 24 Lines | |||||
ath_sysctl_stats_attach(struct ath_softc *sc) | ath_sysctl_stats_attach(struct ath_softc *sc) | ||||
{ | { | ||||
struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); | struct sysctl_oid *tree = device_get_sysctl_tree(sc->sc_dev); | ||||
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_list *child = SYSCTL_CHILDREN(tree); | struct sysctl_oid_list *child = SYSCTL_CHILDREN(tree); | ||||
/* Create "clear" node */ | /* Create "clear" node */ | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"clear_stats", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "clear_stats", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | ||||
ath_sysctl_clearstats, "I", "clear stats"); | ath_sysctl_clearstats, "I", "clear stats"); | ||||
/* Create stats node */ | /* Create stats node */ | ||||
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, | tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, | ||||
NULL, "Statistics"); | NULL, "Statistics"); | ||||
child = SYSCTL_CHILDREN(tree); | child = SYSCTL_CHILDREN(tree); | ||||
/* This was generated from if_athioctl.h */ | /* This was generated from if_athioctl.h */ | ||||
Show All 12 Lines |