Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Nov 2004 16:11:09 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 66035 for review
Message-ID:  <200411291611.iATGB9S9009166@repoman.freebsd.org>

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

Change 66035 by sam@sam_ebb on 2004/11/29 16:11:06

	o use MINCLSIZE instead of MHLEN
	o minor cleanup to assert
	o note we need to be careful when adding 4-address support

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#5 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_freebsd.c#5 (text+ko) ====

@@ -157,10 +157,11 @@
 	 * NB: we know the mbuf routines will align the data area
 	 *     so we don't need to do anything special.
 	 */
+	/* XXX 4-address frame? */
 	len = roundup(sizeof(struct ieee80211_frame) + pktlen, 4);
-	KASSERT(len <= MCLBYTES, ("802.11 packet too large: %u", len));
-	if (len <= MHLEN) {
-		MGETHDR(m, M_NOWAIT, MT_HEADER);
+	KASSERT(len <= MCLBYTES, ("802.11 mgt frame too large: %u", len));
+	if (len < MINCLSIZE) {
+		m = m_gethdr(M_NOWAIT, MT_HEADER);
 		/*
 		 * Align the data in case additional headers are added.
 		 * This should only happen when a WEP header is added



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