aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2013-02-12 11:24:37 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2013-02-12 11:24:37 +0000
commit23f4fd6da409f9bca1ce839776e72e85baeee3e9 (patch)
tree9f43f7b239d3da24bbf04b72c80ab6f3f275d321
parentbb2902189e1e903c5eddc730bdb57e6d232e479e (diff)
downloadsrc-23f4fd6da409f9bca1ce839776e72e85baeee3e9.tar.gz
src-23f4fd6da409f9bca1ce839776e72e85baeee3e9.zip
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.
Notes
Notes: svn path=/head/; revision=246710
-rw-r--r--sys/net80211/ieee80211_freebsd.c2
-rw-r--r--sys/net80211/ieee80211_input.c4
-rw-r--r--sys/net80211/ieee80211_mesh.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c
index 1c6491551a4c..72db2718c43c 100644
--- a/sys/net80211/ieee80211_freebsd.c
+++ b/sys/net80211/ieee80211_freebsd.c
@@ -432,6 +432,7 @@ ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen)
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 *vap, struct mbuf *m, size_t align)
m_freem(m);
return n;
}
+#endif /* !__NO_STRICT_ALIGNMENT */
int
ieee80211_add_callback(struct mbuf *m,
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index ebc4642f4975..91adc6c1ec11 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -323,13 +323,13 @@ ieee80211_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen)
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));
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c
index 6d323cdc863b..f4f94d182568 100644
--- a/sys/net80211/ieee80211_mesh.c
+++ b/sys/net80211/ieee80211_mesh.c
@@ -1401,13 +1401,13 @@ mesh_decap(struct ieee80211vap *vap, struct mbuf *m, int hdrlen, int meshdrlen)
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));