Deleted Added
full compact
ieee80211_freebsd.c (287197) ieee80211_freebsd.c (288245)
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 287197 2015-08-27 08:56:39Z glebius $");
27__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_freebsd.c 288245 2015-09-26 00:53:37Z adrian $");
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>

--- 450 unchanged lines hidden (view full) ---

486 mtag = m_tag_locate(m, MTAG_ABI_NET80211, NET80211_TAG_CALLBACK, NULL);
487 if (mtag != NULL) {
488 struct ieee80211_cb *cb = (struct ieee80211_cb *)(mtag+1);
489 cb->func(ni, cb->arg, status);
490 }
491}
492
493/*
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>

--- 450 unchanged lines hidden (view full) ---

486 mtag = m_tag_locate(m, MTAG_ABI_NET80211, NET80211_TAG_CALLBACK, NULL);
487 if (mtag != NULL) {
488 struct ieee80211_cb *cb = (struct ieee80211_cb *)(mtag+1);
489 cb->func(ni, cb->arg, status);
490 }
491}
492
493/*
494 * Add RX parameters to the given mbuf.
495 *
496 * Returns 1 if OK, 0 on error.
497 */
498int
499ieee80211_add_rx_params(struct mbuf *m, const struct ieee80211_rx_stats *rxs)
500{
501 struct m_tag *mtag;
502 struct ieee80211_rx_params *rx;
503
504 mtag = m_tag_alloc(MTAG_ABI_NET80211, NET80211_TAG_RECV_PARAMS,
505 sizeof(struct ieee80211_rx_stats), M_NOWAIT);
506 if (mtag == NULL)
507 return (0);
508
509 rx = (struct ieee80211_rx_params *)(mtag + 1);
510 memcpy(&rx->params, rxs, sizeof(*rxs));
511 m_tag_prepend(m, mtag);
512 return (1);
513}
514
515int
516ieee80211_get_rx_params(struct mbuf *m, struct ieee80211_rx_stats *rxs)
517{
518 struct m_tag *mtag;
519 struct ieee80211_rx_params *rx;
520
521 mtag = m_tag_locate(m, MTAG_ABI_NET80211, NET80211_TAG_RECV_PARAMS,
522 NULL);
523 if (mtag == NULL)
524 return (-1);
525 rx = (struct ieee80211_rx_params *)(mtag + 1);
526 memcpy(rxs, &rx->params, sizeof(*rxs));
527 return (0);
528}
529
530/*
494 * Transmit a frame to the parent interface.
495 *
496 * TODO: if the transmission fails, make sure the parent node is freed
497 * (the callers will first need modifying.)
498 */
499int
500ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m)
501{

--- 372 unchanged lines hidden ---
531 * Transmit a frame to the parent interface.
532 *
533 * TODO: if the transmission fails, make sure the parent node is freed
534 * (the callers will first need modifying.)
535 */
536int
537ieee80211_parent_xmitpkt(struct ieee80211com *ic, struct mbuf *m)
538{

--- 372 unchanged lines hidden ---