Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/ath_rate/sample/sample.c
Show All 12 Lines | |||||
static void | static void | ||||
ath_rate_sysctlattach(struct ath_softc *sc, struct sample_softc *ssc) | ath_rate_sysctlattach(struct ath_softc *sc, struct sample_softc *ssc) | ||||
{ | { | ||||
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, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"smoothing_rate", CTLTYPE_INT | CTLFLAG_RW, ssc, 0, | "smoothing_rate", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, ssc, 0, | |||||
ath_rate_sysctl_smoothing_rate, "I", | ath_rate_sysctl_smoothing_rate, "I", | ||||
"sample: smoothing rate for avg tx time (%%)"); | "sample: smoothing rate for avg tx time (%%)"); | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"sample_rate", CTLTYPE_INT | CTLFLAG_RW, ssc, 0, | "sample_rate", CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, ssc, 0, | ||||
ath_rate_sysctl_sample_rate, "I", | ath_rate_sysctl_sample_rate, "I", | ||||
"sample: percent air time devoted to sampling new rates (%%)"); | "sample: percent air time devoted to sampling new rates (%%)"); | ||||
/* XXX max_successive_failures, stale_failure_timeout, min_switch */ | /* XXX max_successive_failures, stale_failure_timeout, min_switch */ | ||||
SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, | ||||
"sample_stats", CTLTYPE_INT | CTLFLAG_RW, sc, 0, | "sample_stats", | ||||
CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_NEEDGIANT, sc, 0, | |||||
ath_rate_sysctl_stats, "I", "sample: print statistics"); | ath_rate_sysctl_stats, "I", "sample: print statistics"); | ||||
} | } | ||||
struct ath_ratectrl * | struct ath_ratectrl * | ||||
ath_rate_attach(struct ath_softc *sc) | ath_rate_attach(struct ath_softc *sc) | ||||
{ | { | ||||
struct sample_softc *ssc; | struct sample_softc *ssc; | ||||
Show All 12 Lines |