Deleted Added
full compact
ieee80211_output.c (167432) ieee80211_output.c (167439)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2005 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:

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

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2005 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:

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

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_output.c 167432 2007-03-11 06:36:10Z sam $");
34__FBSDID("$FreeBSD: head/sys/net80211/ieee80211_output.c 167439 2007-03-11 07:06:08Z sam $");
35
36#include "opt_inet.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/mbuf.h>
41#include <sys/kernel.h>
42#include <sys/endian.h>

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

123 wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
124 IEEE80211_ADDR_COPY(wh->i_addr1, da);
125 IEEE80211_ADDR_COPY(wh->i_addr2, sa);
126 IEEE80211_ADDR_COPY(wh->i_addr3, bssid);
127 }
128 *(u_int16_t *)&wh->i_dur[0] = 0;
129 /* NB: use non-QoS tid */
130 *(u_int16_t *)&wh->i_seq[0] =
35
36#include "opt_inet.h"
37
38#include <sys/param.h>
39#include <sys/systm.h>
40#include <sys/mbuf.h>
41#include <sys/kernel.h>
42#include <sys/endian.h>

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

123 wh->i_fc[1] = IEEE80211_FC1_DIR_NODS;
124 IEEE80211_ADDR_COPY(wh->i_addr1, da);
125 IEEE80211_ADDR_COPY(wh->i_addr2, sa);
126 IEEE80211_ADDR_COPY(wh->i_addr3, bssid);
127 }
128 *(u_int16_t *)&wh->i_dur[0] = 0;
129 /* NB: use non-QoS tid */
130 *(u_int16_t *)&wh->i_seq[0] =
131 htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT);
132 ni->ni_txseqs[0]++;
131 htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);
132 ni->ni_txseqs[IEEE80211_NONQOS_TID]++;
133#undef WH4
134}
135
136/*
137 * Send a management frame to the specified node. The node pointer
138 * must have a reference as the pointer will be passed to the driver
139 * and potentially held for a long time. If the frame is successfully
140 * dispatched to the driver, then it is responsible for freeing the

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

735 qwh->i_qos[1] = 0;
736 qwh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS;
737
738 *(u_int16_t *)wh->i_seq =
739 htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT);
740 ni->ni_txseqs[tid]++;
741 } else {
742 *(u_int16_t *)wh->i_seq =
133#undef WH4
134}
135
136/*
137 * Send a management frame to the specified node. The node pointer
138 * must have a reference as the pointer will be passed to the driver
139 * and potentially held for a long time. If the frame is successfully
140 * dispatched to the driver, then it is responsible for freeing the

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

735 qwh->i_qos[1] = 0;
736 qwh->i_fc[0] |= IEEE80211_FC0_SUBTYPE_QOS;
737
738 *(u_int16_t *)wh->i_seq =
739 htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT);
740 ni->ni_txseqs[tid]++;
741 } else {
742 *(u_int16_t *)wh->i_seq =
743 htole16(ni->ni_txseqs[0] << IEEE80211_SEQ_SEQ_SHIFT);
744 ni->ni_txseqs[0]++;
743 htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT);
744 ni->ni_txseqs[IEEE80211_NONQOS_TID]++;
745 }
746 if (key != NULL) {
747 /*
748 * IEEE 802.1X: send EAPOL frames always in the clear.
749 * WPA/WPA2: encrypt EAPOL keys when pairwise keys are set.
750 */
751 if (eh.ether_type != htons(ETHERTYPE_PAE) ||
752 ((ic->ic_flags & IEEE80211_F_WPA) &&

--- 1090 unchanged lines hidden ---
745 }
746 if (key != NULL) {
747 /*
748 * IEEE 802.1X: send EAPOL frames always in the clear.
749 * WPA/WPA2: encrypt EAPOL keys when pairwise keys are set.
750 */
751 if (eh.ether_type != htons(ETHERTYPE_PAE) ||
752 ((ic->ic_flags & IEEE80211_F_WPA) &&

--- 1090 unchanged lines hidden ---