svn commit: r193707 - projects/mesh11s/sys/net80211

Rui Paulo rpaulo at FreeBSD.org
Mon Jun 8 11:21:10 UTC 2009


Author: rpaulo
Date: Mon Jun  8 11:21:09 2009
New Revision: 193707
URL: http://svn.freebsd.org/changeset/base/193707

Log:
  Rework decap() to accomodate space for all AE bits.
  
  Idea by:	sam
  Sponsored by:	The FreeBSD Foundation

Modified:
  projects/mesh11s/sys/net80211/ieee80211_input.c

Modified: projects/mesh11s/sys/net80211/ieee80211_input.c
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_input.c	Mon Jun  8 11:18:05 2009	(r193706)
+++ projects/mesh11s/sys/net80211/ieee80211_input.c	Mon Jun  8 11:21:09 2009	(r193707)
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
 
 #include <net80211/ieee80211_var.h>
 #include <net80211/ieee80211_input.h>
+#include <net80211/ieee80211_mesh.h>
 
 #include <net/bpf.h>
 
@@ -225,7 +226,12 @@ ieee80211_deliver_data(struct ieee80211v
 struct mbuf *
 ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen)
 {
-	struct ieee80211_meshframe wh;	/* Max size address frames */
+	union {
+		struct ieee80211_qosframe_addr4 wh4;
+		uint8_t b[sizeof(struct ieee80211_qosframe_addr4) +
+			  sizeof(struct ieee80211_meshcntl_ae11)];
+	} whu;
+#define	wh	whu.wh4
 	struct ether_header *eh;
 	struct llc *llc;
 
@@ -322,6 +328,7 @@ ieee80211_decap(struct ieee80211vap *vap
 		eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh));
 	}
 	return m;
+#undef	wh
 }
 
 /*


More information about the svn-src-projects mailing list