1/*- 2 * Copyright (c) 2001 Atsushi Onoe 3 * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_input.c 195757 2009-07-18 20:19:53Z sam $"); |
29 30#include "opt_wlan.h" 31 32#include <sys/param.h> 33#include <sys/systm.h> 34#include <sys/mbuf.h> 35#include <sys/malloc.h> 36#include <sys/endian.h> --- 243 unchanged lines hidden (view full) --- 280 break; 281 case IEEE80211_FC1_DIR_DSTODS: 282 IEEE80211_ADDR_COPY(eh->ether_dhost, wh.i_addr3); 283 IEEE80211_ADDR_COPY(eh->ether_shost, wh.i_addr4); 284 break; 285 } 286#ifdef ALIGNED_POINTER 287 if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) { |
288 m = ieee80211_realign(vap, m, sizeof(*eh)); 289 if (m == NULL) 290 return NULL; |
291 } 292#endif /* ALIGNED_POINTER */ 293 if (llc != NULL) { 294 eh = mtod(m, struct ether_header *); 295 eh->ether_type = htons(m->m_pkthdr.len - sizeof(*eh)); 296 } 297 return m; 298#undef wh --- 557 unchanged lines hidden --- |