Deleted Added
full compact
ieee80211_ioctl.h (232244) ieee80211_ioctl.h (234018)
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:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 *
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:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
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 * $FreeBSD: head/sys/net80211/ieee80211_ioctl.h 232244 2012-02-28 04:05:35Z adrian $
26 * $FreeBSD: head/sys/net80211/ieee80211_ioctl.h 234018 2012-04-08 04:51:25Z adrian $
27 */
28#ifndef _NET80211_IEEE80211_IOCTL_H_
29#define _NET80211_IEEE80211_IOCTL_H_
30
31/*
32 * IEEE 802.11 ioctls.
33 */
34#include <net80211/_ieee80211.h>
35#include <net80211/ieee80211.h>
36#include <net80211/ieee80211_crypto.h>
37
38/*
39 * Per/node (station) statistics.
40 */
41struct ieee80211_nodestats {
42 uint32_t ns_rx_data; /* rx data frames */
43 uint32_t ns_rx_mgmt; /* rx management frames */
44 uint32_t ns_rx_ctrl; /* rx control frames */
45 uint32_t ns_rx_ucast; /* rx unicast frames */
46 uint32_t ns_rx_mcast; /* rx multi/broadcast frames */
47 uint64_t ns_rx_bytes; /* rx data count (bytes) */
48 uint64_t ns_rx_beacons; /* rx beacon frames */
49 uint32_t ns_rx_proberesp; /* rx probe response frames */
50
51 uint32_t ns_rx_dup; /* rx discard 'cuz dup */
52 uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */
53 uint32_t ns_rx_wepfail; /* rx wep processing failed */
54 uint32_t ns_rx_demicfail; /* rx demic failed */
55 uint32_t ns_rx_decap; /* rx decapsulation failed */
56 uint32_t ns_rx_defrag; /* rx defragmentation failed */
57 uint32_t ns_rx_disassoc; /* rx disassociation */
58 uint32_t ns_rx_deauth; /* rx deauthentication */
59 uint32_t ns_rx_action; /* rx action */
60 uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */
61 uint32_t ns_rx_unauth; /* rx on unauthorized port */
62 uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */
63 uint32_t ns_rx_drop; /* rx discard other reason */
64
65 uint32_t ns_tx_data; /* tx data frames */
66 uint32_t ns_tx_mgmt; /* tx management frames */
67 uint32_t ns_tx_ctrl; /* tx control frames */
68 uint32_t ns_tx_ucast; /* tx unicast frames */
69 uint32_t ns_tx_mcast; /* tx multi/broadcast frames */
70 uint64_t ns_tx_bytes; /* tx data count (bytes) */
71 uint32_t ns_tx_probereq; /* tx probe request frames */
72
73 uint32_t ns_tx_novlantag; /* tx discard 'cuz no tag */
74 uint32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */
75
76 uint32_t ns_ps_discard; /* ps discard 'cuz of age */
77
78 /* MIB-related state */
79 uint32_t ns_tx_assoc; /* [re]associations */
80 uint32_t ns_tx_assoc_fail; /* [re]association failures */
81 uint32_t ns_tx_auth; /* [re]authentications */
82 uint32_t ns_tx_auth_fail; /* [re]authentication failures*/
83 uint32_t ns_tx_deauth; /* deauthentications */
84 uint32_t ns_tx_deauth_code; /* last deauth reason */
85 uint32_t ns_tx_disassoc; /* disassociations */
86 uint32_t ns_tx_disassoc_code; /* last disassociation reason */
87 uint32_t ns_spare[8];
88};
89
90/*
91 * Summary statistics.
92 */
93struct ieee80211_stats {
94 uint32_t is_rx_badversion; /* rx frame with bad version */
95 uint32_t is_rx_tooshort; /* rx frame too short */
96 uint32_t is_rx_wrongbss; /* rx from wrong bssid */
97 uint32_t is_rx_dup; /* rx discard 'cuz dup */
98 uint32_t is_rx_wrongdir; /* rx w/ wrong direction */
99 uint32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
100 uint32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
101 uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */
102 uint32_t is_rx_unencrypted; /* rx w/o wep and privacy on */
103 uint32_t is_rx_wepfail; /* rx wep processing failed */
104 uint32_t is_rx_decap; /* rx decapsulation failed */
105 uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */
106 uint32_t is_rx_ctl; /* rx ctrl frames */
107 uint32_t is_rx_beacon; /* rx beacon frames */
108 uint32_t is_rx_rstoobig; /* rx rate set truncated */
109 uint32_t is_rx_elem_missing; /* rx required element missing*/
110 uint32_t is_rx_elem_toobig; /* rx element too big */
111 uint32_t is_rx_elem_toosmall; /* rx element too small */
112 uint32_t is_rx_elem_unknown; /* rx element unknown */
113 uint32_t is_rx_badchan; /* rx frame w/ invalid chan */
114 uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */
115 uint32_t is_rx_nodealloc; /* rx frame dropped */
116 uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
117 uint32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
118 uint32_t is_rx_auth_fail; /* rx sta auth failure */
119 uint32_t is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */
120 uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
121 uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
122 uint32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
123 uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
124 uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */
125 uint32_t is_rx_deauth; /* rx deauthentication */
126 uint32_t is_rx_disassoc; /* rx disassociation */
127 uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/
128 uint32_t is_rx_nobuf; /* rx failed for lack of buf */
129 uint32_t is_rx_decryptcrc; /* rx decrypt failed on crc */
130 uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/
131 uint32_t is_rx_bad_auth; /* rx bad auth request */
132 uint32_t is_rx_unauth; /* rx on unauthorized port */
133 uint32_t is_rx_badkeyid; /* rx w/ incorrect keyid */
134 uint32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */
135 uint32_t is_rx_ccmpformat; /* rx format bad (CCMP) */
136 uint32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */
137 uint32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */
138 uint32_t is_rx_tkipformat; /* rx format bad (TKIP) */
139 uint32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */
140 uint32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */
141 uint32_t is_rx_badcipher; /* rx failed 'cuz key type */
142 uint32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */
143 uint32_t is_rx_acl; /* rx discard 'cuz acl policy */
144 uint32_t is_tx_nobuf; /* tx failed for lack of buf */
145 uint32_t is_tx_nonode; /* tx failed for no node */
146 uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
147 uint32_t is_tx_badcipher; /* tx failed 'cuz key type */
148 uint32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */
149 uint32_t is_tx_noheadroom; /* tx failed 'cuz no space */
150 uint32_t is_tx_fragframes; /* tx frames fragmented */
151 uint32_t is_tx_frags; /* tx fragments created */
152 uint32_t is_scan_active; /* active scans started */
153 uint32_t is_scan_passive; /* passive scans started */
154 uint32_t is_node_timeout; /* nodes timed out inactivity */
155 uint32_t is_crypto_nomem; /* no memory for crypto ctx */
156 uint32_t is_crypto_tkip; /* tkip crypto done in s/w */
157 uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */
158 uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */
159 uint32_t is_crypto_tkipcm; /* tkip counter measures */
160 uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */
161 uint32_t is_crypto_wep; /* wep crypto done in s/w */
162 uint32_t is_crypto_setkey_cipher;/* cipher rejected key */
163 uint32_t is_crypto_setkey_nokey; /* no key index for setkey */
164 uint32_t is_crypto_delkey; /* driver key delete failed */
165 uint32_t is_crypto_badcipher; /* unknown cipher */
166 uint32_t is_crypto_nocipher; /* cipher not available */
167 uint32_t is_crypto_attachfail; /* cipher attach failed */
168 uint32_t is_crypto_swfallback; /* cipher fallback to s/w */
169 uint32_t is_crypto_keyfail; /* driver key alloc failed */
170 uint32_t is_crypto_enmicfail; /* en-MIC failed */
171 uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */
172 uint32_t is_ibss_norate; /* merge failed-rate mismatch */
173 uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */
174 uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */
175 uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */
176 uint32_t is_ff_badhdr; /* fast frame rx'd w/ bad hdr */
177 uint32_t is_ff_tooshort; /* fast frame rx decap error */
178 uint32_t is_ff_split; /* fast frame rx split error */
179 uint32_t is_ff_decap; /* fast frames decap'd */
180 uint32_t is_ff_encap; /* fast frames encap'd for tx */
181 uint32_t is_rx_badbintval; /* rx frame w/ bogus bintval */
182 uint32_t is_rx_demicfail; /* rx demic failed */
183 uint32_t is_rx_defrag; /* rx defragmentation failed */
184 uint32_t is_rx_mgmt; /* rx management frames */
185 uint32_t is_rx_action; /* rx action mgt frames */
186 uint32_t is_amsdu_tooshort; /* A-MSDU rx decap error */
187 uint32_t is_amsdu_split; /* A-MSDU rx split error */
188 uint32_t is_amsdu_decap; /* A-MSDU decap'd */
189 uint32_t is_amsdu_encap; /* A-MSDU encap'd for tx */
190 uint32_t is_ampdu_bar_bad; /* A-MPDU BAR out of window */
191 uint32_t is_ampdu_bar_oow; /* A-MPDU BAR before ADDBA */
192 uint32_t is_ampdu_bar_move; /* A-MPDU BAR moved window */
193 uint32_t is_ampdu_bar_rx; /* A-MPDU BAR frames handled */
194 uint32_t is_ampdu_rx_flush; /* A-MPDU frames flushed */
195 uint32_t is_ampdu_rx_oor; /* A-MPDU frames out-of-order */
196 uint32_t is_ampdu_rx_copy; /* A-MPDU frames copied down */
197 uint32_t is_ampdu_rx_drop; /* A-MPDU frames dropped */
198 uint32_t is_tx_badstate; /* tx discard state != RUN */
199 uint32_t is_tx_notassoc; /* tx failed, sta not assoc */
200 uint32_t is_tx_classify; /* tx classification failed */
201 uint32_t is_dwds_mcast; /* discard mcast over dwds */
202 uint32_t is_dwds_qdrop; /* dwds pending frame q full */
203 uint32_t is_ht_assoc_nohtcap; /* non-HT sta rejected */
204 uint32_t is_ht_assoc_downgrade; /* HT sta forced to legacy */
205 uint32_t is_ht_assoc_norate; /* HT assoc w/ rate mismatch */
206 uint32_t is_ampdu_rx_age; /* A-MPDU sent up 'cuz of age */
207 uint32_t is_ampdu_rx_move; /* A-MPDU MSDU moved window */
208 uint32_t is_addba_reject; /* ADDBA reject 'cuz disabled */
209 uint32_t is_addba_norequest; /* ADDBA response w/o ADDBA */
210 uint32_t is_addba_badtoken; /* ADDBA response w/ wrong
211 dialogtoken */
212 uint32_t is_addba_badpolicy; /* ADDBA resp w/ wrong policy */
213 uint32_t is_ampdu_stop; /* A-MPDU stream stopped */
214 uint32_t is_ampdu_stop_failed; /* A-MPDU stream not running */
215 uint32_t is_ampdu_rx_reorder; /* A-MPDU held for rx reorder */
216 uint32_t is_scan_bg; /* background scans started */
217 uint8_t is_rx_deauth_code; /* last rx'd deauth reason */
218 uint8_t is_rx_disassoc_code; /* last rx'd disassoc reason */
219 uint8_t is_rx_authfail_code; /* last rx'd auth fail reason */
220 uint32_t is_beacon_miss; /* beacon miss notification */
221 uint32_t is_rx_badstate; /* rx discard state != RUN */
222 uint32_t is_ff_flush; /* ff's flush'd from stageq */
223 uint32_t is_tx_ctl; /* tx ctrl frames */
224 uint32_t is_ampdu_rexmt; /* A-MPDU frames rexmt ok */
225 uint32_t is_ampdu_rexmt_fail; /* A-MPDU frames rexmt fail */
226
227 uint32_t is_mesh_wrongmesh; /* dropped 'cuz not mesh sta*/
228 uint32_t is_mesh_nolink; /* dropped 'cuz link not estab*/
229 uint32_t is_mesh_fwd_ttl; /* mesh not fwd'd 'cuz ttl 0 */
230 uint32_t is_mesh_fwd_nobuf; /* mesh not fwd'd 'cuz no mbuf*/
231 uint32_t is_mesh_fwd_tooshort; /* mesh not fwd'd 'cuz no hdr */
232 uint32_t is_mesh_fwd_disabled; /* mesh not fwd'd 'cuz disabled */
233 uint32_t is_mesh_fwd_nopath; /* mesh not fwd'd 'cuz path unknown */
234
235 uint32_t is_hwmp_wrongseq; /* wrong hwmp seq no. */
236 uint32_t is_hwmp_rootreqs; /* root PREQs sent */
237 uint32_t is_hwmp_rootrann; /* root RANNs sent */
238
239 uint32_t is_mesh_badae; /* dropped 'cuz invalid AE */
240 uint32_t is_mesh_rtaddfailed; /* route add failed */
241 uint32_t is_mesh_notproxy; /* dropped 'cuz not proxying */
242 uint32_t is_rx_badalign; /* dropped 'cuz misaligned */
243 uint32_t is_hwmp_proxy; /* PREP for proxy route */
244 uint32_t is_beacon_bad; /* Number of bad beacons */
27 */
28#ifndef _NET80211_IEEE80211_IOCTL_H_
29#define _NET80211_IEEE80211_IOCTL_H_
30
31/*
32 * IEEE 802.11 ioctls.
33 */
34#include <net80211/_ieee80211.h>
35#include <net80211/ieee80211.h>
36#include <net80211/ieee80211_crypto.h>
37
38/*
39 * Per/node (station) statistics.
40 */
41struct ieee80211_nodestats {
42 uint32_t ns_rx_data; /* rx data frames */
43 uint32_t ns_rx_mgmt; /* rx management frames */
44 uint32_t ns_rx_ctrl; /* rx control frames */
45 uint32_t ns_rx_ucast; /* rx unicast frames */
46 uint32_t ns_rx_mcast; /* rx multi/broadcast frames */
47 uint64_t ns_rx_bytes; /* rx data count (bytes) */
48 uint64_t ns_rx_beacons; /* rx beacon frames */
49 uint32_t ns_rx_proberesp; /* rx probe response frames */
50
51 uint32_t ns_rx_dup; /* rx discard 'cuz dup */
52 uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */
53 uint32_t ns_rx_wepfail; /* rx wep processing failed */
54 uint32_t ns_rx_demicfail; /* rx demic failed */
55 uint32_t ns_rx_decap; /* rx decapsulation failed */
56 uint32_t ns_rx_defrag; /* rx defragmentation failed */
57 uint32_t ns_rx_disassoc; /* rx disassociation */
58 uint32_t ns_rx_deauth; /* rx deauthentication */
59 uint32_t ns_rx_action; /* rx action */
60 uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */
61 uint32_t ns_rx_unauth; /* rx on unauthorized port */
62 uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */
63 uint32_t ns_rx_drop; /* rx discard other reason */
64
65 uint32_t ns_tx_data; /* tx data frames */
66 uint32_t ns_tx_mgmt; /* tx management frames */
67 uint32_t ns_tx_ctrl; /* tx control frames */
68 uint32_t ns_tx_ucast; /* tx unicast frames */
69 uint32_t ns_tx_mcast; /* tx multi/broadcast frames */
70 uint64_t ns_tx_bytes; /* tx data count (bytes) */
71 uint32_t ns_tx_probereq; /* tx probe request frames */
72
73 uint32_t ns_tx_novlantag; /* tx discard 'cuz no tag */
74 uint32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */
75
76 uint32_t ns_ps_discard; /* ps discard 'cuz of age */
77
78 /* MIB-related state */
79 uint32_t ns_tx_assoc; /* [re]associations */
80 uint32_t ns_tx_assoc_fail; /* [re]association failures */
81 uint32_t ns_tx_auth; /* [re]authentications */
82 uint32_t ns_tx_auth_fail; /* [re]authentication failures*/
83 uint32_t ns_tx_deauth; /* deauthentications */
84 uint32_t ns_tx_deauth_code; /* last deauth reason */
85 uint32_t ns_tx_disassoc; /* disassociations */
86 uint32_t ns_tx_disassoc_code; /* last disassociation reason */
87 uint32_t ns_spare[8];
88};
89
90/*
91 * Summary statistics.
92 */
93struct ieee80211_stats {
94 uint32_t is_rx_badversion; /* rx frame with bad version */
95 uint32_t is_rx_tooshort; /* rx frame too short */
96 uint32_t is_rx_wrongbss; /* rx from wrong bssid */
97 uint32_t is_rx_dup; /* rx discard 'cuz dup */
98 uint32_t is_rx_wrongdir; /* rx w/ wrong direction */
99 uint32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */
100 uint32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */
101 uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */
102 uint32_t is_rx_unencrypted; /* rx w/o wep and privacy on */
103 uint32_t is_rx_wepfail; /* rx wep processing failed */
104 uint32_t is_rx_decap; /* rx decapsulation failed */
105 uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */
106 uint32_t is_rx_ctl; /* rx ctrl frames */
107 uint32_t is_rx_beacon; /* rx beacon frames */
108 uint32_t is_rx_rstoobig; /* rx rate set truncated */
109 uint32_t is_rx_elem_missing; /* rx required element missing*/
110 uint32_t is_rx_elem_toobig; /* rx element too big */
111 uint32_t is_rx_elem_toosmall; /* rx element too small */
112 uint32_t is_rx_elem_unknown; /* rx element unknown */
113 uint32_t is_rx_badchan; /* rx frame w/ invalid chan */
114 uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */
115 uint32_t is_rx_nodealloc; /* rx frame dropped */
116 uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */
117 uint32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */
118 uint32_t is_rx_auth_fail; /* rx sta auth failure */
119 uint32_t is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */
120 uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */
121 uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */
122 uint32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */
123 uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */
124 uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */
125 uint32_t is_rx_deauth; /* rx deauthentication */
126 uint32_t is_rx_disassoc; /* rx disassociation */
127 uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/
128 uint32_t is_rx_nobuf; /* rx failed for lack of buf */
129 uint32_t is_rx_decryptcrc; /* rx decrypt failed on crc */
130 uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/
131 uint32_t is_rx_bad_auth; /* rx bad auth request */
132 uint32_t is_rx_unauth; /* rx on unauthorized port */
133 uint32_t is_rx_badkeyid; /* rx w/ incorrect keyid */
134 uint32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */
135 uint32_t is_rx_ccmpformat; /* rx format bad (CCMP) */
136 uint32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */
137 uint32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */
138 uint32_t is_rx_tkipformat; /* rx format bad (TKIP) */
139 uint32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */
140 uint32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */
141 uint32_t is_rx_badcipher; /* rx failed 'cuz key type */
142 uint32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */
143 uint32_t is_rx_acl; /* rx discard 'cuz acl policy */
144 uint32_t is_tx_nobuf; /* tx failed for lack of buf */
145 uint32_t is_tx_nonode; /* tx failed for no node */
146 uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */
147 uint32_t is_tx_badcipher; /* tx failed 'cuz key type */
148 uint32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */
149 uint32_t is_tx_noheadroom; /* tx failed 'cuz no space */
150 uint32_t is_tx_fragframes; /* tx frames fragmented */
151 uint32_t is_tx_frags; /* tx fragments created */
152 uint32_t is_scan_active; /* active scans started */
153 uint32_t is_scan_passive; /* passive scans started */
154 uint32_t is_node_timeout; /* nodes timed out inactivity */
155 uint32_t is_crypto_nomem; /* no memory for crypto ctx */
156 uint32_t is_crypto_tkip; /* tkip crypto done in s/w */
157 uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */
158 uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */
159 uint32_t is_crypto_tkipcm; /* tkip counter measures */
160 uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */
161 uint32_t is_crypto_wep; /* wep crypto done in s/w */
162 uint32_t is_crypto_setkey_cipher;/* cipher rejected key */
163 uint32_t is_crypto_setkey_nokey; /* no key index for setkey */
164 uint32_t is_crypto_delkey; /* driver key delete failed */
165 uint32_t is_crypto_badcipher; /* unknown cipher */
166 uint32_t is_crypto_nocipher; /* cipher not available */
167 uint32_t is_crypto_attachfail; /* cipher attach failed */
168 uint32_t is_crypto_swfallback; /* cipher fallback to s/w */
169 uint32_t is_crypto_keyfail; /* driver key alloc failed */
170 uint32_t is_crypto_enmicfail; /* en-MIC failed */
171 uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */
172 uint32_t is_ibss_norate; /* merge failed-rate mismatch */
173 uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */
174 uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */
175 uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */
176 uint32_t is_ff_badhdr; /* fast frame rx'd w/ bad hdr */
177 uint32_t is_ff_tooshort; /* fast frame rx decap error */
178 uint32_t is_ff_split; /* fast frame rx split error */
179 uint32_t is_ff_decap; /* fast frames decap'd */
180 uint32_t is_ff_encap; /* fast frames encap'd for tx */
181 uint32_t is_rx_badbintval; /* rx frame w/ bogus bintval */
182 uint32_t is_rx_demicfail; /* rx demic failed */
183 uint32_t is_rx_defrag; /* rx defragmentation failed */
184 uint32_t is_rx_mgmt; /* rx management frames */
185 uint32_t is_rx_action; /* rx action mgt frames */
186 uint32_t is_amsdu_tooshort; /* A-MSDU rx decap error */
187 uint32_t is_amsdu_split; /* A-MSDU rx split error */
188 uint32_t is_amsdu_decap; /* A-MSDU decap'd */
189 uint32_t is_amsdu_encap; /* A-MSDU encap'd for tx */
190 uint32_t is_ampdu_bar_bad; /* A-MPDU BAR out of window */
191 uint32_t is_ampdu_bar_oow; /* A-MPDU BAR before ADDBA */
192 uint32_t is_ampdu_bar_move; /* A-MPDU BAR moved window */
193 uint32_t is_ampdu_bar_rx; /* A-MPDU BAR frames handled */
194 uint32_t is_ampdu_rx_flush; /* A-MPDU frames flushed */
195 uint32_t is_ampdu_rx_oor; /* A-MPDU frames out-of-order */
196 uint32_t is_ampdu_rx_copy; /* A-MPDU frames copied down */
197 uint32_t is_ampdu_rx_drop; /* A-MPDU frames dropped */
198 uint32_t is_tx_badstate; /* tx discard state != RUN */
199 uint32_t is_tx_notassoc; /* tx failed, sta not assoc */
200 uint32_t is_tx_classify; /* tx classification failed */
201 uint32_t is_dwds_mcast; /* discard mcast over dwds */
202 uint32_t is_dwds_qdrop; /* dwds pending frame q full */
203 uint32_t is_ht_assoc_nohtcap; /* non-HT sta rejected */
204 uint32_t is_ht_assoc_downgrade; /* HT sta forced to legacy */
205 uint32_t is_ht_assoc_norate; /* HT assoc w/ rate mismatch */
206 uint32_t is_ampdu_rx_age; /* A-MPDU sent up 'cuz of age */
207 uint32_t is_ampdu_rx_move; /* A-MPDU MSDU moved window */
208 uint32_t is_addba_reject; /* ADDBA reject 'cuz disabled */
209 uint32_t is_addba_norequest; /* ADDBA response w/o ADDBA */
210 uint32_t is_addba_badtoken; /* ADDBA response w/ wrong
211 dialogtoken */
212 uint32_t is_addba_badpolicy; /* ADDBA resp w/ wrong policy */
213 uint32_t is_ampdu_stop; /* A-MPDU stream stopped */
214 uint32_t is_ampdu_stop_failed; /* A-MPDU stream not running */
215 uint32_t is_ampdu_rx_reorder; /* A-MPDU held for rx reorder */
216 uint32_t is_scan_bg; /* background scans started */
217 uint8_t is_rx_deauth_code; /* last rx'd deauth reason */
218 uint8_t is_rx_disassoc_code; /* last rx'd disassoc reason */
219 uint8_t is_rx_authfail_code; /* last rx'd auth fail reason */
220 uint32_t is_beacon_miss; /* beacon miss notification */
221 uint32_t is_rx_badstate; /* rx discard state != RUN */
222 uint32_t is_ff_flush; /* ff's flush'd from stageq */
223 uint32_t is_tx_ctl; /* tx ctrl frames */
224 uint32_t is_ampdu_rexmt; /* A-MPDU frames rexmt ok */
225 uint32_t is_ampdu_rexmt_fail; /* A-MPDU frames rexmt fail */
226
227 uint32_t is_mesh_wrongmesh; /* dropped 'cuz not mesh sta*/
228 uint32_t is_mesh_nolink; /* dropped 'cuz link not estab*/
229 uint32_t is_mesh_fwd_ttl; /* mesh not fwd'd 'cuz ttl 0 */
230 uint32_t is_mesh_fwd_nobuf; /* mesh not fwd'd 'cuz no mbuf*/
231 uint32_t is_mesh_fwd_tooshort; /* mesh not fwd'd 'cuz no hdr */
232 uint32_t is_mesh_fwd_disabled; /* mesh not fwd'd 'cuz disabled */
233 uint32_t is_mesh_fwd_nopath; /* mesh not fwd'd 'cuz path unknown */
234
235 uint32_t is_hwmp_wrongseq; /* wrong hwmp seq no. */
236 uint32_t is_hwmp_rootreqs; /* root PREQs sent */
237 uint32_t is_hwmp_rootrann; /* root RANNs sent */
238
239 uint32_t is_mesh_badae; /* dropped 'cuz invalid AE */
240 uint32_t is_mesh_rtaddfailed; /* route add failed */
241 uint32_t is_mesh_notproxy; /* dropped 'cuz not proxying */
242 uint32_t is_rx_badalign; /* dropped 'cuz misaligned */
243 uint32_t is_hwmp_proxy; /* PREP for proxy route */
244 uint32_t is_beacon_bad; /* Number of bad beacons */
245
246 uint32_t is_spare[10];
245 uint32_t is_ampdu_bar_tx; /* A-MPDU BAR frames TXed */
246 uint32_t is_ampdu_bar_tx_retry; /* A-MPDU BAR frames TX rtry */
247 uint32_t is_ampdu_bar_tx_fail; /* A-MPDU BAR frames TX fail */
248
249 uint32_t is_spare[7];
247};
248
249/*
250 * Max size of optional information elements. We artificially
251 * constrain this; it's limited only by the max frame size (and
252 * the max parameter size of the wireless extensions).
253 */
254#define IEEE80211_MAX_OPT_IE 256
255
256/*
257 * WPA/RSN get/set key request. Specify the key/cipher
258 * type and whether the key is to be used for sending and/or
259 * receiving. The key index should be set only when working
260 * with global keys (use IEEE80211_KEYIX_NONE for ``no index'').
261 * Otherwise a unicast/pairwise key is specified by the bssid
262 * (on a station) or mac address (on an ap). They key length
263 * must include any MIC key data; otherwise it should be no
264 * more than IEEE80211_KEYBUF_SIZE.
265 */
266struct ieee80211req_key {
267 uint8_t ik_type; /* key/cipher type */
268 uint8_t ik_pad;
269 uint16_t ik_keyix; /* key index */
270 uint8_t ik_keylen; /* key length in bytes */
271 uint8_t ik_flags;
272/* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */
273#define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */
274 uint8_t ik_macaddr[IEEE80211_ADDR_LEN];
275 uint64_t ik_keyrsc; /* key receive sequence counter */
276 uint64_t ik_keytsc; /* key transmit sequence counter */
277 uint8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
278};
279
280/*
281 * Delete a key either by index or address. Set the index
282 * to IEEE80211_KEYIX_NONE when deleting a unicast key.
283 */
284struct ieee80211req_del_key {
285 uint8_t idk_keyix; /* key index */
286 uint8_t idk_macaddr[IEEE80211_ADDR_LEN];
287};
288
289/*
290 * MLME state manipulation request. IEEE80211_MLME_ASSOC
291 * only makes sense when operating as a station. The other
292 * requests can be used when operating as a station or an
293 * ap (to effect a station).
294 */
295struct ieee80211req_mlme {
296 uint8_t im_op; /* operation to perform */
297#define IEEE80211_MLME_ASSOC 1 /* associate station */
298#define IEEE80211_MLME_DISASSOC 2 /* disassociate station */
299#define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */
300#define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */
301#define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */
302#define IEEE80211_MLME_AUTH 6 /* authenticate station */
303 uint8_t im_ssid_len; /* length of optional ssid */
304 uint16_t im_reason; /* 802.11 reason code */
305 uint8_t im_macaddr[IEEE80211_ADDR_LEN];
306 uint8_t im_ssid[IEEE80211_NWID_LEN];
307};
308
309/*
310 * MAC ACL operations.
311 */
312enum {
313 IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */
314 IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */
315 IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */
316 IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */
317 IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */
318 IEEE80211_MACCMD_POLICY = 5, /* get ACL policy */
319 IEEE80211_MACCMD_LIST = 6, /* get ACL database */
320 IEEE80211_MACCMD_POLICY_RADIUS = 7, /* set policy: RADIUS managed */
321};
322
323struct ieee80211req_maclist {
324 uint8_t ml_macaddr[IEEE80211_ADDR_LEN];
325} __packed;
326
327/*
328 * Mesh Routing Table Operations.
329 */
330enum {
331 IEEE80211_MESH_RTCMD_LIST = 0, /* list HWMP routing table */
332 IEEE80211_MESH_RTCMD_FLUSH = 1, /* flush HWMP routing table */
333 IEEE80211_MESH_RTCMD_ADD = 2, /* add entry to the table */
334 IEEE80211_MESH_RTCMD_DELETE = 3, /* delete an entry from the table */
335};
336
337struct ieee80211req_mesh_route {
338 uint8_t imr_flags;
339#define IEEE80211_MESHRT_FLAGS_VALID 0x01
340#define IEEE80211_MESHRT_FLAGS_PROXY 0x02
341 uint8_t imr_dest[IEEE80211_ADDR_LEN];
342 uint8_t imr_nexthop[IEEE80211_ADDR_LEN];
343 uint16_t imr_nhops;
344 uint8_t imr_pad;
345 uint32_t imr_metric;
346 uint32_t imr_lifetime;
347 uint32_t imr_lastmseq;
348};
349
350/*
351 * HWMP root modes
352 */
353enum {
354 IEEE80211_HWMP_ROOTMODE_DISABLED = 0, /* disabled */
355 IEEE80211_HWMP_ROOTMODE_NORMAL = 1, /* normal PREPs */
356 IEEE80211_HWMP_ROOTMODE_PROACTIVE = 2, /* proactive PREPS */
357 IEEE80211_HWMP_ROOTMODE_RANN = 3, /* use RANN elemid */
358};
359
360
361/*
362 * Set the active channel list by IEEE channel #: each channel
363 * to be marked active is set in a bit vector. Note this list is
364 * intersected with the available channel list in calculating
365 * the set of channels actually used in scanning.
366 */
367struct ieee80211req_chanlist {
368 uint8_t ic_channels[32]; /* NB: can be variable length */
369};
370
371/*
372 * Get the active channel list info.
373 */
374struct ieee80211req_chaninfo {
375 u_int ic_nchans;
376 struct ieee80211_channel ic_chans[1]; /* NB: variable length */
377};
378#define IEEE80211_CHANINFO_SIZE(_nchan) \
379 (sizeof(struct ieee80211req_chaninfo) + \
380 (((_nchan)-1) * sizeof(struct ieee80211_channel)))
381#define IEEE80211_CHANINFO_SPACE(_ci) \
382 IEEE80211_CHANINFO_SIZE((_ci)->ic_nchans)
383
384/*
385 * Retrieve the WPA/RSN information element for an associated station.
386 */
387struct ieee80211req_wpaie { /* old version w/ only one ie */
388 uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
389 uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
390};
391struct ieee80211req_wpaie2 {
392 uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
393 uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
394 uint8_t rsn_ie[IEEE80211_MAX_OPT_IE];
395};
396
397/*
398 * Retrieve per-node statistics.
399 */
400struct ieee80211req_sta_stats {
401 union {
402 /* NB: explicitly force 64-bit alignment */
403 uint8_t macaddr[IEEE80211_ADDR_LEN];
404 uint64_t pad;
405 } is_u;
406 struct ieee80211_nodestats is_stats;
407};
408
409/*
410 * Station information block; the mac address is used
411 * to retrieve other data like stats, unicast key, etc.
412 */
413struct ieee80211req_sta_info {
414 uint16_t isi_len; /* total length (mult of 4) */
415 uint16_t isi_ie_off; /* offset to IE data */
416 uint16_t isi_ie_len; /* IE length */
417 uint16_t isi_freq; /* MHz */
418 uint32_t isi_flags; /* channel flags */
419 uint32_t isi_state; /* state flags */
420 uint8_t isi_authmode; /* authentication algorithm */
421 int8_t isi_rssi; /* receive signal strength */
422 int8_t isi_noise; /* noise floor */
423 uint8_t isi_capinfo; /* capabilities */
424 uint8_t isi_erp; /* ERP element */
425 uint8_t isi_macaddr[IEEE80211_ADDR_LEN];
426 uint8_t isi_nrates;
427 /* negotiated rates */
428 uint8_t isi_rates[IEEE80211_RATE_MAXSIZE];
429 uint8_t isi_txrate; /* legacy/IEEE rate or MCS */
430 uint16_t isi_associd; /* assoc response */
431 uint16_t isi_txpower; /* current tx power */
432 uint16_t isi_vlan; /* vlan tag */
433 /* NB: [IEEE80211_NONQOS_TID] holds seq#'s for non-QoS stations */
434 uint16_t isi_txseqs[IEEE80211_TID_SIZE];/* tx seq #/TID */
435 uint16_t isi_rxseqs[IEEE80211_TID_SIZE];/* rx seq#/TID */
436 uint16_t isi_inact; /* inactivity timer */
437 uint16_t isi_txmbps; /* current tx rate in .5 Mb/s */
438 uint16_t isi_pad;
439 uint32_t isi_jointime; /* time of assoc/join */
440 struct ieee80211_mimo_info isi_mimo; /* MIMO info for 11n sta's */
441 /* 11s info */
442 uint16_t isi_peerid;
443 uint16_t isi_localid;
444 uint8_t isi_peerstate;
445 /* XXX frag state? */
446 /* variable length IE data */
447};
448
449/*
450 * Retrieve per-station information; to retrieve all
451 * specify a mac address of ff:ff:ff:ff:ff:ff.
452 */
453struct ieee80211req_sta_req {
454 union {
455 /* NB: explicitly force 64-bit alignment */
456 uint8_t macaddr[IEEE80211_ADDR_LEN];
457 uint64_t pad;
458 } is_u;
459 struct ieee80211req_sta_info info[1]; /* variable length */
460};
461
462/*
463 * Get/set per-station tx power cap.
464 */
465struct ieee80211req_sta_txpow {
466 uint8_t it_macaddr[IEEE80211_ADDR_LEN];
467 uint8_t it_txpow;
468};
469
470/*
471 * WME parameters manipulated with IEEE80211_IOC_WME_CWMIN
472 * through IEEE80211_IOC_WME_ACKPOLICY are set and return
473 * using i_val and i_len. i_val holds the value itself.
474 * i_len specifies the AC and, as appropriate, then high bit
475 * specifies whether the operation is to be applied to the
476 * BSS or ourself.
477 */
478#define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */
479#define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */
480#define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */
481
482/*
483 * Application Information Elements can be appended to a variety
484 * of frames with the IEE80211_IOC_APPIE request. This request
485 * piggybacks on a normal ieee80211req; the frame type is passed
486 * in i_val as the 802.11 FC0 bytes and the length of the IE data
487 * is passed in i_len. The data is referenced in i_data. If i_len
488 * is zero then any previously configured IE data is removed. At
489 * most IEEE80211_MAX_APPIE data be appened. Note that multiple
490 * IE's can be supplied; the data is treated opaquely.
491 */
492#define IEEE80211_MAX_APPIE 1024 /* max app IE data */
493/*
494 * Hack: the WPA authenticator uses this mechanism to specify WPA
495 * ie's that are used instead of the ones normally constructed using
496 * the cipher state setup with separate ioctls. This avoids issues
497 * like the authenticator ordering ie data differently than the
498 * net80211 layer and needing to keep separate state for WPA and RSN.
499 */
500#define IEEE80211_APPIE_WPA \
501 (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_BEACON | \
502 IEEE80211_FC0_SUBTYPE_PROBE_RESP)
503
504/*
505 * Station mode roaming parameters. These are maintained
506 * per band/mode and control the roaming algorithm.
507 */
508struct ieee80211_roamparams_req {
509 struct ieee80211_roamparam params[IEEE80211_MODE_MAX];
510};
511
512/*
513 * Transmit parameters. These can be used to set fixed transmit
514 * rate for each operating mode when operating as client or on a
515 * per-client basis according to the capabilities of the client
516 * (e.g. an 11b client associated to an 11g ap) when operating as
517 * an ap.
518 *
519 * MCS are distinguished from legacy rates by or'ing in 0x80.
520 */
521struct ieee80211_txparams_req {
522 struct ieee80211_txparam params[IEEE80211_MODE_MAX];
523};
524
525/*
526 * Set regulatory domain state with IEEE80211_IOC_REGDOMAIN.
527 * Note this is both the regulatory description and the channel
528 * list. The get request for IEEE80211_IOC_REGDOMAIN returns
529 * only the regdomain info; the channel list is obtained
530 * separately with IEEE80211_IOC_CHANINFO.
531 */
532struct ieee80211_regdomain_req {
533 struct ieee80211_regdomain rd;
534 struct ieee80211req_chaninfo chaninfo;
535};
536#define IEEE80211_REGDOMAIN_SIZE(_nchan) \
537 (sizeof(struct ieee80211_regdomain_req) + \
538 (((_nchan)-1) * sizeof(struct ieee80211_channel)))
539#define IEEE80211_REGDOMAIN_SPACE(_req) \
540 IEEE80211_REGDOMAIN_SIZE((_req)->chaninfo.ic_nchans)
541
542/*
543 * Get driver capabilities. Driver, hardware crypto, and
544 * HT/802.11n capabilities, and a table that describes what
545 * the radio can do.
546 */
547struct ieee80211_devcaps_req {
548 uint32_t dc_drivercaps; /* general driver caps */
549 uint32_t dc_cryptocaps; /* hardware crypto support */
550 uint32_t dc_htcaps; /* HT/802.11n support */
551 struct ieee80211req_chaninfo dc_chaninfo;
552};
553#define IEEE80211_DEVCAPS_SIZE(_nchan) \
554 (sizeof(struct ieee80211_devcaps_req) + \
555 (((_nchan)-1) * sizeof(struct ieee80211_channel)))
556#define IEEE80211_DEVCAPS_SPACE(_dc) \
557 IEEE80211_DEVCAPS_SIZE((_dc)->dc_chaninfo.ic_nchans)
558
559struct ieee80211_chanswitch_req {
560 struct ieee80211_channel csa_chan; /* new channel */
561 int csa_mode; /* CSA mode */
562 int csa_count; /* beacon count to switch */
563};
564
565/*
566 * Get/set per-station vlan tag.
567 */
568struct ieee80211req_sta_vlan {
569 uint8_t sv_macaddr[IEEE80211_ADDR_LEN];
570 uint16_t sv_vlan;
571};
572
573#ifdef __FreeBSD__
574/*
575 * FreeBSD-style ioctls.
576 */
577/* the first member must be matched with struct ifreq */
578struct ieee80211req {
579 char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
580 uint16_t i_type; /* req type */
581 int16_t i_val; /* Index or simple value */
582 uint16_t i_len; /* Index or simple value */
583 void *i_data; /* Extra data */
584};
585#define SIOCS80211 _IOW('i', 234, struct ieee80211req)
586#define SIOCG80211 _IOWR('i', 235, struct ieee80211req)
587#define SIOCG80211STATS _IOWR('i', 236, struct ifreq)
588
589#define IEEE80211_IOC_SSID 1
590#define IEEE80211_IOC_NUMSSIDS 2
591#define IEEE80211_IOC_WEP 3
592#define IEEE80211_WEP_NOSUP -1
593#define IEEE80211_WEP_OFF 0
594#define IEEE80211_WEP_ON 1
595#define IEEE80211_WEP_MIXED 2
596#define IEEE80211_IOC_WEPKEY 4
597#define IEEE80211_IOC_NUMWEPKEYS 5
598#define IEEE80211_IOC_WEPTXKEY 6
599#define IEEE80211_IOC_AUTHMODE 7
600#define IEEE80211_IOC_STATIONNAME 8
601#define IEEE80211_IOC_CHANNEL 9
602#define IEEE80211_IOC_POWERSAVE 10
603#define IEEE80211_POWERSAVE_NOSUP -1
604#define IEEE80211_POWERSAVE_OFF 0
605#define IEEE80211_POWERSAVE_CAM 1
606#define IEEE80211_POWERSAVE_PSP 2
607#define IEEE80211_POWERSAVE_PSP_CAM 3
608#define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM
609#define IEEE80211_IOC_POWERSAVESLEEP 11
610#define IEEE80211_IOC_RTSTHRESHOLD 12
611#define IEEE80211_IOC_PROTMODE 13
612#define IEEE80211_PROTMODE_OFF 0
613#define IEEE80211_PROTMODE_CTS 1
614#define IEEE80211_PROTMODE_RTSCTS 2
615#define IEEE80211_IOC_TXPOWER 14 /* global tx power limit */
616#define IEEE80211_IOC_BSSID 15
617#define IEEE80211_IOC_ROAMING 16 /* roaming mode */
618#define IEEE80211_IOC_PRIVACY 17 /* privacy invoked */
619#define IEEE80211_IOC_DROPUNENCRYPTED 18 /* discard unencrypted frames */
620#define IEEE80211_IOC_WPAKEY 19
621#define IEEE80211_IOC_DELKEY 20
622#define IEEE80211_IOC_MLME 21
623/* 22 was IEEE80211_IOC_OPTIE, replaced by IEEE80211_IOC_APPIE */
624/* 23 was IEEE80211_IOC_SCAN_REQ */
625/* 24 was IEEE80211_IOC_SCAN_RESULTS */
626#define IEEE80211_IOC_COUNTERMEASURES 25 /* WPA/TKIP countermeasures */
627#define IEEE80211_IOC_WPA 26 /* WPA mode (0,1,2) */
628#define IEEE80211_IOC_CHANLIST 27 /* channel list */
629#define IEEE80211_IOC_WME 28 /* WME mode (on, off) */
630#define IEEE80211_IOC_HIDESSID 29 /* hide SSID mode (on, off) */
631#define IEEE80211_IOC_APBRIDGE 30 /* AP inter-sta bridging */
632/* 31-35,37-38 were for WPA authenticator settings */
633/* 36 was IEEE80211_IOC_DRIVER_CAPS */
634#define IEEE80211_IOC_WPAIE 39 /* WPA information element */
635#define IEEE80211_IOC_STA_STATS 40 /* per-station statistics */
636#define IEEE80211_IOC_MACCMD 41 /* MAC ACL operation */
637#define IEEE80211_IOC_CHANINFO 42 /* channel info list */
638#define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */
639#define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */
640/* 45 was IEEE80211_IOC_STA_INFO */
641#define IEEE80211_IOC_WME_CWMIN 46 /* WME: ECWmin */
642#define IEEE80211_IOC_WME_CWMAX 47 /* WME: ECWmax */
643#define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFSN */
644#define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */
645#define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */
646#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/
647#define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */
648#define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */
649#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
650#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
651#define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
652#define IEEE80211_IOC_FF 57 /* ATH fast frames (on, off) */
653#define IEEE80211_IOC_TURBOP 58 /* ATH turbo' (on, off) */
654#define IEEE80211_IOC_BGSCAN 59 /* bg scanning (on, off) */
655#define IEEE80211_IOC_BGSCAN_IDLE 60 /* bg scan idle threshold */
656#define IEEE80211_IOC_BGSCAN_INTERVAL 61 /* bg scan interval */
657#define IEEE80211_IOC_SCANVALID 65 /* scan cache valid threshold */
658/* 66-72 were IEEE80211_IOC_ROAM_* and IEEE80211_IOC_MCAST_RATE */
659#define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
660#define IEEE80211_IOC_BURST 75 /* packet bursting */
661#define IEEE80211_IOC_SCAN_RESULTS 76 /* get scan results */
662#define IEEE80211_IOC_BMISSTHRESHOLD 77 /* beacon miss threshold */
663#define IEEE80211_IOC_STA_INFO 78 /* station/neighbor info */
664#define IEEE80211_IOC_WPAIE2 79 /* WPA+RSN info elements */
665#define IEEE80211_IOC_CURCHAN 80 /* current channel */
666#define IEEE80211_IOC_SHORTGI 81 /* 802.11n half GI */
667#define IEEE80211_IOC_AMPDU 82 /* 802.11n A-MPDU (on, off) */
668#define IEEE80211_IOC_AMPDU_LIMIT 83 /* A-MPDU length limit */
669#define IEEE80211_IOC_AMPDU_DENSITY 84 /* A-MPDU density */
670#define IEEE80211_IOC_AMSDU 85 /* 802.11n A-MSDU (on, off) */
671#define IEEE80211_IOC_AMSDU_LIMIT 86 /* A-MSDU length limit */
672#define IEEE80211_IOC_PUREN 87 /* pure 11n (no legacy sta's) */
673#define IEEE80211_IOC_DOTH 88 /* 802.11h (on, off) */
674/* 89-91 were regulatory items */
675#define IEEE80211_IOC_HTCOMPAT 92 /* support pre-D1.10 HT ie's */
676#define IEEE80211_IOC_DWDS 93 /* DWDS/4-address handling */
677#define IEEE80211_IOC_INACTIVITY 94 /* sta inactivity handling */
678#define IEEE80211_IOC_APPIE 95 /* application IE's */
679#define IEEE80211_IOC_WPS 96 /* WPS operation */
680#define IEEE80211_IOC_TSN 97 /* TSN operation */
681#define IEEE80211_IOC_DEVCAPS 98 /* driver+device capabilities */
682#define IEEE80211_IOC_CHANSWITCH 99 /* start 11h channel switch */
683#define IEEE80211_IOC_DFS 100 /* DFS (on, off) */
684#define IEEE80211_IOC_DOTD 101 /* 802.11d (on, off) */
685#define IEEE80211_IOC_HTPROTMODE 102 /* HT protection (off, rts) */
686#define IEEE80211_IOC_SCAN_REQ 103 /* scan w/ specified params */
687#define IEEE80211_IOC_SCAN_CANCEL 104 /* cancel ongoing scan */
688#define IEEE80211_IOC_HTCONF 105 /* HT config (off, HT20, HT40)*/
689#define IEEE80211_IOC_REGDOMAIN 106 /* regulatory domain info */
690#define IEEE80211_IOC_ROAM 107 /* roaming params en masse */
691#define IEEE80211_IOC_TXPARAMS 108 /* tx parameters */
692#define IEEE80211_IOC_STA_VLAN 109 /* per-station vlan tag */
693#define IEEE80211_IOC_SMPS 110 /* MIMO power save */
694#define IEEE80211_IOC_RIFS 111 /* RIFS config (on, off) */
695#define IEEE80211_IOC_GREENFIELD 112 /* Greenfield (on, off) */
696#define IEEE80211_IOC_STBC 113 /* STBC Tx/RX (on, off) */
697
698#define IEEE80211_IOC_MESH_ID 170 /* mesh identifier */
699#define IEEE80211_IOC_MESH_AP 171 /* accepting peerings */
700#define IEEE80211_IOC_MESH_FWRD 172 /* forward frames */
701#define IEEE80211_IOC_MESH_PROTO 173 /* mesh protocols */
702#define IEEE80211_IOC_MESH_TTL 174 /* mesh TTL */
703#define IEEE80211_IOC_MESH_RTCMD 175 /* mesh routing table commands*/
704#define IEEE80211_IOC_MESH_PR_METRIC 176 /* mesh metric protocol */
705#define IEEE80211_IOC_MESH_PR_PATH 177 /* mesh path protocol */
706#define IEEE80211_IOC_MESH_PR_SIG 178 /* mesh sig protocol */
707#define IEEE80211_IOC_MESH_PR_CC 179 /* mesh congestion protocol */
708#define IEEE80211_IOC_MESH_PR_AUTH 180 /* mesh auth protocol */
709
710#define IEEE80211_IOC_HWMP_ROOTMODE 190 /* HWMP root mode */
711#define IEEE80211_IOC_HWMP_MAXHOPS 191 /* number of hops before drop */
712#define IEEE80211_IOC_HWMP_TTL 192 /* HWMP TTL */
713
714#define IEEE80211_IOC_TDMA_SLOT 201 /* TDMA: assigned slot */
715#define IEEE80211_IOC_TDMA_SLOTCNT 202 /* TDMA: slots in bss */
716#define IEEE80211_IOC_TDMA_SLOTLEN 203 /* TDMA: slot length (usecs) */
717#define IEEE80211_IOC_TDMA_BINTERVAL 204 /* TDMA: beacon intvl (slots) */
718
719#define IEEE80211_IOC_QUIET 205 /* Quiet Enable/Disable */
720#define IEEE80211_IOC_QUIET_PERIOD 206 /* Quiet Period */
721#define IEEE80211_IOC_QUIET_OFFSET 207 /* Quiet Offset */
722#define IEEE80211_IOC_QUIET_DUR 208 /* Quiet Duration */
723#define IEEE80211_IOC_QUIET_COUNT 209 /* Quiet Count */
724/*
725 * Parameters for controlling a scan requested with
726 * IEEE80211_IOC_SCAN_REQ.
727 *
728 * Active scans cause ProbeRequest frames to be issued for each
729 * specified ssid and, by default, a broadcast ProbeRequest frame.
730 * The set of ssid's is specified in the request.
731 *
732 * By default the scan will cause a BSS to be joined (in station/adhoc
733 * mode) or a channel to be selected for operation (hostap mode).
734 * To disable that specify IEEE80211_IOC_SCAN_NOPICK and if the
735 *
736 * If the station is currently associated to an AP then a scan request
737 * will cause the station to leave the current channel and potentially
738 * miss frames from the AP. Alternatively the station may notify the
739 * AP that it is going into power save mode before it leaves the channel.
740 * This ensures frames for the station are buffered by the AP. This is
741 * termed a ``bg scan'' and is requested with the IEEE80211_IOC_SCAN_BGSCAN
742 * flag. Background scans may take longer than foreground scans and may
743 * be preempted by traffic. If a station is not associated to an AP
744 * then a request for a background scan is automatically done in the
745 * foreground.
746 *
747 * The results of the scan request are cached by the system. This
748 * information is aged out and/or invalidated based on events like not
749 * being able to associated to an AP. To flush the current cache
750 * contents before doing a scan the IEEE80211_IOC_SCAN_FLUSH flag may
751 * be specified.
752 *
753 * By default the scan will be done until a suitable AP is located
754 * or a channel is found for use. A scan can also be constrained
755 * to be done once (IEEE80211_IOC_SCAN_ONCE) or to last for no more
756 * than a specified duration.
757 */
758struct ieee80211_scan_req {
759 int sr_flags;
760#define IEEE80211_IOC_SCAN_NOPICK 0x00001 /* scan only, no selection */
761#define IEEE80211_IOC_SCAN_ACTIVE 0x00002 /* active scan (probe req) */
762#define IEEE80211_IOC_SCAN_PICK1ST 0x00004 /* ``hey sailor'' mode */
763#define IEEE80211_IOC_SCAN_BGSCAN 0x00008 /* bg scan, exit ps at end */
764#define IEEE80211_IOC_SCAN_ONCE 0x00010 /* do one complete pass */
765#define IEEE80211_IOC_SCAN_NOBCAST 0x00020 /* don't send bcast probe req */
766#define IEEE80211_IOC_SCAN_NOJOIN 0x00040 /* no auto-sequencing */
767#define IEEE80211_IOC_SCAN_FLUSH 0x10000 /* flush scan cache first */
768#define IEEE80211_IOC_SCAN_CHECK 0x20000 /* check scan cache first */
769 u_int sr_duration; /* duration (ms) */
770#define IEEE80211_IOC_SCAN_DURATION_MIN 1
771#define IEEE80211_IOC_SCAN_DURATION_MAX 0x7fffffff
772#define IEEE80211_IOC_SCAN_FOREVER IEEE80211_IOC_SCAN_DURATION_MAX
773 u_int sr_mindwell; /* min channel dwelltime (ms) */
774 u_int sr_maxdwell; /* max channel dwelltime (ms) */
775 int sr_nssid;
776#define IEEE80211_IOC_SCAN_MAX_SSID 3
777 struct {
778 int len; /* length in bytes */
779 uint8_t ssid[IEEE80211_NWID_LEN]; /* ssid contents */
780 } sr_ssid[IEEE80211_IOC_SCAN_MAX_SSID];
781};
782
783/*
784 * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
785 * Each result is a fixed size structure followed by a variable
786 * length SSID and one or more variable length information elements.
787 * The size of each variable length item is found in the fixed
788 * size structure and the entire length of the record is specified
789 * in isr_len. Result records are rounded to a multiple of 4 bytes.
790 */
791struct ieee80211req_scan_result {
792 uint16_t isr_len; /* total length (mult of 4) */
793 uint16_t isr_ie_off; /* offset to SSID+IE data */
794 uint16_t isr_ie_len; /* IE length */
795 uint16_t isr_freq; /* MHz */
796 uint16_t isr_flags; /* channel flags */
797 int8_t isr_noise;
798 int8_t isr_rssi;
799 uint16_t isr_intval; /* beacon interval */
800 uint8_t isr_capinfo; /* capabilities */
801 uint8_t isr_erp; /* ERP element */
802 uint8_t isr_bssid[IEEE80211_ADDR_LEN];
803 uint8_t isr_nrates;
804 uint8_t isr_rates[IEEE80211_RATE_MAXSIZE];
805 uint8_t isr_ssid_len; /* SSID length */
806 uint8_t isr_meshid_len; /* MESH ID length */
807 /* variable length SSID, followed by variable length MESH ID,
808 followed by IE data */
809};
810
811/*
812 * Virtual AP cloning parameters. The parent device must
813 * be a vap-capable device. All parameters specified with
814 * the clone request are fixed for the lifetime of the vap.
815 *
816 * There are two flavors of WDS vaps: legacy and dynamic.
817 * Legacy WDS operation implements a static binding between
818 * two stations encapsulating traffic in 4-address frames.
819 * Dynamic WDS vaps are created when a station associates to
820 * an AP and sends a 4-address frame. If the AP vap is
821 * configured to support WDS then this will generate an
822 * event to user programs listening on the routing socket
823 * and a Dynamic WDS vap will be created to handle traffic
824 * to/from that station. In both cases the bssid of the
825 * peer must be specified when creating the vap.
826 *
827 * By default a vap will inherit the mac address/bssid of
828 * the underlying device. To request a unique address the
829 * IEEE80211_CLONE_BSSID flag should be supplied. This is
830 * meaningless for WDS vaps as they share the bssid of an
831 * AP vap that must otherwise exist. Note that some devices
832 * may not be able to support multiple addresses.
833 *
834 * Station mode vap's normally depend on the device to notice
835 * when the AP stops sending beacon frames. If IEEE80211_CLONE_NOBEACONS
836 * is specified the net80211 layer will do this in s/w. This
837 * is mostly useful when setting up a WDS repeater/extender where
838 * an AP vap is combined with a sta vap and the device isn't able
839 * to track beacon frames in hardware.
840 */
841struct ieee80211_clone_params {
842 char icp_parent[IFNAMSIZ]; /* parent device */
843 uint16_t icp_opmode; /* operating mode */
844 uint16_t icp_flags; /* see below */
845 uint8_t icp_bssid[IEEE80211_ADDR_LEN]; /* for WDS links */
846 uint8_t icp_macaddr[IEEE80211_ADDR_LEN];/* local address */
847};
848#define IEEE80211_CLONE_BSSID 0x0001 /* allocate unique mac/bssid */
849#define IEEE80211_CLONE_NOBEACONS 0x0002 /* don't setup beacon timers */
850#define IEEE80211_CLONE_WDSLEGACY 0x0004 /* legacy WDS processing */
851#define IEEE80211_CLONE_MACADDR 0x0008 /* use specified mac addr */
852#define IEEE80211_CLONE_TDMA 0x0010 /* operate in TDMA mode */
853#endif /* __FreeBSD__ */
854
855#endif /* _NET80211_IEEE80211_IOCTL_H_ */
250};
251
252/*
253 * Max size of optional information elements. We artificially
254 * constrain this; it's limited only by the max frame size (and
255 * the max parameter size of the wireless extensions).
256 */
257#define IEEE80211_MAX_OPT_IE 256
258
259/*
260 * WPA/RSN get/set key request. Specify the key/cipher
261 * type and whether the key is to be used for sending and/or
262 * receiving. The key index should be set only when working
263 * with global keys (use IEEE80211_KEYIX_NONE for ``no index'').
264 * Otherwise a unicast/pairwise key is specified by the bssid
265 * (on a station) or mac address (on an ap). They key length
266 * must include any MIC key data; otherwise it should be no
267 * more than IEEE80211_KEYBUF_SIZE.
268 */
269struct ieee80211req_key {
270 uint8_t ik_type; /* key/cipher type */
271 uint8_t ik_pad;
272 uint16_t ik_keyix; /* key index */
273 uint8_t ik_keylen; /* key length in bytes */
274 uint8_t ik_flags;
275/* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */
276#define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */
277 uint8_t ik_macaddr[IEEE80211_ADDR_LEN];
278 uint64_t ik_keyrsc; /* key receive sequence counter */
279 uint64_t ik_keytsc; /* key transmit sequence counter */
280 uint8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE];
281};
282
283/*
284 * Delete a key either by index or address. Set the index
285 * to IEEE80211_KEYIX_NONE when deleting a unicast key.
286 */
287struct ieee80211req_del_key {
288 uint8_t idk_keyix; /* key index */
289 uint8_t idk_macaddr[IEEE80211_ADDR_LEN];
290};
291
292/*
293 * MLME state manipulation request. IEEE80211_MLME_ASSOC
294 * only makes sense when operating as a station. The other
295 * requests can be used when operating as a station or an
296 * ap (to effect a station).
297 */
298struct ieee80211req_mlme {
299 uint8_t im_op; /* operation to perform */
300#define IEEE80211_MLME_ASSOC 1 /* associate station */
301#define IEEE80211_MLME_DISASSOC 2 /* disassociate station */
302#define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */
303#define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */
304#define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */
305#define IEEE80211_MLME_AUTH 6 /* authenticate station */
306 uint8_t im_ssid_len; /* length of optional ssid */
307 uint16_t im_reason; /* 802.11 reason code */
308 uint8_t im_macaddr[IEEE80211_ADDR_LEN];
309 uint8_t im_ssid[IEEE80211_NWID_LEN];
310};
311
312/*
313 * MAC ACL operations.
314 */
315enum {
316 IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */
317 IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */
318 IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */
319 IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */
320 IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */
321 IEEE80211_MACCMD_POLICY = 5, /* get ACL policy */
322 IEEE80211_MACCMD_LIST = 6, /* get ACL database */
323 IEEE80211_MACCMD_POLICY_RADIUS = 7, /* set policy: RADIUS managed */
324};
325
326struct ieee80211req_maclist {
327 uint8_t ml_macaddr[IEEE80211_ADDR_LEN];
328} __packed;
329
330/*
331 * Mesh Routing Table Operations.
332 */
333enum {
334 IEEE80211_MESH_RTCMD_LIST = 0, /* list HWMP routing table */
335 IEEE80211_MESH_RTCMD_FLUSH = 1, /* flush HWMP routing table */
336 IEEE80211_MESH_RTCMD_ADD = 2, /* add entry to the table */
337 IEEE80211_MESH_RTCMD_DELETE = 3, /* delete an entry from the table */
338};
339
340struct ieee80211req_mesh_route {
341 uint8_t imr_flags;
342#define IEEE80211_MESHRT_FLAGS_VALID 0x01
343#define IEEE80211_MESHRT_FLAGS_PROXY 0x02
344 uint8_t imr_dest[IEEE80211_ADDR_LEN];
345 uint8_t imr_nexthop[IEEE80211_ADDR_LEN];
346 uint16_t imr_nhops;
347 uint8_t imr_pad;
348 uint32_t imr_metric;
349 uint32_t imr_lifetime;
350 uint32_t imr_lastmseq;
351};
352
353/*
354 * HWMP root modes
355 */
356enum {
357 IEEE80211_HWMP_ROOTMODE_DISABLED = 0, /* disabled */
358 IEEE80211_HWMP_ROOTMODE_NORMAL = 1, /* normal PREPs */
359 IEEE80211_HWMP_ROOTMODE_PROACTIVE = 2, /* proactive PREPS */
360 IEEE80211_HWMP_ROOTMODE_RANN = 3, /* use RANN elemid */
361};
362
363
364/*
365 * Set the active channel list by IEEE channel #: each channel
366 * to be marked active is set in a bit vector. Note this list is
367 * intersected with the available channel list in calculating
368 * the set of channels actually used in scanning.
369 */
370struct ieee80211req_chanlist {
371 uint8_t ic_channels[32]; /* NB: can be variable length */
372};
373
374/*
375 * Get the active channel list info.
376 */
377struct ieee80211req_chaninfo {
378 u_int ic_nchans;
379 struct ieee80211_channel ic_chans[1]; /* NB: variable length */
380};
381#define IEEE80211_CHANINFO_SIZE(_nchan) \
382 (sizeof(struct ieee80211req_chaninfo) + \
383 (((_nchan)-1) * sizeof(struct ieee80211_channel)))
384#define IEEE80211_CHANINFO_SPACE(_ci) \
385 IEEE80211_CHANINFO_SIZE((_ci)->ic_nchans)
386
387/*
388 * Retrieve the WPA/RSN information element for an associated station.
389 */
390struct ieee80211req_wpaie { /* old version w/ only one ie */
391 uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
392 uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
393};
394struct ieee80211req_wpaie2 {
395 uint8_t wpa_macaddr[IEEE80211_ADDR_LEN];
396 uint8_t wpa_ie[IEEE80211_MAX_OPT_IE];
397 uint8_t rsn_ie[IEEE80211_MAX_OPT_IE];
398};
399
400/*
401 * Retrieve per-node statistics.
402 */
403struct ieee80211req_sta_stats {
404 union {
405 /* NB: explicitly force 64-bit alignment */
406 uint8_t macaddr[IEEE80211_ADDR_LEN];
407 uint64_t pad;
408 } is_u;
409 struct ieee80211_nodestats is_stats;
410};
411
412/*
413 * Station information block; the mac address is used
414 * to retrieve other data like stats, unicast key, etc.
415 */
416struct ieee80211req_sta_info {
417 uint16_t isi_len; /* total length (mult of 4) */
418 uint16_t isi_ie_off; /* offset to IE data */
419 uint16_t isi_ie_len; /* IE length */
420 uint16_t isi_freq; /* MHz */
421 uint32_t isi_flags; /* channel flags */
422 uint32_t isi_state; /* state flags */
423 uint8_t isi_authmode; /* authentication algorithm */
424 int8_t isi_rssi; /* receive signal strength */
425 int8_t isi_noise; /* noise floor */
426 uint8_t isi_capinfo; /* capabilities */
427 uint8_t isi_erp; /* ERP element */
428 uint8_t isi_macaddr[IEEE80211_ADDR_LEN];
429 uint8_t isi_nrates;
430 /* negotiated rates */
431 uint8_t isi_rates[IEEE80211_RATE_MAXSIZE];
432 uint8_t isi_txrate; /* legacy/IEEE rate or MCS */
433 uint16_t isi_associd; /* assoc response */
434 uint16_t isi_txpower; /* current tx power */
435 uint16_t isi_vlan; /* vlan tag */
436 /* NB: [IEEE80211_NONQOS_TID] holds seq#'s for non-QoS stations */
437 uint16_t isi_txseqs[IEEE80211_TID_SIZE];/* tx seq #/TID */
438 uint16_t isi_rxseqs[IEEE80211_TID_SIZE];/* rx seq#/TID */
439 uint16_t isi_inact; /* inactivity timer */
440 uint16_t isi_txmbps; /* current tx rate in .5 Mb/s */
441 uint16_t isi_pad;
442 uint32_t isi_jointime; /* time of assoc/join */
443 struct ieee80211_mimo_info isi_mimo; /* MIMO info for 11n sta's */
444 /* 11s info */
445 uint16_t isi_peerid;
446 uint16_t isi_localid;
447 uint8_t isi_peerstate;
448 /* XXX frag state? */
449 /* variable length IE data */
450};
451
452/*
453 * Retrieve per-station information; to retrieve all
454 * specify a mac address of ff:ff:ff:ff:ff:ff.
455 */
456struct ieee80211req_sta_req {
457 union {
458 /* NB: explicitly force 64-bit alignment */
459 uint8_t macaddr[IEEE80211_ADDR_LEN];
460 uint64_t pad;
461 } is_u;
462 struct ieee80211req_sta_info info[1]; /* variable length */
463};
464
465/*
466 * Get/set per-station tx power cap.
467 */
468struct ieee80211req_sta_txpow {
469 uint8_t it_macaddr[IEEE80211_ADDR_LEN];
470 uint8_t it_txpow;
471};
472
473/*
474 * WME parameters manipulated with IEEE80211_IOC_WME_CWMIN
475 * through IEEE80211_IOC_WME_ACKPOLICY are set and return
476 * using i_val and i_len. i_val holds the value itself.
477 * i_len specifies the AC and, as appropriate, then high bit
478 * specifies whether the operation is to be applied to the
479 * BSS or ourself.
480 */
481#define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */
482#define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */
483#define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */
484
485/*
486 * Application Information Elements can be appended to a variety
487 * of frames with the IEE80211_IOC_APPIE request. This request
488 * piggybacks on a normal ieee80211req; the frame type is passed
489 * in i_val as the 802.11 FC0 bytes and the length of the IE data
490 * is passed in i_len. The data is referenced in i_data. If i_len
491 * is zero then any previously configured IE data is removed. At
492 * most IEEE80211_MAX_APPIE data be appened. Note that multiple
493 * IE's can be supplied; the data is treated opaquely.
494 */
495#define IEEE80211_MAX_APPIE 1024 /* max app IE data */
496/*
497 * Hack: the WPA authenticator uses this mechanism to specify WPA
498 * ie's that are used instead of the ones normally constructed using
499 * the cipher state setup with separate ioctls. This avoids issues
500 * like the authenticator ordering ie data differently than the
501 * net80211 layer and needing to keep separate state for WPA and RSN.
502 */
503#define IEEE80211_APPIE_WPA \
504 (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_BEACON | \
505 IEEE80211_FC0_SUBTYPE_PROBE_RESP)
506
507/*
508 * Station mode roaming parameters. These are maintained
509 * per band/mode and control the roaming algorithm.
510 */
511struct ieee80211_roamparams_req {
512 struct ieee80211_roamparam params[IEEE80211_MODE_MAX];
513};
514
515/*
516 * Transmit parameters. These can be used to set fixed transmit
517 * rate for each operating mode when operating as client or on a
518 * per-client basis according to the capabilities of the client
519 * (e.g. an 11b client associated to an 11g ap) when operating as
520 * an ap.
521 *
522 * MCS are distinguished from legacy rates by or'ing in 0x80.
523 */
524struct ieee80211_txparams_req {
525 struct ieee80211_txparam params[IEEE80211_MODE_MAX];
526};
527
528/*
529 * Set regulatory domain state with IEEE80211_IOC_REGDOMAIN.
530 * Note this is both the regulatory description and the channel
531 * list. The get request for IEEE80211_IOC_REGDOMAIN returns
532 * only the regdomain info; the channel list is obtained
533 * separately with IEEE80211_IOC_CHANINFO.
534 */
535struct ieee80211_regdomain_req {
536 struct ieee80211_regdomain rd;
537 struct ieee80211req_chaninfo chaninfo;
538};
539#define IEEE80211_REGDOMAIN_SIZE(_nchan) \
540 (sizeof(struct ieee80211_regdomain_req) + \
541 (((_nchan)-1) * sizeof(struct ieee80211_channel)))
542#define IEEE80211_REGDOMAIN_SPACE(_req) \
543 IEEE80211_REGDOMAIN_SIZE((_req)->chaninfo.ic_nchans)
544
545/*
546 * Get driver capabilities. Driver, hardware crypto, and
547 * HT/802.11n capabilities, and a table that describes what
548 * the radio can do.
549 */
550struct ieee80211_devcaps_req {
551 uint32_t dc_drivercaps; /* general driver caps */
552 uint32_t dc_cryptocaps; /* hardware crypto support */
553 uint32_t dc_htcaps; /* HT/802.11n support */
554 struct ieee80211req_chaninfo dc_chaninfo;
555};
556#define IEEE80211_DEVCAPS_SIZE(_nchan) \
557 (sizeof(struct ieee80211_devcaps_req) + \
558 (((_nchan)-1) * sizeof(struct ieee80211_channel)))
559#define IEEE80211_DEVCAPS_SPACE(_dc) \
560 IEEE80211_DEVCAPS_SIZE((_dc)->dc_chaninfo.ic_nchans)
561
562struct ieee80211_chanswitch_req {
563 struct ieee80211_channel csa_chan; /* new channel */
564 int csa_mode; /* CSA mode */
565 int csa_count; /* beacon count to switch */
566};
567
568/*
569 * Get/set per-station vlan tag.
570 */
571struct ieee80211req_sta_vlan {
572 uint8_t sv_macaddr[IEEE80211_ADDR_LEN];
573 uint16_t sv_vlan;
574};
575
576#ifdef __FreeBSD__
577/*
578 * FreeBSD-style ioctls.
579 */
580/* the first member must be matched with struct ifreq */
581struct ieee80211req {
582 char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */
583 uint16_t i_type; /* req type */
584 int16_t i_val; /* Index or simple value */
585 uint16_t i_len; /* Index or simple value */
586 void *i_data; /* Extra data */
587};
588#define SIOCS80211 _IOW('i', 234, struct ieee80211req)
589#define SIOCG80211 _IOWR('i', 235, struct ieee80211req)
590#define SIOCG80211STATS _IOWR('i', 236, struct ifreq)
591
592#define IEEE80211_IOC_SSID 1
593#define IEEE80211_IOC_NUMSSIDS 2
594#define IEEE80211_IOC_WEP 3
595#define IEEE80211_WEP_NOSUP -1
596#define IEEE80211_WEP_OFF 0
597#define IEEE80211_WEP_ON 1
598#define IEEE80211_WEP_MIXED 2
599#define IEEE80211_IOC_WEPKEY 4
600#define IEEE80211_IOC_NUMWEPKEYS 5
601#define IEEE80211_IOC_WEPTXKEY 6
602#define IEEE80211_IOC_AUTHMODE 7
603#define IEEE80211_IOC_STATIONNAME 8
604#define IEEE80211_IOC_CHANNEL 9
605#define IEEE80211_IOC_POWERSAVE 10
606#define IEEE80211_POWERSAVE_NOSUP -1
607#define IEEE80211_POWERSAVE_OFF 0
608#define IEEE80211_POWERSAVE_CAM 1
609#define IEEE80211_POWERSAVE_PSP 2
610#define IEEE80211_POWERSAVE_PSP_CAM 3
611#define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM
612#define IEEE80211_IOC_POWERSAVESLEEP 11
613#define IEEE80211_IOC_RTSTHRESHOLD 12
614#define IEEE80211_IOC_PROTMODE 13
615#define IEEE80211_PROTMODE_OFF 0
616#define IEEE80211_PROTMODE_CTS 1
617#define IEEE80211_PROTMODE_RTSCTS 2
618#define IEEE80211_IOC_TXPOWER 14 /* global tx power limit */
619#define IEEE80211_IOC_BSSID 15
620#define IEEE80211_IOC_ROAMING 16 /* roaming mode */
621#define IEEE80211_IOC_PRIVACY 17 /* privacy invoked */
622#define IEEE80211_IOC_DROPUNENCRYPTED 18 /* discard unencrypted frames */
623#define IEEE80211_IOC_WPAKEY 19
624#define IEEE80211_IOC_DELKEY 20
625#define IEEE80211_IOC_MLME 21
626/* 22 was IEEE80211_IOC_OPTIE, replaced by IEEE80211_IOC_APPIE */
627/* 23 was IEEE80211_IOC_SCAN_REQ */
628/* 24 was IEEE80211_IOC_SCAN_RESULTS */
629#define IEEE80211_IOC_COUNTERMEASURES 25 /* WPA/TKIP countermeasures */
630#define IEEE80211_IOC_WPA 26 /* WPA mode (0,1,2) */
631#define IEEE80211_IOC_CHANLIST 27 /* channel list */
632#define IEEE80211_IOC_WME 28 /* WME mode (on, off) */
633#define IEEE80211_IOC_HIDESSID 29 /* hide SSID mode (on, off) */
634#define IEEE80211_IOC_APBRIDGE 30 /* AP inter-sta bridging */
635/* 31-35,37-38 were for WPA authenticator settings */
636/* 36 was IEEE80211_IOC_DRIVER_CAPS */
637#define IEEE80211_IOC_WPAIE 39 /* WPA information element */
638#define IEEE80211_IOC_STA_STATS 40 /* per-station statistics */
639#define IEEE80211_IOC_MACCMD 41 /* MAC ACL operation */
640#define IEEE80211_IOC_CHANINFO 42 /* channel info list */
641#define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */
642#define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */
643/* 45 was IEEE80211_IOC_STA_INFO */
644#define IEEE80211_IOC_WME_CWMIN 46 /* WME: ECWmin */
645#define IEEE80211_IOC_WME_CWMAX 47 /* WME: ECWmax */
646#define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFSN */
647#define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */
648#define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */
649#define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/
650#define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */
651#define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */
652#define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */
653#define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */
654#define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */
655#define IEEE80211_IOC_FF 57 /* ATH fast frames (on, off) */
656#define IEEE80211_IOC_TURBOP 58 /* ATH turbo' (on, off) */
657#define IEEE80211_IOC_BGSCAN 59 /* bg scanning (on, off) */
658#define IEEE80211_IOC_BGSCAN_IDLE 60 /* bg scan idle threshold */
659#define IEEE80211_IOC_BGSCAN_INTERVAL 61 /* bg scan interval */
660#define IEEE80211_IOC_SCANVALID 65 /* scan cache valid threshold */
661/* 66-72 were IEEE80211_IOC_ROAM_* and IEEE80211_IOC_MCAST_RATE */
662#define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */
663#define IEEE80211_IOC_BURST 75 /* packet bursting */
664#define IEEE80211_IOC_SCAN_RESULTS 76 /* get scan results */
665#define IEEE80211_IOC_BMISSTHRESHOLD 77 /* beacon miss threshold */
666#define IEEE80211_IOC_STA_INFO 78 /* station/neighbor info */
667#define IEEE80211_IOC_WPAIE2 79 /* WPA+RSN info elements */
668#define IEEE80211_IOC_CURCHAN 80 /* current channel */
669#define IEEE80211_IOC_SHORTGI 81 /* 802.11n half GI */
670#define IEEE80211_IOC_AMPDU 82 /* 802.11n A-MPDU (on, off) */
671#define IEEE80211_IOC_AMPDU_LIMIT 83 /* A-MPDU length limit */
672#define IEEE80211_IOC_AMPDU_DENSITY 84 /* A-MPDU density */
673#define IEEE80211_IOC_AMSDU 85 /* 802.11n A-MSDU (on, off) */
674#define IEEE80211_IOC_AMSDU_LIMIT 86 /* A-MSDU length limit */
675#define IEEE80211_IOC_PUREN 87 /* pure 11n (no legacy sta's) */
676#define IEEE80211_IOC_DOTH 88 /* 802.11h (on, off) */
677/* 89-91 were regulatory items */
678#define IEEE80211_IOC_HTCOMPAT 92 /* support pre-D1.10 HT ie's */
679#define IEEE80211_IOC_DWDS 93 /* DWDS/4-address handling */
680#define IEEE80211_IOC_INACTIVITY 94 /* sta inactivity handling */
681#define IEEE80211_IOC_APPIE 95 /* application IE's */
682#define IEEE80211_IOC_WPS 96 /* WPS operation */
683#define IEEE80211_IOC_TSN 97 /* TSN operation */
684#define IEEE80211_IOC_DEVCAPS 98 /* driver+device capabilities */
685#define IEEE80211_IOC_CHANSWITCH 99 /* start 11h channel switch */
686#define IEEE80211_IOC_DFS 100 /* DFS (on, off) */
687#define IEEE80211_IOC_DOTD 101 /* 802.11d (on, off) */
688#define IEEE80211_IOC_HTPROTMODE 102 /* HT protection (off, rts) */
689#define IEEE80211_IOC_SCAN_REQ 103 /* scan w/ specified params */
690#define IEEE80211_IOC_SCAN_CANCEL 104 /* cancel ongoing scan */
691#define IEEE80211_IOC_HTCONF 105 /* HT config (off, HT20, HT40)*/
692#define IEEE80211_IOC_REGDOMAIN 106 /* regulatory domain info */
693#define IEEE80211_IOC_ROAM 107 /* roaming params en masse */
694#define IEEE80211_IOC_TXPARAMS 108 /* tx parameters */
695#define IEEE80211_IOC_STA_VLAN 109 /* per-station vlan tag */
696#define IEEE80211_IOC_SMPS 110 /* MIMO power save */
697#define IEEE80211_IOC_RIFS 111 /* RIFS config (on, off) */
698#define IEEE80211_IOC_GREENFIELD 112 /* Greenfield (on, off) */
699#define IEEE80211_IOC_STBC 113 /* STBC Tx/RX (on, off) */
700
701#define IEEE80211_IOC_MESH_ID 170 /* mesh identifier */
702#define IEEE80211_IOC_MESH_AP 171 /* accepting peerings */
703#define IEEE80211_IOC_MESH_FWRD 172 /* forward frames */
704#define IEEE80211_IOC_MESH_PROTO 173 /* mesh protocols */
705#define IEEE80211_IOC_MESH_TTL 174 /* mesh TTL */
706#define IEEE80211_IOC_MESH_RTCMD 175 /* mesh routing table commands*/
707#define IEEE80211_IOC_MESH_PR_METRIC 176 /* mesh metric protocol */
708#define IEEE80211_IOC_MESH_PR_PATH 177 /* mesh path protocol */
709#define IEEE80211_IOC_MESH_PR_SIG 178 /* mesh sig protocol */
710#define IEEE80211_IOC_MESH_PR_CC 179 /* mesh congestion protocol */
711#define IEEE80211_IOC_MESH_PR_AUTH 180 /* mesh auth protocol */
712
713#define IEEE80211_IOC_HWMP_ROOTMODE 190 /* HWMP root mode */
714#define IEEE80211_IOC_HWMP_MAXHOPS 191 /* number of hops before drop */
715#define IEEE80211_IOC_HWMP_TTL 192 /* HWMP TTL */
716
717#define IEEE80211_IOC_TDMA_SLOT 201 /* TDMA: assigned slot */
718#define IEEE80211_IOC_TDMA_SLOTCNT 202 /* TDMA: slots in bss */
719#define IEEE80211_IOC_TDMA_SLOTLEN 203 /* TDMA: slot length (usecs) */
720#define IEEE80211_IOC_TDMA_BINTERVAL 204 /* TDMA: beacon intvl (slots) */
721
722#define IEEE80211_IOC_QUIET 205 /* Quiet Enable/Disable */
723#define IEEE80211_IOC_QUIET_PERIOD 206 /* Quiet Period */
724#define IEEE80211_IOC_QUIET_OFFSET 207 /* Quiet Offset */
725#define IEEE80211_IOC_QUIET_DUR 208 /* Quiet Duration */
726#define IEEE80211_IOC_QUIET_COUNT 209 /* Quiet Count */
727/*
728 * Parameters for controlling a scan requested with
729 * IEEE80211_IOC_SCAN_REQ.
730 *
731 * Active scans cause ProbeRequest frames to be issued for each
732 * specified ssid and, by default, a broadcast ProbeRequest frame.
733 * The set of ssid's is specified in the request.
734 *
735 * By default the scan will cause a BSS to be joined (in station/adhoc
736 * mode) or a channel to be selected for operation (hostap mode).
737 * To disable that specify IEEE80211_IOC_SCAN_NOPICK and if the
738 *
739 * If the station is currently associated to an AP then a scan request
740 * will cause the station to leave the current channel and potentially
741 * miss frames from the AP. Alternatively the station may notify the
742 * AP that it is going into power save mode before it leaves the channel.
743 * This ensures frames for the station are buffered by the AP. This is
744 * termed a ``bg scan'' and is requested with the IEEE80211_IOC_SCAN_BGSCAN
745 * flag. Background scans may take longer than foreground scans and may
746 * be preempted by traffic. If a station is not associated to an AP
747 * then a request for a background scan is automatically done in the
748 * foreground.
749 *
750 * The results of the scan request are cached by the system. This
751 * information is aged out and/or invalidated based on events like not
752 * being able to associated to an AP. To flush the current cache
753 * contents before doing a scan the IEEE80211_IOC_SCAN_FLUSH flag may
754 * be specified.
755 *
756 * By default the scan will be done until a suitable AP is located
757 * or a channel is found for use. A scan can also be constrained
758 * to be done once (IEEE80211_IOC_SCAN_ONCE) or to last for no more
759 * than a specified duration.
760 */
761struct ieee80211_scan_req {
762 int sr_flags;
763#define IEEE80211_IOC_SCAN_NOPICK 0x00001 /* scan only, no selection */
764#define IEEE80211_IOC_SCAN_ACTIVE 0x00002 /* active scan (probe req) */
765#define IEEE80211_IOC_SCAN_PICK1ST 0x00004 /* ``hey sailor'' mode */
766#define IEEE80211_IOC_SCAN_BGSCAN 0x00008 /* bg scan, exit ps at end */
767#define IEEE80211_IOC_SCAN_ONCE 0x00010 /* do one complete pass */
768#define IEEE80211_IOC_SCAN_NOBCAST 0x00020 /* don't send bcast probe req */
769#define IEEE80211_IOC_SCAN_NOJOIN 0x00040 /* no auto-sequencing */
770#define IEEE80211_IOC_SCAN_FLUSH 0x10000 /* flush scan cache first */
771#define IEEE80211_IOC_SCAN_CHECK 0x20000 /* check scan cache first */
772 u_int sr_duration; /* duration (ms) */
773#define IEEE80211_IOC_SCAN_DURATION_MIN 1
774#define IEEE80211_IOC_SCAN_DURATION_MAX 0x7fffffff
775#define IEEE80211_IOC_SCAN_FOREVER IEEE80211_IOC_SCAN_DURATION_MAX
776 u_int sr_mindwell; /* min channel dwelltime (ms) */
777 u_int sr_maxdwell; /* max channel dwelltime (ms) */
778 int sr_nssid;
779#define IEEE80211_IOC_SCAN_MAX_SSID 3
780 struct {
781 int len; /* length in bytes */
782 uint8_t ssid[IEEE80211_NWID_LEN]; /* ssid contents */
783 } sr_ssid[IEEE80211_IOC_SCAN_MAX_SSID];
784};
785
786/*
787 * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS.
788 * Each result is a fixed size structure followed by a variable
789 * length SSID and one or more variable length information elements.
790 * The size of each variable length item is found in the fixed
791 * size structure and the entire length of the record is specified
792 * in isr_len. Result records are rounded to a multiple of 4 bytes.
793 */
794struct ieee80211req_scan_result {
795 uint16_t isr_len; /* total length (mult of 4) */
796 uint16_t isr_ie_off; /* offset to SSID+IE data */
797 uint16_t isr_ie_len; /* IE length */
798 uint16_t isr_freq; /* MHz */
799 uint16_t isr_flags; /* channel flags */
800 int8_t isr_noise;
801 int8_t isr_rssi;
802 uint16_t isr_intval; /* beacon interval */
803 uint8_t isr_capinfo; /* capabilities */
804 uint8_t isr_erp; /* ERP element */
805 uint8_t isr_bssid[IEEE80211_ADDR_LEN];
806 uint8_t isr_nrates;
807 uint8_t isr_rates[IEEE80211_RATE_MAXSIZE];
808 uint8_t isr_ssid_len; /* SSID length */
809 uint8_t isr_meshid_len; /* MESH ID length */
810 /* variable length SSID, followed by variable length MESH ID,
811 followed by IE data */
812};
813
814/*
815 * Virtual AP cloning parameters. The parent device must
816 * be a vap-capable device. All parameters specified with
817 * the clone request are fixed for the lifetime of the vap.
818 *
819 * There are two flavors of WDS vaps: legacy and dynamic.
820 * Legacy WDS operation implements a static binding between
821 * two stations encapsulating traffic in 4-address frames.
822 * Dynamic WDS vaps are created when a station associates to
823 * an AP and sends a 4-address frame. If the AP vap is
824 * configured to support WDS then this will generate an
825 * event to user programs listening on the routing socket
826 * and a Dynamic WDS vap will be created to handle traffic
827 * to/from that station. In both cases the bssid of the
828 * peer must be specified when creating the vap.
829 *
830 * By default a vap will inherit the mac address/bssid of
831 * the underlying device. To request a unique address the
832 * IEEE80211_CLONE_BSSID flag should be supplied. This is
833 * meaningless for WDS vaps as they share the bssid of an
834 * AP vap that must otherwise exist. Note that some devices
835 * may not be able to support multiple addresses.
836 *
837 * Station mode vap's normally depend on the device to notice
838 * when the AP stops sending beacon frames. If IEEE80211_CLONE_NOBEACONS
839 * is specified the net80211 layer will do this in s/w. This
840 * is mostly useful when setting up a WDS repeater/extender where
841 * an AP vap is combined with a sta vap and the device isn't able
842 * to track beacon frames in hardware.
843 */
844struct ieee80211_clone_params {
845 char icp_parent[IFNAMSIZ]; /* parent device */
846 uint16_t icp_opmode; /* operating mode */
847 uint16_t icp_flags; /* see below */
848 uint8_t icp_bssid[IEEE80211_ADDR_LEN]; /* for WDS links */
849 uint8_t icp_macaddr[IEEE80211_ADDR_LEN];/* local address */
850};
851#define IEEE80211_CLONE_BSSID 0x0001 /* allocate unique mac/bssid */
852#define IEEE80211_CLONE_NOBEACONS 0x0002 /* don't setup beacon timers */
853#define IEEE80211_CLONE_WDSLEGACY 0x0004 /* legacy WDS processing */
854#define IEEE80211_CLONE_MACADDR 0x0008 /* use specified mac addr */
855#define IEEE80211_CLONE_TDMA 0x0010 /* operate in TDMA mode */
856#endif /* __FreeBSD__ */
857
858#endif /* _NET80211_IEEE80211_IOCTL_H_ */