Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 2004 21:49:53 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 63895 for review
Message-ID:  <200410282149.i9SLnr9b012524@repoman.freebsd.org>

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

Change 63895 by sam@sam_ebb on 2004/10/28 21:49:04

	move complaint about lacking a tx key so we can suppress it
	in a case where it's not an error

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#4 edit

Differences ...

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

@@ -230,12 +230,8 @@
 #define	KEY_UNDEFINED(k)	((k).wk_cipher == &ieee80211_cipher_none)
 	if (IEEE80211_IS_MULTICAST(mac) || KEY_UNDEFINED(ni->ni_ucastkey)) {
 		if (ic->ic_def_txkey == IEEE80211_KEYIX_NONE ||
-		    KEY_UNDEFINED(ic->ic_nw_keys[ic->ic_def_txkey])) {
-			IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
-			    "%s: No default transmit key\n", __func__);
-			/* XXX statistic */
+		    KEY_UNDEFINED(ic->ic_nw_keys[ic->ic_def_txkey]))
 			return NULL;
-		}
 		return &ic->ic_nw_keys[ic->ic_def_txkey];
 	} else {
 		return &ni->ni_ucastkey;
@@ -307,9 +303,14 @@
 	 * buffer may not be expanded as needed by the cipher
 	 * routines, but they will/should discard it.
 	 */
-	if (ic->ic_flags & IEEE80211_F_PRIVACY)
+	if (ic->ic_flags & IEEE80211_F_PRIVACY) {
 		key = ieee80211_crypto_getkey(ic, eh.ether_dhost, ni);
-	else
+		if (key == NULL && eh.ether_type != htons(ETHERTYPE_PAE)) {
+			IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
+			    "%s: No default transmit key\n", __func__);
+			/* XXX statistic */
+		}
+	} else
 		key = NULL;
 	/* XXX 4-address format */
 	if (ni->ni_flags & IEEE80211_NODE_QOS)



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