ieee80211_freebsd.c (243882) | ieee80211_freebsd.c (246710) |
---|---|
1/*- 2 * Copyright (c) 2003-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2003-2009 Sam Leffler, Errno Consulting 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 10 unchanged lines hidden (view full) --- 19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 243882 2012-12-05 08:04:20Z glebius $"); | 27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 246710 2013-02-12 11:24:37Z glebius $"); |
28 29/* 30 * IEEE 802.11 support (FreeBSD-specific code) 31 */ 32#include "opt_wlan.h" 33 34#include <sys/param.h> 35#include <sys/kernel.h> --- 391 unchanged lines hidden (view full) --- 427 } 428 if (m != NULL) { 429 m->m_data += headroom; 430 *frm = m->m_data; 431 } 432 return m; 433} 434 | 28 29/* 30 * IEEE 802.11 support (FreeBSD-specific code) 31 */ 32#include "opt_wlan.h" 33 34#include <sys/param.h> 35#include <sys/kernel.h> --- 391 unchanged lines hidden (view full) --- 427 } 428 if (m != NULL) { 429 m->m_data += headroom; 430 *frm = m->m_data; 431 } 432 return m; 433} 434 |
435#ifndef __NO_STRICT_ALIGNMENT |
|
435/* 436 * Re-align the payload in the mbuf. This is mainly used (right now) 437 * to handle IP header alignment requirements on certain architectures. 438 */ 439struct mbuf * 440ieee80211_realign(struct ieee80211vap *vap, struct mbuf *m, size_t align) 441{ 442 int pktlen, space; --- 20 unchanged lines hidden (view full) --- 463 IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, 464 mtod(m, const struct ieee80211_frame *), NULL, 465 "%s", "no mbuf to realign"); 466 vap->iv_stats.is_rx_badalign++; 467 } 468 m_freem(m); 469 return n; 470} | 436/* 437 * Re-align the payload in the mbuf. This is mainly used (right now) 438 * to handle IP header alignment requirements on certain architectures. 439 */ 440struct mbuf * 441ieee80211_realign(struct ieee80211vap *vap, struct mbuf *m, size_t align) 442{ 443 int pktlen, space; --- 20 unchanged lines hidden (view full) --- 464 IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, 465 mtod(m, const struct ieee80211_frame *), NULL, 466 "%s", "no mbuf to realign"); 467 vap->iv_stats.is_rx_badalign++; 468 } 469 m_freem(m); 470 return n; 471} |
472#endif /* !__NO_STRICT_ALIGNMENT */ |
|
471 472int 473ieee80211_add_callback(struct mbuf *m, 474 void (*func)(struct ieee80211_node *, void *, int), void *arg) 475{ 476 struct m_tag *mtag; 477 struct ieee80211_cb *cb; 478 --- 391 unchanged lines hidden --- | 473 474int 475ieee80211_add_callback(struct mbuf *m, 476 void (*func)(struct ieee80211_node *, void *, int), void *arg) 477{ 478 struct m_tag *mtag; 479 struct ieee80211_cb *cb; 480 --- 391 unchanged lines hidden --- |