From owner-p4-projects@FreeBSD.ORG Tue Dec 14 03:13:11 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6CFB016A4D0; Tue, 14 Dec 2004 03:13:11 +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 4800716A4CE for ; Tue, 14 Dec 2004 03:13:11 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 325C443D66 for ; Tue, 14 Dec 2004 03:13:11 +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 iBE3DAY9001668 for ; Tue, 14 Dec 2004 03:13:10 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id iBE3DAmU001665 for perforce@freebsd.org; Tue, 14 Dec 2004 03:13:10 GMT (envelope-from sam@freebsd.org) Date: Tue, 14 Dec 2004 03:13:10 GMT Message-Id: <200412140313.iBE3DAmU001665@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 67020 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: Tue, 14 Dec 2004 03:13:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=67020 Change 67020 by sam@sam_ebb on 2004/12/14 03:12:31 o fix mic pseudo hdr calculation for QoS frames o remove some XXX comments no longer needed o make debug msgs consistent Affected files ... .. //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#6 edit Differences ... ==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#6 (text+ko) ==== @@ -200,7 +200,7 @@ return 0; /* NB: tkip_encrypt handles wk_keytsc */ } else - k->wk_keytsc++; /* XXX wrap at 48 bits */ + k->wk_keytsc++; return 1; } @@ -264,7 +264,7 @@ * No extended IV; discard frame. */ IEEE80211_DPRINTF(ctx->tc_ic, IEEE80211_MSG_CRYPTO, - "[%s] Missing ExtIV for TKIP cipher\n", + "[%s] missing ExtIV for TKIP cipher\n", ether_sprintf(wh->i_addr2)); ctx->tc_ic->ic_stats.is_rx_tkipformat++; return 0; @@ -274,14 +274,13 @@ */ if (ic->ic_flags & IEEE80211_F_COUNTERM) { IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO, - "[%s] Discard frame due to countermeasures (%s)\n", + "[%s] discard frame due to countermeasures (%s)\n", ether_sprintf(wh->i_addr2), __func__); ic->ic_stats.is_crypto_tkipcm++; return 0; } - ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], - ivp[6], ivp[7]); + ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], ivp[6], ivp[7]); if (ctx->rx_rsc <= k->wk_keyrsc) { /* * Replay violation; notify upper layer. @@ -781,7 +780,12 @@ break; } - hdr[12] = 0; /* XXX qos priority */ + if (wh->i_fc[0] & IEEE80211_FC0_SUBTYPE_QOS) { + const struct ieee80211_qosframe *qwh = + (const struct ieee80211_qosframe *) wh; + hdr[12] = qwh->i_qos[0] & IEEE80211_QOS_TID; + } else + hdr[12] = 0; hdr[13] = hdr[14] = hdr[15] = 0; /* reserved */ } @@ -917,7 +921,7 @@ icv); (void) m_append(m, IEEE80211_WEP_CRCLEN, icv); /* XXX check return */ - key->wk_keytsc++; /* XXX wrap at 48 bits */ + key->wk_keytsc++; if ((u16)(key->wk_keytsc) == 0) ctx->tx_phase1_done = 0; return 1;