PERFORCE change 66035 for review

Sam Leffler sam at FreeBSD.org
Mon Nov 29 08:11:10 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=66035

Change 66035 by sam at 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


More information about the p4-projects mailing list