From owner-p4-projects@FreeBSD.ORG Wed Dec 15 19:17:58 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0A92916A4D1; Wed, 15 Dec 2004 19:17:58 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB1F716A4CE for ; Wed, 15 Dec 2004 19:17:57 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 984D943D58 for ; Wed, 15 Dec 2004 19:17:57 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id iBFJHvY3068202 for ; Wed, 15 Dec 2004 19:17:57 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBFJHvx2068199 for perforce@freebsd.org; Wed, 15 Dec 2004 19:17:57 GMT (envelope-from sam@freebsd.org) Date: Wed, 15 Dec 2004 19:17:57 GMT Message-Id: <200412151917.iBFJHvx2068199@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 67137 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Dec 2004 19:17:58 -0000 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");