Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Dec 2004 19:17:57 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 67137 for review
Message-ID:  <200412151917.iBFJHvx2068199@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=67137

Change 67137 by sam@sam_ebb on 2004/12/15 19:17:49

	add stat for enmic failures

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#18 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#27 edit
.. //depot/projects/wifi/tools/tools/ath/80211stats.c#6 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_ioctl.h#18 (text+ko) ====

@@ -167,6 +167,7 @@
 	u_int32_t	is_crypto_attachfail;	/* cipher attach failed */
 	u_int32_t	is_crypto_swfallback;	/* cipher fallback to s/w */
 	u_int32_t	is_crypto_keyfail;	/* driver key alloc failed */
+	u_int32_t	is_crypto_enmicfail;	/* en-MIC failed */
 	u_int32_t	is_ibss_capmismatch;	/* merge failed-cap mismatch */
 	u_int32_t	is_ibss_norate;		/* merge failed-rate mismatch */
 	u_int32_t	is_ps_unassoc;		/* ps-poll for unassoc. sta */

==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#27 (text+ko) ====

@@ -229,6 +229,7 @@
 	 * bytes recovered to which we need additional space for the
 	 * 802.11 header and any crypto header.
 	 */
+	/* XXX check trailing space and copy instead? */
 	if (M_LEADINGSPACE(m) < needed_space - TO_BE_RECLAIMED) {
 		struct mbuf *n = m_gethdr(M_NOWAIT, m->m_type);
 		if (n == NULL) {
@@ -556,7 +557,7 @@
 				IEEE80211_DPRINTF(ic, IEEE80211_MSG_OUTPUT,
 				    "[%s] enmic failed, discard frame\n",
 				    ether_sprintf(eh.ether_dhost));
-				/* XXX statistic */
+				ic->ic_stats.is_crypto_enmicfail++;
 				goto bad;
 			}
 		}

==== //depot/projects/wifi/tools/tools/ath/80211stats.c#6 (text+ko) ====

@@ -137,7 +137,8 @@
 	STAT(crypto_nocipher,	"setkey failed 'cuz cipher module unavailable");
 	STAT(crypto_attachfail,	"setkey failed 'cuz cipher attach failed");
 	STAT(crypto_swfallback,	"crypto fell back to s/w implementation");
-	STAT(crypto_keyfail,	"setkey faied 'cuz driver key alloc failed");
+	STAT(crypto_keyfail,	"setkey failed 'cuz driver key alloc failed");
+	STAT(crypto_enmicfail,	"enmic failed (may be mbuf exhaustion)");
 	STAT(ibss_capmismatch,	"ibss merge faied 'cuz capabilities mismatch");
 	STAT(ibss_norate,	"ibss merge faied 'cuz rate set mismatch");
 	STAT(ps_unassoc,	"ps-poll received for unassociated station");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412151917.iBFJHvx2068199>