aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2012-07-15 20:51:41 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2012-07-15 20:51:41 +0000
commitc7f5bb7a4f6798cac045541bee18bda0263286a8 (patch)
tree24096f5abd94fe5daf9be79c9355ecfa29f05a8c /sys/dev/ath
parent29edf89eaa73582a721549616393a39674ea3c89 (diff)
downloadsrc-c7f5bb7a4f6798cac045541bee18bda0263286a8.tar.gz
src-c7f5bb7a4f6798cac045541bee18bda0263286a8.zip
Handle RX Keymiss events.
The AR9003 series NICs implement a separate RX error to signal that a Keycache miss occured. The earlier NICs would not set the key index valid bit. I'll dig into the difference between "no key index bit set" and "keycache miss".
Notes
Notes: svn path=/head/; revision=238507
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath_rx.c8
-rw-r--r--sys/dev/ath/if_ath_sysctl.c2
-rw-r--r--sys/dev/ath/if_athioctl.h4
3 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/ath/if_ath_rx.c b/sys/dev/ath/if_ath_rx.c
index eba6ba539608..9e90977b9057 100644
--- a/sys/dev/ath/if_ath_rx.c
+++ b/sys/dev/ath/if_ath_rx.c
@@ -534,6 +534,14 @@ ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status,
goto rx_accept;
sc->sc_stats.ast_rx_badcrypt++;
}
+ /*
+ * Similar as above - if the failure was a keymiss
+ * just punt it up to the upper layers for now.
+ */
+ if (rs->rs_status & HAL_RXERR_KEYMISS) {
+ sc->sc_stats.ast_rx_keymiss++;
+ goto rx_accept;
+ }
if (rs->rs_status & HAL_RXERR_MIC) {
sc->sc_stats.ast_rx_badmic++;
/*
diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c
index ff75888e047d..e1e9426c8fa1 100644
--- a/sys/dev/ath/if_ath_sysctl.c
+++ b/sys/dev/ath/if_ath_sysctl.c
@@ -934,6 +934,8 @@ ath_sysctl_stats_attach(struct ath_softc *sc)
SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_tx_mcastq_overflow",
CTLFLAG_RD, &sc->sc_stats.ast_tx_mcastq_overflow, 0,
"Number of multicast frames exceeding maximum mcast queue depth");
+ SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "ast_rx_keymiss", CTLFLAG_RD,
+ &sc->sc_stats.ast_rx_keymiss, 0, "");
/* Attach the RX phy error array */
ath_sysctl_stats_attach_rxphyerr(sc, child);
diff --git a/sys/dev/ath/if_athioctl.h b/sys/dev/ath/if_athioctl.h
index 71813ae18354..f40e1be10ac1 100644
--- a/sys/dev/ath/if_athioctl.h
+++ b/sys/dev/ath/if_athioctl.h
@@ -161,7 +161,9 @@ struct ath_stats {
u_int32_t ast_tx_aggr_ok; /* aggregate TX ok */
u_int32_t ast_tx_aggr_fail; /* aggregate TX failed */
u_int32_t ast_tx_mcastq_overflow; /* multicast queue overflow */
- u_int32_t ast_pad[1];
+ u_int32_t ast_rx_keymiss;
+
+ u_int32_t ast_pad[16];
};
#define SIOCGATHSTATS _IOWR('i', 137, struct ifreq)