svn commit: r246710 - head/sys/net80211

Gleb Smirnoff glebius at FreeBSD.org
Tue Feb 12 11:24:38 UTC 2013


Author: glebius
Date: Tue Feb 12 11:24:37 2013
New Revision: 246710
URL: http://svnweb.freebsd.org/changeset/base/246710

Log:
  Substitute '#ifdef ALIGNED_POINTER' with '#ifndef __NO_STRICT_ALIGNMENT',
  since the former is defined everywhere. This cuts off some code not
  necessary on non strict aligment arches.
  
  Reviewed by:	adrian
  Sponsored by:	Nginx, Inc.

Modified:
  head/sys/net80211/ieee80211_freebsd.c
  head/sys/net80211/ieee80211_input.c
  head/sys/net80211/ieee80211_mesh.c

Modified: head/sys/net80211/ieee80211_freebsd.c
==============================================================================
--- head/sys/net80211/ieee80211_freebsd.c	Tue Feb 12 10:32:53 2013	(r246709)
+++ head/sys/net80211/ieee80211_freebsd.c	Tue Feb 12 11:24:37 2013	(r246710)
@@ -432,6 +432,7 @@ ieee80211_getmgtframe(uint8_t **frm, int
 	return m;
 }
 
+#ifndef __NO_STRICT_ALIGNMENT
 /*
  * Re-align the payload in the mbuf.  This is mainly used (right now)
  * to handle IP header alignment requirements on certain architectures.
@@ -468,6 +469,7 @@ ieee80211_realign(struct ieee80211vap *v
 	m_freem(m);
 	return n;
 }
+#endif /* !__NO_STRICT_ALIGNMENT */
 
 int
 ieee80211_add_callback(struct mbuf *m,

Modified: head/sys/net80211/ieee80211_input.c
==============================================================================
--- head/sys/net80211/ieee80211_input.c	Tue Feb 12 10:32:53 2013	(r246709)
+++ head/sys/net80211/ieee80211_input.c	Tue Feb 12 11:24:37 2013	(r246710)
@@ -323,13 +323,13 @@ ieee80211_decap(struct ieee80211vap *vap
 		IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr4);
 		break;
 	}
-#ifdef ALIGNED_POINTER
+#ifndef __NO_STRICT_ALIGNMENT
 	if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) {
 		m = ieee80211_realign(vap, m, sizeof(*eh));
 		if (m == NULL)
 			return NULL;
 	}
-#endif /* ALIGNED_POINTER */
+#endif /* !__NO_STRICT_ALIGNMENT */
 	if (llc != NULL) {
 		eh = mtod(m, struct ether_header *);
 		eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh));

Modified: head/sys/net80211/ieee80211_mesh.c
==============================================================================
--- head/sys/net80211/ieee80211_mesh.c	Tue Feb 12 10:32:53 2013	(r246709)
+++ head/sys/net80211/ieee80211_mesh.c	Tue Feb 12 11:24:37 2013	(r246710)
@@ -1401,13 +1401,13 @@ mesh_decap(struct ieee80211vap *vap, str
 			return NULL;
 		}
 	}
-#ifdef ALIGNED_POINTER
+#ifndef __NO_STRICT_ALIGNMENT
 	if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) {
 		m = ieee80211_realign(vap, m, sizeof(*eh));
 		if (m == NULL)
 			return NULL;
 	}
-#endif /* ALIGNED_POINTER */
+#endif /* !__NO_STRICT_ALIGNMENT */
 	if (llc != NULL) {
 		eh = mtod(m, struct ether_header *);
 		eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh));


More information about the svn-src-all mailing list