svn commit: r238507 - head/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Sun Jul 15 20:51:42 UTC 2012


Author: adrian
Date: Sun Jul 15 20:51:41 2012
New Revision: 238507
URL: http://svn.freebsd.org/changeset/base/238507

Log:
  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".

Modified:
  head/sys/dev/ath/if_ath_rx.c
  head/sys/dev/ath/if_ath_sysctl.c
  head/sys/dev/ath/if_athioctl.h

Modified: head/sys/dev/ath/if_ath_rx.c
==============================================================================
--- head/sys/dev/ath/if_ath_rx.c	Sun Jul 15 20:48:21 2012	(r238506)
+++ head/sys/dev/ath/if_ath_rx.c	Sun Jul 15 20:51:41 2012	(r238507)
@@ -534,6 +534,14 @@ ath_rx_pkt(struct ath_softc *sc, struct 
 				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++;
 			/*

Modified: head/sys/dev/ath/if_ath_sysctl.c
==============================================================================
--- head/sys/dev/ath/if_ath_sysctl.c	Sun Jul 15 20:48:21 2012	(r238506)
+++ head/sys/dev/ath/if_ath_sysctl.c	Sun Jul 15 20:51:41 2012	(r238507)
@@ -934,6 +934,8 @@ ath_sysctl_stats_attach(struct ath_softc
 	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);

Modified: head/sys/dev/ath/if_athioctl.h
==============================================================================
--- head/sys/dev/ath/if_athioctl.h	Sun Jul 15 20:48:21 2012	(r238506)
+++ head/sys/dev/ath/if_athioctl.h	Sun Jul 15 20:51:41 2012	(r238507)
@@ -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)


More information about the svn-src-all mailing list