Add in a per phy error sysctl.
This commit is contained in:
parent
4c97400f86
commit
ec165c61b1
@ -6332,6 +6332,23 @@ ath_sysctl_clearstats(SYSCTL_HANDLER_ARGS)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
ath_sysctl_stats_attach_rxphyerr(struct ath_softc *sc, struct sysctl_oid_list *parent)
|
||||
{
|
||||
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_list *child = SYSCTL_CHILDREN(tree);
|
||||
int i;
|
||||
char sn[8];
|
||||
|
||||
tree = SYSCTL_ADD_NODE(ctx, parent, OID_AUTO, "rx_phy_err", CTLFLAG_RD, NULL, "Per-code RX PHY Errors");
|
||||
child = SYSCTL_CHILDREN(tree);
|
||||
for (i = 0; i < 32; i++) {
|
||||
snprintf(sn, sizeof(sn), "%d", i);
|
||||
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, sn, CTLFLAG_RD, &sc->sc_stats.ast_rx_phy[i], 0, "");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
ath_sysctl_stats_attach(struct ath_softc *sc)
|
||||
{
|
||||
@ -6503,4 +6520,7 @@ ath_sysctl_stats_attach(struct ath_softc *sc)
|
||||
&sc->sc_stats.ast_ani_cal, 0, "number of ANI polls");
|
||||
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_agg", CTLFLAG_RD,
|
||||
&sc->sc_stats.ast_rx_agg, 0, "number of aggregate frames received");
|
||||
|
||||
/* Attach the RX phy error array */
|
||||
ath_sysctl_stats_attach_rxphyerr(sc, child);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user