Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/wlan/if_uath.c
Show First 20 Lines • Show All 108 Lines • ▼ Show 20 Lines | |||||
#include <dev/usb/usb.h> | #include <dev/usb/usb.h> | ||||
#include <dev/usb/usbdi.h> | #include <dev/usb/usbdi.h> | ||||
#include "usbdevs.h" | #include "usbdevs.h" | ||||
#include <dev/usb/wlan/if_uathreg.h> | #include <dev/usb/wlan/if_uathreg.h> | ||||
#include <dev/usb/wlan/if_uathvar.h> | #include <dev/usb/wlan/if_uathvar.h> | ||||
static SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW, 0, "USB Atheros"); | static SYSCTL_NODE(_hw_usb, OID_AUTO, uath, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, | ||||
"USB Atheros"); | |||||
static int uath_countrycode = CTRY_DEFAULT; /* country code */ | static int uath_countrycode = CTRY_DEFAULT; /* country code */ | ||||
SYSCTL_INT(_hw_usb_uath, OID_AUTO, countrycode, CTLFLAG_RWTUN, &uath_countrycode, | SYSCTL_INT(_hw_usb_uath, OID_AUTO, countrycode, CTLFLAG_RWTUN, &uath_countrycode, | ||||
0, "country code"); | 0, "country code"); | ||||
static int uath_regdomain = 0; /* regulatory domain */ | static int uath_regdomain = 0; /* regulatory domain */ | ||||
SYSCTL_INT(_hw_usb_uath, OID_AUTO, regdomain, CTLFLAG_RD, &uath_regdomain, | SYSCTL_INT(_hw_usb_uath, OID_AUTO, regdomain, CTLFLAG_RD, &uath_regdomain, | ||||
0, "regulatory domain"); | 0, "regulatory domain"); | ||||
▲ Show 20 Lines • Show All 2,021 Lines • ▼ Show 20 Lines | uath_sysctl_node(struct uath_softc *sc) | ||||
struct sysctl_oid_list *child; | struct sysctl_oid_list *child; | ||||
struct sysctl_oid *tree; | struct sysctl_oid *tree; | ||||
struct uath_stat *stats; | struct uath_stat *stats; | ||||
stats = &sc->sc_stat; | stats = &sc->sc_stat; | ||||
ctx = device_get_sysctl_ctx(sc->sc_dev); | ctx = device_get_sysctl_ctx(sc->sc_dev); | ||||
child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)); | child = SYSCTL_CHILDREN(device_get_sysctl_tree(sc->sc_dev)); | ||||
tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", CTLFLAG_RD, | tree = SYSCTL_ADD_NODE(ctx, child, OID_AUTO, "stats", | ||||
NULL, "UATH statistics"); | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, "UATH statistics"); | ||||
child = SYSCTL_CHILDREN(tree); | child = SYSCTL_CHILDREN(tree); | ||||
UATH_SYSCTL_STAT_ADD32(ctx, child, "badchunkseqnum", | UATH_SYSCTL_STAT_ADD32(ctx, child, "badchunkseqnum", | ||||
&stats->st_badchunkseqnum, "Bad chunk sequence numbers"); | &stats->st_badchunkseqnum, "Bad chunk sequence numbers"); | ||||
UATH_SYSCTL_STAT_ADD32(ctx, child, "invalidlen", &stats->st_invalidlen, | UATH_SYSCTL_STAT_ADD32(ctx, child, "invalidlen", &stats->st_invalidlen, | ||||
"Invalid length"); | "Invalid length"); | ||||
UATH_SYSCTL_STAT_ADD32(ctx, child, "multichunk", &stats->st_multichunk, | UATH_SYSCTL_STAT_ADD32(ctx, child, "multichunk", &stats->st_multichunk, | ||||
"Multi chunks"); | "Multi chunks"); | ||||
UATH_SYSCTL_STAT_ADD32(ctx, child, "toobigrxpkt", | UATH_SYSCTL_STAT_ADD32(ctx, child, "toobigrxpkt", | ||||
▲ Show 20 Lines • Show All 714 Lines • Show Last 20 Lines |