11a1e1d21SSam Leffler /*- 24d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 3fe267a55SPedro F. Giffuni * 47535e66aSSam Leffler * Copyright (c) 2001 Atsushi Onoe 510ad9a77SSam Leffler * Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 61a1e1d21SSam Leffler * All rights reserved. 71a1e1d21SSam Leffler * 81a1e1d21SSam Leffler * Redistribution and use in source and binary forms, with or without 91a1e1d21SSam Leffler * modification, are permitted provided that the following conditions 101a1e1d21SSam Leffler * are met: 111a1e1d21SSam Leffler * 1. Redistributions of source code must retain the above copyright 121a1e1d21SSam Leffler * notice, this list of conditions and the following disclaimer. 131a1e1d21SSam Leffler * 2. Redistributions in binary form must reproduce the above copyright 141a1e1d21SSam Leffler * notice, this list of conditions and the following disclaimer in the 151a1e1d21SSam Leffler * documentation and/or other materials provided with the distribution. 167535e66aSSam Leffler * 177535e66aSSam Leffler * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 187535e66aSSam Leffler * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 197535e66aSSam Leffler * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 207535e66aSSam Leffler * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 217535e66aSSam Leffler * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 227535e66aSSam Leffler * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 237535e66aSSam Leffler * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 247535e66aSSam Leffler * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 257535e66aSSam Leffler * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 267535e66aSSam Leffler * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 271a1e1d21SSam Leffler */ 281a1e1d21SSam Leffler #ifndef _NET80211_IEEE80211_IOCTL_H_ 291a1e1d21SSam Leffler #define _NET80211_IEEE80211_IOCTL_H_ 301a1e1d21SSam Leffler 311a1e1d21SSam Leffler /* 321a1e1d21SSam Leffler * IEEE 802.11 ioctls. 331a1e1d21SSam Leffler */ 348a1b9b6aSSam Leffler #include <net80211/_ieee80211.h> 358a1b9b6aSSam Leffler #include <net80211/ieee80211.h> 368a1b9b6aSSam Leffler #include <net80211/ieee80211_crypto.h> 371a1e1d21SSam Leffler 388a1b9b6aSSam Leffler /* 39d1c85daeSSam Leffler * Per/node (station) statistics. 408a1b9b6aSSam Leffler */ 418a1b9b6aSSam Leffler struct ieee80211_nodestats { 4268e8e04eSSam Leffler uint32_t ns_rx_data; /* rx data frames */ 4368e8e04eSSam Leffler uint32_t ns_rx_mgmt; /* rx management frames */ 4468e8e04eSSam Leffler uint32_t ns_rx_ctrl; /* rx control frames */ 4568e8e04eSSam Leffler uint32_t ns_rx_ucast; /* rx unicast frames */ 4668e8e04eSSam Leffler uint32_t ns_rx_mcast; /* rx multi/broadcast frames */ 4768e8e04eSSam Leffler uint64_t ns_rx_bytes; /* rx data count (bytes) */ 4868e8e04eSSam Leffler uint64_t ns_rx_beacons; /* rx beacon frames */ 4968e8e04eSSam Leffler uint32_t ns_rx_proberesp; /* rx probe response frames */ 508a1b9b6aSSam Leffler 5168e8e04eSSam Leffler uint32_t ns_rx_dup; /* rx discard 'cuz dup */ 5268e8e04eSSam Leffler uint32_t ns_rx_noprivacy; /* rx w/ wep but privacy off */ 5368e8e04eSSam Leffler uint32_t ns_rx_wepfail; /* rx wep processing failed */ 5468e8e04eSSam Leffler uint32_t ns_rx_demicfail; /* rx demic failed */ 5568e8e04eSSam Leffler uint32_t ns_rx_decap; /* rx decapsulation failed */ 5668e8e04eSSam Leffler uint32_t ns_rx_defrag; /* rx defragmentation failed */ 5768e8e04eSSam Leffler uint32_t ns_rx_disassoc; /* rx disassociation */ 5868e8e04eSSam Leffler uint32_t ns_rx_deauth; /* rx deauthentication */ 5968e8e04eSSam Leffler uint32_t ns_rx_action; /* rx action */ 6068e8e04eSSam Leffler uint32_t ns_rx_decryptcrc; /* rx decrypt failed on crc */ 6168e8e04eSSam Leffler uint32_t ns_rx_unauth; /* rx on unauthorized port */ 6268e8e04eSSam Leffler uint32_t ns_rx_unencrypted; /* rx unecrypted w/ privacy */ 631b6167d2SSam Leffler uint32_t ns_rx_drop; /* rx discard other reason */ 648a1b9b6aSSam Leffler 6568e8e04eSSam Leffler uint32_t ns_tx_data; /* tx data frames */ 6668e8e04eSSam Leffler uint32_t ns_tx_mgmt; /* tx management frames */ 67a43cee70SSam Leffler uint32_t ns_tx_ctrl; /* tx control frames */ 6868e8e04eSSam Leffler uint32_t ns_tx_ucast; /* tx unicast frames */ 6968e8e04eSSam Leffler uint32_t ns_tx_mcast; /* tx multi/broadcast frames */ 7068e8e04eSSam Leffler uint64_t ns_tx_bytes; /* tx data count (bytes) */ 7168e8e04eSSam Leffler uint32_t ns_tx_probereq; /* tx probe request frames */ 728a1b9b6aSSam Leffler 7368e8e04eSSam Leffler uint32_t ns_tx_novlantag; /* tx discard 'cuz no tag */ 7468e8e04eSSam Leffler uint32_t ns_tx_vlanmismatch; /* tx discard 'cuz bad tag */ 758a1b9b6aSSam Leffler 7668e8e04eSSam Leffler uint32_t ns_ps_discard; /* ps discard 'cuz of age */ 778a1b9b6aSSam Leffler 788a1b9b6aSSam Leffler /* MIB-related state */ 7968e8e04eSSam Leffler uint32_t ns_tx_assoc; /* [re]associations */ 8068e8e04eSSam Leffler uint32_t ns_tx_assoc_fail; /* [re]association failures */ 8168e8e04eSSam Leffler uint32_t ns_tx_auth; /* [re]authentications */ 8268e8e04eSSam Leffler uint32_t ns_tx_auth_fail; /* [re]authentication failures*/ 8368e8e04eSSam Leffler uint32_t ns_tx_deauth; /* deauthentications */ 8468e8e04eSSam Leffler uint32_t ns_tx_deauth_code; /* last deauth reason */ 8568e8e04eSSam Leffler uint32_t ns_tx_disassoc; /* disassociations */ 8668e8e04eSSam Leffler uint32_t ns_tx_disassoc_code; /* last disassociation reason */ 8748f95a36SAdrian Chadd 8848f95a36SAdrian Chadd /* Hardware A-MSDU decode */ 8948f95a36SAdrian Chadd uint32_t ns_rx_amsdu_more; /* RX decap A-MSDU, more coming from A-MSDU */ 9048f95a36SAdrian Chadd uint32_t ns_rx_amsdu_more_end; /* RX decap A-MSDU (or any other frame), no more coming */ 9148f95a36SAdrian Chadd uint32_t ns_spare[6]; 928a1b9b6aSSam Leffler }; 938a1b9b6aSSam Leffler 948a1b9b6aSSam Leffler /* 958a1b9b6aSSam Leffler * Summary statistics. 968a1b9b6aSSam Leffler */ 971be50176SSam Leffler struct ieee80211_stats { 9868e8e04eSSam Leffler uint32_t is_rx_badversion; /* rx frame with bad version */ 9968e8e04eSSam Leffler uint32_t is_rx_tooshort; /* rx frame too short */ 10068e8e04eSSam Leffler uint32_t is_rx_wrongbss; /* rx from wrong bssid */ 10168e8e04eSSam Leffler uint32_t is_rx_dup; /* rx discard 'cuz dup */ 10268e8e04eSSam Leffler uint32_t is_rx_wrongdir; /* rx w/ wrong direction */ 10368e8e04eSSam Leffler uint32_t is_rx_mcastecho; /* rx discard 'cuz mcast echo */ 10468e8e04eSSam Leffler uint32_t is_rx_notassoc; /* rx discard 'cuz sta !assoc */ 10568e8e04eSSam Leffler uint32_t is_rx_noprivacy; /* rx w/ wep but privacy off */ 10668e8e04eSSam Leffler uint32_t is_rx_unencrypted; /* rx w/o wep and privacy on */ 10768e8e04eSSam Leffler uint32_t is_rx_wepfail; /* rx wep processing failed */ 10868e8e04eSSam Leffler uint32_t is_rx_decap; /* rx decapsulation failed */ 10968e8e04eSSam Leffler uint32_t is_rx_mgtdiscard; /* rx discard mgt frames */ 110a43cee70SSam Leffler uint32_t is_rx_ctl; /* rx ctrl frames */ 11168e8e04eSSam Leffler uint32_t is_rx_beacon; /* rx beacon frames */ 11268e8e04eSSam Leffler uint32_t is_rx_rstoobig; /* rx rate set truncated */ 11368e8e04eSSam Leffler uint32_t is_rx_elem_missing; /* rx required element missing*/ 11468e8e04eSSam Leffler uint32_t is_rx_elem_toobig; /* rx element too big */ 11568e8e04eSSam Leffler uint32_t is_rx_elem_toosmall; /* rx element too small */ 11668e8e04eSSam Leffler uint32_t is_rx_elem_unknown; /* rx element unknown */ 11768e8e04eSSam Leffler uint32_t is_rx_badchan; /* rx frame w/ invalid chan */ 11868e8e04eSSam Leffler uint32_t is_rx_chanmismatch; /* rx frame chan mismatch */ 11968e8e04eSSam Leffler uint32_t is_rx_nodealloc; /* rx frame dropped */ 12068e8e04eSSam Leffler uint32_t is_rx_ssidmismatch; /* rx frame ssid mismatch */ 12168e8e04eSSam Leffler uint32_t is_rx_auth_unsupported; /* rx w/ unsupported auth alg */ 12268e8e04eSSam Leffler uint32_t is_rx_auth_fail; /* rx sta auth failure */ 12368e8e04eSSam Leffler uint32_t is_rx_auth_countermeasures;/* rx auth discard 'cuz CM */ 12468e8e04eSSam Leffler uint32_t is_rx_assoc_bss; /* rx assoc from wrong bssid */ 12568e8e04eSSam Leffler uint32_t is_rx_assoc_notauth; /* rx assoc w/o auth */ 12668e8e04eSSam Leffler uint32_t is_rx_assoc_capmismatch;/* rx assoc w/ cap mismatch */ 12768e8e04eSSam Leffler uint32_t is_rx_assoc_norate; /* rx assoc w/ no rate match */ 12868e8e04eSSam Leffler uint32_t is_rx_assoc_badwpaie; /* rx assoc w/ bad WPA IE */ 12968e8e04eSSam Leffler uint32_t is_rx_deauth; /* rx deauthentication */ 13068e8e04eSSam Leffler uint32_t is_rx_disassoc; /* rx disassociation */ 13168e8e04eSSam Leffler uint32_t is_rx_badsubtype; /* rx frame w/ unknown subtype*/ 13268e8e04eSSam Leffler uint32_t is_rx_nobuf; /* rx failed for lack of buf */ 13368e8e04eSSam Leffler uint32_t is_rx_decryptcrc; /* rx decrypt failed on crc */ 13468e8e04eSSam Leffler uint32_t is_rx_ahdemo_mgt; /* rx discard ahdemo mgt frame*/ 13568e8e04eSSam Leffler uint32_t is_rx_bad_auth; /* rx bad auth request */ 13668e8e04eSSam Leffler uint32_t is_rx_unauth; /* rx on unauthorized port */ 13768e8e04eSSam Leffler uint32_t is_rx_badkeyid; /* rx w/ incorrect keyid */ 13868e8e04eSSam Leffler uint32_t is_rx_ccmpreplay; /* rx seq# violation (CCMP) */ 13968e8e04eSSam Leffler uint32_t is_rx_ccmpformat; /* rx format bad (CCMP) */ 14068e8e04eSSam Leffler uint32_t is_rx_ccmpmic; /* rx MIC check failed (CCMP) */ 14168e8e04eSSam Leffler uint32_t is_rx_tkipreplay; /* rx seq# violation (TKIP) */ 14268e8e04eSSam Leffler uint32_t is_rx_tkipformat; /* rx format bad (TKIP) */ 14368e8e04eSSam Leffler uint32_t is_rx_tkipmic; /* rx MIC check failed (TKIP) */ 14468e8e04eSSam Leffler uint32_t is_rx_tkipicv; /* rx ICV check failed (TKIP) */ 14568e8e04eSSam Leffler uint32_t is_rx_badcipher; /* rx failed 'cuz key type */ 14668e8e04eSSam Leffler uint32_t is_rx_nocipherctx; /* rx failed 'cuz key !setup */ 14768e8e04eSSam Leffler uint32_t is_rx_acl; /* rx discard 'cuz acl policy */ 14868e8e04eSSam Leffler uint32_t is_tx_nobuf; /* tx failed for lack of buf */ 14968e8e04eSSam Leffler uint32_t is_tx_nonode; /* tx failed for no node */ 15068e8e04eSSam Leffler uint32_t is_tx_unknownmgt; /* tx of unknown mgt frame */ 15168e8e04eSSam Leffler uint32_t is_tx_badcipher; /* tx failed 'cuz key type */ 15268e8e04eSSam Leffler uint32_t is_tx_nodefkey; /* tx failed 'cuz no defkey */ 15368e8e04eSSam Leffler uint32_t is_tx_noheadroom; /* tx failed 'cuz no space */ 15468e8e04eSSam Leffler uint32_t is_tx_fragframes; /* tx frames fragmented */ 15568e8e04eSSam Leffler uint32_t is_tx_frags; /* tx fragments created */ 15668e8e04eSSam Leffler uint32_t is_scan_active; /* active scans started */ 15768e8e04eSSam Leffler uint32_t is_scan_passive; /* passive scans started */ 15868e8e04eSSam Leffler uint32_t is_node_timeout; /* nodes timed out inactivity */ 15968e8e04eSSam Leffler uint32_t is_crypto_nomem; /* no memory for crypto ctx */ 16068e8e04eSSam Leffler uint32_t is_crypto_tkip; /* tkip crypto done in s/w */ 16168e8e04eSSam Leffler uint32_t is_crypto_tkipenmic; /* tkip en-MIC done in s/w */ 16268e8e04eSSam Leffler uint32_t is_crypto_tkipdemic; /* tkip de-MIC done in s/w */ 16368e8e04eSSam Leffler uint32_t is_crypto_tkipcm; /* tkip counter measures */ 16468e8e04eSSam Leffler uint32_t is_crypto_ccmp; /* ccmp crypto done in s/w */ 16568e8e04eSSam Leffler uint32_t is_crypto_wep; /* wep crypto done in s/w */ 16668e8e04eSSam Leffler uint32_t is_crypto_setkey_cipher;/* cipher rejected key */ 16768e8e04eSSam Leffler uint32_t is_crypto_setkey_nokey; /* no key index for setkey */ 16868e8e04eSSam Leffler uint32_t is_crypto_delkey; /* driver key delete failed */ 16968e8e04eSSam Leffler uint32_t is_crypto_badcipher; /* unknown cipher */ 17068e8e04eSSam Leffler uint32_t is_crypto_nocipher; /* cipher not available */ 17168e8e04eSSam Leffler uint32_t is_crypto_attachfail; /* cipher attach failed */ 17268e8e04eSSam Leffler uint32_t is_crypto_swfallback; /* cipher fallback to s/w */ 17368e8e04eSSam Leffler uint32_t is_crypto_keyfail; /* driver key alloc failed */ 17468e8e04eSSam Leffler uint32_t is_crypto_enmicfail; /* en-MIC failed */ 17568e8e04eSSam Leffler uint32_t is_ibss_capmismatch; /* merge failed-cap mismatch */ 17668e8e04eSSam Leffler uint32_t is_ibss_norate; /* merge failed-rate mismatch */ 17768e8e04eSSam Leffler uint32_t is_ps_unassoc; /* ps-poll for unassoc. sta */ 17868e8e04eSSam Leffler uint32_t is_ps_badaid; /* ps-poll w/ incorrect aid */ 17968e8e04eSSam Leffler uint32_t is_ps_qempty; /* ps-poll w/ nothing to send */ 18068e8e04eSSam Leffler uint32_t is_ff_badhdr; /* fast frame rx'd w/ bad hdr */ 18168e8e04eSSam Leffler uint32_t is_ff_tooshort; /* fast frame rx decap error */ 18268e8e04eSSam Leffler uint32_t is_ff_split; /* fast frame rx split error */ 18368e8e04eSSam Leffler uint32_t is_ff_decap; /* fast frames decap'd */ 18468e8e04eSSam Leffler uint32_t is_ff_encap; /* fast frames encap'd for tx */ 18568e8e04eSSam Leffler uint32_t is_rx_badbintval; /* rx frame w/ bogus bintval */ 18668e8e04eSSam Leffler uint32_t is_rx_demicfail; /* rx demic failed */ 18768e8e04eSSam Leffler uint32_t is_rx_defrag; /* rx defragmentation failed */ 18868e8e04eSSam Leffler uint32_t is_rx_mgmt; /* rx management frames */ 18968e8e04eSSam Leffler uint32_t is_rx_action; /* rx action mgt frames */ 19068e8e04eSSam Leffler uint32_t is_amsdu_tooshort; /* A-MSDU rx decap error */ 19168e8e04eSSam Leffler uint32_t is_amsdu_split; /* A-MSDU rx split error */ 19268e8e04eSSam Leffler uint32_t is_amsdu_decap; /* A-MSDU decap'd */ 19368e8e04eSSam Leffler uint32_t is_amsdu_encap; /* A-MSDU encap'd for tx */ 19468e8e04eSSam Leffler uint32_t is_ampdu_bar_bad; /* A-MPDU BAR out of window */ 19568e8e04eSSam Leffler uint32_t is_ampdu_bar_oow; /* A-MPDU BAR before ADDBA */ 1961b6167d2SSam Leffler uint32_t is_ampdu_bar_move; /* A-MPDU BAR moved window */ 19768e8e04eSSam Leffler uint32_t is_ampdu_bar_rx; /* A-MPDU BAR frames handled */ 19868e8e04eSSam Leffler uint32_t is_ampdu_rx_flush; /* A-MPDU frames flushed */ 19968e8e04eSSam Leffler uint32_t is_ampdu_rx_oor; /* A-MPDU frames out-of-order */ 20068e8e04eSSam Leffler uint32_t is_ampdu_rx_copy; /* A-MPDU frames copied down */ 2011b6167d2SSam Leffler uint32_t is_ampdu_rx_drop; /* A-MPDU frames dropped */ 2021b6167d2SSam Leffler uint32_t is_tx_badstate; /* tx discard state != RUN */ 2031b6167d2SSam Leffler uint32_t is_tx_notassoc; /* tx failed, sta not assoc */ 2041b6167d2SSam Leffler uint32_t is_tx_classify; /* tx classification failed */ 205b032f27cSSam Leffler uint32_t is_dwds_mcast; /* discard mcast over dwds */ 206b032f27cSSam Leffler uint32_t is_dwds_qdrop; /* dwds pending frame q full */ 2071b6167d2SSam Leffler uint32_t is_ht_assoc_nohtcap; /* non-HT sta rejected */ 2081b6167d2SSam Leffler uint32_t is_ht_assoc_downgrade; /* HT sta forced to legacy */ 2091b6167d2SSam Leffler uint32_t is_ht_assoc_norate; /* HT assoc w/ rate mismatch */ 2101b6167d2SSam Leffler uint32_t is_ampdu_rx_age; /* A-MPDU sent up 'cuz of age */ 2111b6167d2SSam Leffler uint32_t is_ampdu_rx_move; /* A-MPDU MSDU moved window */ 2121b6167d2SSam Leffler uint32_t is_addba_reject; /* ADDBA reject 'cuz disabled */ 2131b6167d2SSam Leffler uint32_t is_addba_norequest; /* ADDBA response w/o ADDBA */ 2141b6167d2SSam Leffler uint32_t is_addba_badtoken; /* ADDBA response w/ wrong 2151b6167d2SSam Leffler dialogtoken */ 216eaff8e26SSam Leffler uint32_t is_addba_badpolicy; /* ADDBA resp w/ wrong policy */ 2171b6167d2SSam Leffler uint32_t is_ampdu_stop; /* A-MPDU stream stopped */ 2181b6167d2SSam Leffler uint32_t is_ampdu_stop_failed; /* A-MPDU stream not running */ 2191b6167d2SSam Leffler uint32_t is_ampdu_rx_reorder; /* A-MPDU held for rx reorder */ 220b032f27cSSam Leffler uint32_t is_scan_bg; /* background scans started */ 221b032f27cSSam Leffler uint8_t is_rx_deauth_code; /* last rx'd deauth reason */ 222b032f27cSSam Leffler uint8_t is_rx_disassoc_code; /* last rx'd disassoc reason */ 223b032f27cSSam Leffler uint8_t is_rx_authfail_code; /* last rx'd auth fail reason */ 224b032f27cSSam Leffler uint32_t is_beacon_miss; /* beacon miss notification */ 22510ad9a77SSam Leffler uint32_t is_rx_badstate; /* rx discard state != RUN */ 226339ccfb3SSam Leffler uint32_t is_ff_flush; /* ff's flush'd from stageq */ 227a43cee70SSam Leffler uint32_t is_tx_ctl; /* tx ctrl frames */ 228a43cee70SSam Leffler uint32_t is_ampdu_rexmt; /* A-MPDU frames rexmt ok */ 229a43cee70SSam Leffler uint32_t is_ampdu_rexmt_fail; /* A-MPDU frames rexmt fail */ 23059aa14a9SRui Paulo 23159aa14a9SRui Paulo uint32_t is_mesh_wrongmesh; /* dropped 'cuz not mesh sta*/ 23259aa14a9SRui Paulo uint32_t is_mesh_nolink; /* dropped 'cuz link not estab*/ 23359aa14a9SRui Paulo uint32_t is_mesh_fwd_ttl; /* mesh not fwd'd 'cuz ttl 0 */ 23459aa14a9SRui Paulo uint32_t is_mesh_fwd_nobuf; /* mesh not fwd'd 'cuz no mbuf*/ 23559aa14a9SRui Paulo uint32_t is_mesh_fwd_tooshort; /* mesh not fwd'd 'cuz no hdr */ 23659aa14a9SRui Paulo uint32_t is_mesh_fwd_disabled; /* mesh not fwd'd 'cuz disabled */ 23759aa14a9SRui Paulo uint32_t is_mesh_fwd_nopath; /* mesh not fwd'd 'cuz path unknown */ 23859aa14a9SRui Paulo 23959aa14a9SRui Paulo uint32_t is_hwmp_wrongseq; /* wrong hwmp seq no. */ 24059aa14a9SRui Paulo uint32_t is_hwmp_rootreqs; /* root PREQs sent */ 24159aa14a9SRui Paulo uint32_t is_hwmp_rootrann; /* root RANNs sent */ 242c104cff2SRui Paulo 243c104cff2SRui Paulo uint32_t is_mesh_badae; /* dropped 'cuz invalid AE */ 244c104cff2SRui Paulo uint32_t is_mesh_rtaddfailed; /* route add failed */ 245c104cff2SRui Paulo uint32_t is_mesh_notproxy; /* dropped 'cuz not proxying */ 246519f677aSSam Leffler uint32_t is_rx_badalign; /* dropped 'cuz misaligned */ 2473ca80f0dSRui Paulo uint32_t is_hwmp_proxy; /* PREP for proxy route */ 248fd9a6137SAdrian Chadd uint32_t is_beacon_bad; /* Number of bad beacons */ 249fcacf931SAdrian Chadd uint32_t is_ampdu_bar_tx; /* A-MPDU BAR frames TXed */ 250fcacf931SAdrian Chadd uint32_t is_ampdu_bar_tx_retry; /* A-MPDU BAR frames TX rtry */ 251fcacf931SAdrian Chadd uint32_t is_ampdu_bar_tx_fail; /* A-MPDU BAR frames TX fail */ 25259aa14a9SRui Paulo 253ef860a91SAdrian Chadd uint32_t is_ff_encapfail; /* failed FF encap */ 254ef860a91SAdrian Chadd uint32_t is_amsdu_encapfail; /* failed A-MSDU encap */ 255ef860a91SAdrian Chadd 256ef860a91SAdrian Chadd uint32_t is_spare[5]; 2571be50176SSam Leffler }; 2581be50176SSam Leffler 2598a1b9b6aSSam Leffler /* 2608a1b9b6aSSam Leffler * Max size of optional information elements. We artificially 2618a1b9b6aSSam Leffler * constrain this; it's limited only by the max frame size (and 2628a1b9b6aSSam Leffler * the max parameter size of the wireless extensions). 2638a1b9b6aSSam Leffler */ 2648a1b9b6aSSam Leffler #define IEEE80211_MAX_OPT_IE 256 2658a1b9b6aSSam Leffler 2668a1b9b6aSSam Leffler /* 2678a1b9b6aSSam Leffler * WPA/RSN get/set key request. Specify the key/cipher 2688a1b9b6aSSam Leffler * type and whether the key is to be used for sending and/or 2698a1b9b6aSSam Leffler * receiving. The key index should be set only when working 2708a1b9b6aSSam Leffler * with global keys (use IEEE80211_KEYIX_NONE for ``no index''). 2718a1b9b6aSSam Leffler * Otherwise a unicast/pairwise key is specified by the bssid 2728a1b9b6aSSam Leffler * (on a station) or mac address (on an ap). They key length 2738a1b9b6aSSam Leffler * must include any MIC key data; otherwise it should be no 2741b6167d2SSam Leffler * more than IEEE80211_KEYBUF_SIZE. 2758a1b9b6aSSam Leffler */ 2768a1b9b6aSSam Leffler struct ieee80211req_key { 27768e8e04eSSam Leffler uint8_t ik_type; /* key/cipher type */ 27868e8e04eSSam Leffler uint8_t ik_pad; 27968e8e04eSSam Leffler uint16_t ik_keyix; /* key index */ 28068e8e04eSSam Leffler uint8_t ik_keylen; /* key length in bytes */ 28168e8e04eSSam Leffler uint8_t ik_flags; 2828a1b9b6aSSam Leffler /* NB: IEEE80211_KEY_XMIT and IEEE80211_KEY_RECV defined elsewhere */ 2838a1b9b6aSSam Leffler #define IEEE80211_KEY_DEFAULT 0x80 /* default xmit key */ 28468e8e04eSSam Leffler uint8_t ik_macaddr[IEEE80211_ADDR_LEN]; 28568e8e04eSSam Leffler uint64_t ik_keyrsc; /* key receive sequence counter */ 28668e8e04eSSam Leffler uint64_t ik_keytsc; /* key transmit sequence counter */ 28768e8e04eSSam Leffler uint8_t ik_keydata[IEEE80211_KEYBUF_SIZE+IEEE80211_MICBUF_SIZE]; 2888a1b9b6aSSam Leffler }; 2898a1b9b6aSSam Leffler 2908a1b9b6aSSam Leffler /* 2918a1b9b6aSSam Leffler * Delete a key either by index or address. Set the index 2928a1b9b6aSSam Leffler * to IEEE80211_KEYIX_NONE when deleting a unicast key. 2938a1b9b6aSSam Leffler */ 2948a1b9b6aSSam Leffler struct ieee80211req_del_key { 29568e8e04eSSam Leffler uint8_t idk_keyix; /* key index */ 29668e8e04eSSam Leffler uint8_t idk_macaddr[IEEE80211_ADDR_LEN]; 2978a1b9b6aSSam Leffler }; 2988a1b9b6aSSam Leffler 2998a1b9b6aSSam Leffler /* 3008a1b9b6aSSam Leffler * MLME state manipulation request. IEEE80211_MLME_ASSOC 3018a1b9b6aSSam Leffler * only makes sense when operating as a station. The other 3028a1b9b6aSSam Leffler * requests can be used when operating as a station or an 3038a1b9b6aSSam Leffler * ap (to effect a station). 3048a1b9b6aSSam Leffler */ 3058a1b9b6aSSam Leffler struct ieee80211req_mlme { 30668e8e04eSSam Leffler uint8_t im_op; /* operation to perform */ 3078a1b9b6aSSam Leffler #define IEEE80211_MLME_ASSOC 1 /* associate station */ 3088a1b9b6aSSam Leffler #define IEEE80211_MLME_DISASSOC 2 /* disassociate station */ 3098a1b9b6aSSam Leffler #define IEEE80211_MLME_DEAUTH 3 /* deauthenticate station */ 3108a1b9b6aSSam Leffler #define IEEE80211_MLME_AUTHORIZE 4 /* authorize station */ 3118a1b9b6aSSam Leffler #define IEEE80211_MLME_UNAUTHORIZE 5 /* unauthorize station */ 312b032f27cSSam Leffler #define IEEE80211_MLME_AUTH 6 /* authenticate station */ 31368e8e04eSSam Leffler uint8_t im_ssid_len; /* length of optional ssid */ 31468e8e04eSSam Leffler uint16_t im_reason; /* 802.11 reason code */ 31568e8e04eSSam Leffler uint8_t im_macaddr[IEEE80211_ADDR_LEN]; 31668e8e04eSSam Leffler uint8_t im_ssid[IEEE80211_NWID_LEN]; 3178a1b9b6aSSam Leffler }; 3188a1b9b6aSSam Leffler 3198a1b9b6aSSam Leffler /* 3208a1b9b6aSSam Leffler * MAC ACL operations. 3218a1b9b6aSSam Leffler */ 3228a1b9b6aSSam Leffler enum { 3238a1b9b6aSSam Leffler IEEE80211_MACCMD_POLICY_OPEN = 0, /* set policy: no ACL's */ 3248a1b9b6aSSam Leffler IEEE80211_MACCMD_POLICY_ALLOW = 1, /* set policy: allow traffic */ 3258a1b9b6aSSam Leffler IEEE80211_MACCMD_POLICY_DENY = 2, /* set policy: deny traffic */ 3268a1b9b6aSSam Leffler IEEE80211_MACCMD_FLUSH = 3, /* flush ACL database */ 3278a1b9b6aSSam Leffler IEEE80211_MACCMD_DETACH = 4, /* detach ACL policy */ 328188757f5SSam Leffler IEEE80211_MACCMD_POLICY = 5, /* get ACL policy */ 329188757f5SSam Leffler IEEE80211_MACCMD_LIST = 6, /* get ACL database */ 330b032f27cSSam Leffler IEEE80211_MACCMD_POLICY_RADIUS = 7, /* set policy: RADIUS managed */ 331188757f5SSam Leffler }; 332188757f5SSam Leffler 333188757f5SSam Leffler struct ieee80211req_maclist { 33468e8e04eSSam Leffler uint8_t ml_macaddr[IEEE80211_ADDR_LEN]; 3358b10ecb6SSam Leffler } __packed; 3368a1b9b6aSSam Leffler 3378a1b9b6aSSam Leffler /* 33859aa14a9SRui Paulo * Mesh Routing Table Operations. 33959aa14a9SRui Paulo */ 34059aa14a9SRui Paulo enum { 34159aa14a9SRui Paulo IEEE80211_MESH_RTCMD_LIST = 0, /* list HWMP routing table */ 34259aa14a9SRui Paulo IEEE80211_MESH_RTCMD_FLUSH = 1, /* flush HWMP routing table */ 34359aa14a9SRui Paulo IEEE80211_MESH_RTCMD_ADD = 2, /* add entry to the table */ 34459aa14a9SRui Paulo IEEE80211_MESH_RTCMD_DELETE = 3, /* delete an entry from the table */ 34559aa14a9SRui Paulo }; 34659aa14a9SRui Paulo 347c104cff2SRui Paulo struct ieee80211req_mesh_route { 3482b80a340SRui Paulo uint8_t imr_flags; 34947451c66SMonthadar Al Jaberi #define IEEE80211_MESHRT_FLAGS_DISCOVER 0x01 35047451c66SMonthadar Al Jaberi #define IEEE80211_MESHRT_FLAGS_VALID 0x02 35147451c66SMonthadar Al Jaberi #define IEEE80211_MESHRT_FLAGS_PROXY 0x04 352e1373e86SMonthadar Al Jaberi #define IEEE80211_MESHRT_FLAGS_GATE 0x08 35353541ce4SRui Paulo uint8_t imr_dest[IEEE80211_ADDR_LEN]; 35453541ce4SRui Paulo uint8_t imr_nexthop[IEEE80211_ADDR_LEN]; 35553541ce4SRui Paulo uint16_t imr_nhops; 3563ca80f0dSRui Paulo uint8_t imr_pad; 357c104cff2SRui Paulo uint32_t imr_metric; 358c104cff2SRui Paulo uint32_t imr_lifetime; 359c104cff2SRui Paulo uint32_t imr_lastmseq; 360c104cff2SRui Paulo }; 361c104cff2SRui Paulo 36259aa14a9SRui Paulo /* 36359aa14a9SRui Paulo * HWMP root modes 36459aa14a9SRui Paulo */ 36559aa14a9SRui Paulo enum { 36659aa14a9SRui Paulo IEEE80211_HWMP_ROOTMODE_DISABLED = 0, /* disabled */ 36759aa14a9SRui Paulo IEEE80211_HWMP_ROOTMODE_NORMAL = 1, /* normal PREPs */ 36859aa14a9SRui Paulo IEEE80211_HWMP_ROOTMODE_PROACTIVE = 2, /* proactive PREPS */ 36959aa14a9SRui Paulo IEEE80211_HWMP_ROOTMODE_RANN = 3, /* use RANN elemid */ 37059aa14a9SRui Paulo }; 37159aa14a9SRui Paulo 37259aa14a9SRui Paulo /* 3738658b18bSSam Leffler * Set the active channel list by IEEE channel #: each channel 3748658b18bSSam Leffler * to be marked active is set in a bit vector. Note this list is 3758658b18bSSam Leffler * intersected with the available channel list in calculating 3768658b18bSSam Leffler * the set of channels actually used in scanning. 3778a1b9b6aSSam Leffler */ 3788a1b9b6aSSam Leffler struct ieee80211req_chanlist { 3798658b18bSSam Leffler uint8_t ic_channels[32]; /* NB: can be variable length */ 3808a1b9b6aSSam Leffler }; 3818a1b9b6aSSam Leffler 3828a1b9b6aSSam Leffler /* 3838a1b9b6aSSam Leffler * Get the active channel list info. 3848a1b9b6aSSam Leffler */ 3858a1b9b6aSSam Leffler struct ieee80211req_chaninfo { 3868a1b9b6aSSam Leffler u_int ic_nchans; 3878658b18bSSam Leffler struct ieee80211_channel ic_chans[1]; /* NB: variable length */ 3888a1b9b6aSSam Leffler }; 3898658b18bSSam Leffler #define IEEE80211_CHANINFO_SIZE(_nchan) \ 3908658b18bSSam Leffler (sizeof(struct ieee80211req_chaninfo) + \ 3918658b18bSSam Leffler (((_nchan)-1) * sizeof(struct ieee80211_channel))) 3928658b18bSSam Leffler #define IEEE80211_CHANINFO_SPACE(_ci) \ 3938658b18bSSam Leffler IEEE80211_CHANINFO_SIZE((_ci)->ic_nchans) 3948a1b9b6aSSam Leffler 3958a1b9b6aSSam Leffler /* 3968a1b9b6aSSam Leffler * Retrieve the WPA/RSN information element for an associated station. 3978a1b9b6aSSam Leffler */ 39868e8e04eSSam Leffler struct ieee80211req_wpaie { /* old version w/ only one ie */ 39968e8e04eSSam Leffler uint8_t wpa_macaddr[IEEE80211_ADDR_LEN]; 40068e8e04eSSam Leffler uint8_t wpa_ie[IEEE80211_MAX_OPT_IE]; 40168e8e04eSSam Leffler }; 40268e8e04eSSam Leffler struct ieee80211req_wpaie2 { 40368e8e04eSSam Leffler uint8_t wpa_macaddr[IEEE80211_ADDR_LEN]; 40468e8e04eSSam Leffler uint8_t wpa_ie[IEEE80211_MAX_OPT_IE]; 40568e8e04eSSam Leffler uint8_t rsn_ie[IEEE80211_MAX_OPT_IE]; 4068a1b9b6aSSam Leffler }; 4078a1b9b6aSSam Leffler 4088a1b9b6aSSam Leffler /* 4098a1b9b6aSSam Leffler * Retrieve per-node statistics. 4108a1b9b6aSSam Leffler */ 4118a1b9b6aSSam Leffler struct ieee80211req_sta_stats { 4128a1b9b6aSSam Leffler union { 4138a1b9b6aSSam Leffler /* NB: explicitly force 64-bit alignment */ 41468e8e04eSSam Leffler uint8_t macaddr[IEEE80211_ADDR_LEN]; 41568e8e04eSSam Leffler uint64_t pad; 4168a1b9b6aSSam Leffler } is_u; 4178a1b9b6aSSam Leffler struct ieee80211_nodestats is_stats; 4188a1b9b6aSSam Leffler }; 4198a1b9b6aSSam Leffler 4208a1b9b6aSSam Leffler /* 4218a1b9b6aSSam Leffler * Station information block; the mac address is used 4228a1b9b6aSSam Leffler * to retrieve other data like stats, unicast key, etc. 4238a1b9b6aSSam Leffler */ 4248a1b9b6aSSam Leffler struct ieee80211req_sta_info { 425b032f27cSSam Leffler uint16_t isi_len; /* total length (mult of 4) */ 42668e8e04eSSam Leffler uint16_t isi_ie_off; /* offset to IE data */ 42768e8e04eSSam Leffler uint16_t isi_ie_len; /* IE length */ 42868e8e04eSSam Leffler uint16_t isi_freq; /* MHz */ 429cd9a2dabSSam Leffler uint32_t isi_flags; /* channel flags */ 4304fbdba95SSam Leffler uint32_t isi_state; /* state flags */ 43168e8e04eSSam Leffler uint8_t isi_authmode; /* authentication algorithm */ 432d1c85daeSSam Leffler int8_t isi_rssi; /* receive signal strength */ 433d1c85daeSSam Leffler int8_t isi_noise; /* noise floor */ 43468e8e04eSSam Leffler uint8_t isi_capinfo; /* capabilities */ 43568e8e04eSSam Leffler uint8_t isi_erp; /* ERP element */ 43668e8e04eSSam Leffler uint8_t isi_macaddr[IEEE80211_ADDR_LEN]; 43768e8e04eSSam Leffler uint8_t isi_nrates; 43868e8e04eSSam Leffler /* negotiated rates */ 43968e8e04eSSam Leffler uint8_t isi_rates[IEEE80211_RATE_MAXSIZE]; 440b032f27cSSam Leffler uint8_t isi_txrate; /* legacy/IEEE rate or MCS */ 44168e8e04eSSam Leffler uint16_t isi_associd; /* assoc response */ 44268e8e04eSSam Leffler uint16_t isi_txpower; /* current tx power */ 44368e8e04eSSam Leffler uint16_t isi_vlan; /* vlan tag */ 444b337fbc4SSam Leffler /* NB: [IEEE80211_NONQOS_TID] holds seq#'s for non-QoS stations */ 445b337fbc4SSam Leffler uint16_t isi_txseqs[IEEE80211_TID_SIZE];/* tx seq #/TID */ 446b337fbc4SSam Leffler uint16_t isi_rxseqs[IEEE80211_TID_SIZE];/* rx seq#/TID */ 44768e8e04eSSam Leffler uint16_t isi_inact; /* inactivity timer */ 448b032f27cSSam Leffler uint16_t isi_txmbps; /* current tx rate in .5 Mb/s */ 4494fbdba95SSam Leffler uint16_t isi_pad; 450b032f27cSSam Leffler uint32_t isi_jointime; /* time of assoc/join */ 451b032f27cSSam Leffler struct ieee80211_mimo_info isi_mimo; /* MIMO info for 11n sta's */ 45259aa14a9SRui Paulo /* 11s info */ 45359aa14a9SRui Paulo uint16_t isi_peerid; 45459aa14a9SRui Paulo uint16_t isi_localid; 45559aa14a9SRui Paulo uint8_t isi_peerstate; 4568a1b9b6aSSam Leffler /* XXX frag state? */ 4578a1b9b6aSSam Leffler /* variable length IE data */ 4588a1b9b6aSSam Leffler }; 4598a1b9b6aSSam Leffler 4608a1b9b6aSSam Leffler /* 4618a1b9b6aSSam Leffler * Retrieve per-station information; to retrieve all 4628a1b9b6aSSam Leffler * specify a mac address of ff:ff:ff:ff:ff:ff. 4638a1b9b6aSSam Leffler */ 4648a1b9b6aSSam Leffler struct ieee80211req_sta_req { 4658a1b9b6aSSam Leffler union { 4668a1b9b6aSSam Leffler /* NB: explicitly force 64-bit alignment */ 46768e8e04eSSam Leffler uint8_t macaddr[IEEE80211_ADDR_LEN]; 46868e8e04eSSam Leffler uint64_t pad; 4698a1b9b6aSSam Leffler } is_u; 4708a1b9b6aSSam Leffler struct ieee80211req_sta_info info[1]; /* variable length */ 4718a1b9b6aSSam Leffler }; 4728a1b9b6aSSam Leffler 4738a1b9b6aSSam Leffler /* 4748a1b9b6aSSam Leffler * Get/set per-station tx power cap. 4758a1b9b6aSSam Leffler */ 4768a1b9b6aSSam Leffler struct ieee80211req_sta_txpow { 47768e8e04eSSam Leffler uint8_t it_macaddr[IEEE80211_ADDR_LEN]; 47868e8e04eSSam Leffler uint8_t it_txpow; 4798a1b9b6aSSam Leffler }; 4808a1b9b6aSSam Leffler 4818a1b9b6aSSam Leffler /* 482b032f27cSSam Leffler * WME parameters manipulated with IEEE80211_IOC_WME_CWMIN 483b032f27cSSam Leffler * through IEEE80211_IOC_WME_ACKPOLICY are set and return 484b032f27cSSam Leffler * using i_val and i_len. i_val holds the value itself. 485b032f27cSSam Leffler * i_len specifies the AC and, as appropriate, then high bit 486b032f27cSSam Leffler * specifies whether the operation is to be applied to the 487b032f27cSSam Leffler * BSS or ourself. 4888a1b9b6aSSam Leffler */ 4898a1b9b6aSSam Leffler #define IEEE80211_WMEPARAM_SELF 0x0000 /* parameter applies to self */ 4908a1b9b6aSSam Leffler #define IEEE80211_WMEPARAM_BSS 0x8000 /* parameter applies to BSS */ 4918a1b9b6aSSam Leffler #define IEEE80211_WMEPARAM_VAL 0x7fff /* parameter value */ 4928a1b9b6aSSam Leffler 493b032f27cSSam Leffler /* 494b032f27cSSam Leffler * Application Information Elements can be appended to a variety 495b032f27cSSam Leffler * of frames with the IEE80211_IOC_APPIE request. This request 496b032f27cSSam Leffler * piggybacks on a normal ieee80211req; the frame type is passed 497b032f27cSSam Leffler * in i_val as the 802.11 FC0 bytes and the length of the IE data 498b032f27cSSam Leffler * is passed in i_len. The data is referenced in i_data. If i_len 499b032f27cSSam Leffler * is zero then any previously configured IE data is removed. At 500b032f27cSSam Leffler * most IEEE80211_MAX_APPIE data be appened. Note that multiple 501b032f27cSSam Leffler * IE's can be supplied; the data is treated opaquely. 502b032f27cSSam Leffler */ 503b032f27cSSam Leffler #define IEEE80211_MAX_APPIE 1024 /* max app IE data */ 504b032f27cSSam Leffler /* 505b032f27cSSam Leffler * Hack: the WPA authenticator uses this mechanism to specify WPA 506b032f27cSSam Leffler * ie's that are used instead of the ones normally constructed using 507b032f27cSSam Leffler * the cipher state setup with separate ioctls. This avoids issues 508b032f27cSSam Leffler * like the authenticator ordering ie data differently than the 509b032f27cSSam Leffler * net80211 layer and needing to keep separate state for WPA and RSN. 510b032f27cSSam Leffler */ 511b032f27cSSam Leffler #define IEEE80211_APPIE_WPA \ 512b032f27cSSam Leffler (IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_BEACON | \ 513b032f27cSSam Leffler IEEE80211_FC0_SUBTYPE_PROBE_RESP) 514b032f27cSSam Leffler 515b032f27cSSam Leffler /* 516b032f27cSSam Leffler * Station mode roaming parameters. These are maintained 517b032f27cSSam Leffler * per band/mode and control the roaming algorithm. 518b032f27cSSam Leffler */ 519b032f27cSSam Leffler struct ieee80211_roamparams_req { 520b032f27cSSam Leffler struct ieee80211_roamparam params[IEEE80211_MODE_MAX]; 521b032f27cSSam Leffler }; 522b032f27cSSam Leffler 523b032f27cSSam Leffler /* 524b032f27cSSam Leffler * Transmit parameters. These can be used to set fixed transmit 525b032f27cSSam Leffler * rate for each operating mode when operating as client or on a 526b032f27cSSam Leffler * per-client basis according to the capabilities of the client 527b032f27cSSam Leffler * (e.g. an 11b client associated to an 11g ap) when operating as 528b032f27cSSam Leffler * an ap. 529b032f27cSSam Leffler * 530b032f27cSSam Leffler * MCS are distinguished from legacy rates by or'ing in 0x80. 531b032f27cSSam Leffler */ 532b032f27cSSam Leffler struct ieee80211_txparams_req { 533b032f27cSSam Leffler struct ieee80211_txparam params[IEEE80211_MODE_MAX]; 534b032f27cSSam Leffler }; 535b032f27cSSam Leffler 536b032f27cSSam Leffler /* 537b032f27cSSam Leffler * Set regulatory domain state with IEEE80211_IOC_REGDOMAIN. 538b032f27cSSam Leffler * Note this is both the regulatory description and the channel 539b032f27cSSam Leffler * list. The get request for IEEE80211_IOC_REGDOMAIN returns 540b032f27cSSam Leffler * only the regdomain info; the channel list is obtained 541b032f27cSSam Leffler * separately with IEEE80211_IOC_CHANINFO. 542b032f27cSSam Leffler */ 543b032f27cSSam Leffler struct ieee80211_regdomain_req { 544b032f27cSSam Leffler struct ieee80211_regdomain rd; 545b032f27cSSam Leffler struct ieee80211req_chaninfo chaninfo; 546b032f27cSSam Leffler }; 5478658b18bSSam Leffler #define IEEE80211_REGDOMAIN_SIZE(_nchan) \ 5488658b18bSSam Leffler (sizeof(struct ieee80211_regdomain_req) + \ 5498658b18bSSam Leffler (((_nchan)-1) * sizeof(struct ieee80211_channel))) 5508658b18bSSam Leffler #define IEEE80211_REGDOMAIN_SPACE(_req) \ 5518658b18bSSam Leffler IEEE80211_REGDOMAIN_SIZE((_req)->chaninfo.ic_nchans) 552b032f27cSSam Leffler 553b032f27cSSam Leffler /* 554*1116e8b9SAdrian Chadd * Get driver capabilities. Driver, hardware/software crypto, and 555b032f27cSSam Leffler * HT/802.11n capabilities, and a table that describes what 556b032f27cSSam Leffler * the radio can do. 557b032f27cSSam Leffler */ 558b032f27cSSam Leffler struct ieee80211_devcaps_req { 559b032f27cSSam Leffler uint32_t dc_drivercaps; /* general driver caps */ 560*1116e8b9SAdrian Chadd uint32_t dc_cryptocaps; /* software + hardware crypto support */ 561b032f27cSSam Leffler uint32_t dc_htcaps; /* HT/802.11n support */ 56235bcfd1cSAdrian Chadd uint32_t dc_vhtcaps; /* VHT/802.11ac capabilities */ 563b032f27cSSam Leffler struct ieee80211req_chaninfo dc_chaninfo; 564b032f27cSSam Leffler }; 5658658b18bSSam Leffler #define IEEE80211_DEVCAPS_SIZE(_nchan) \ 5668658b18bSSam Leffler (sizeof(struct ieee80211_devcaps_req) + \ 5678658b18bSSam Leffler (((_nchan)-1) * sizeof(struct ieee80211_channel))) 5688658b18bSSam Leffler #define IEEE80211_DEVCAPS_SPACE(_dc) \ 5698658b18bSSam Leffler IEEE80211_DEVCAPS_SIZE((_dc)->dc_chaninfo.ic_nchans) 570b032f27cSSam Leffler 571b032f27cSSam Leffler struct ieee80211_chanswitch_req { 572b032f27cSSam Leffler struct ieee80211_channel csa_chan; /* new channel */ 573b032f27cSSam Leffler int csa_mode; /* CSA mode */ 574b032f27cSSam Leffler int csa_count; /* beacon count to switch */ 575b032f27cSSam Leffler }; 576b032f27cSSam Leffler 577b032f27cSSam Leffler /* 578b032f27cSSam Leffler * Get/set per-station vlan tag. 579b032f27cSSam Leffler */ 580b032f27cSSam Leffler struct ieee80211req_sta_vlan { 581b032f27cSSam Leffler uint8_t sv_macaddr[IEEE80211_ADDR_LEN]; 582b032f27cSSam Leffler uint16_t sv_vlan; 583b032f27cSSam Leffler }; 584b032f27cSSam Leffler 5851a1e1d21SSam Leffler #ifdef __FreeBSD__ 5861a1e1d21SSam Leffler /* 5871a1e1d21SSam Leffler * FreeBSD-style ioctls. 5881a1e1d21SSam Leffler */ 5891a1e1d21SSam Leffler /* the first member must be matched with struct ifreq */ 5901a1e1d21SSam Leffler struct ieee80211req { 5911a1e1d21SSam Leffler char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */ 59268e8e04eSSam Leffler uint16_t i_type; /* req type */ 5931a1e1d21SSam Leffler int16_t i_val; /* Index or simple value */ 594db9ff08bSKevin Lo uint16_t i_len; /* Index or simple value */ 5951a1e1d21SSam Leffler void *i_data; /* Extra data */ 5961a1e1d21SSam Leffler }; 5971a1e1d21SSam Leffler #define SIOCS80211 _IOW('i', 234, struct ieee80211req) 5981a1e1d21SSam Leffler #define SIOCG80211 _IOWR('i', 235, struct ieee80211req) 59968e8e04eSSam Leffler #define SIOCG80211STATS _IOWR('i', 236, struct ifreq) 6001a1e1d21SSam Leffler 6011a1e1d21SSam Leffler #define IEEE80211_IOC_SSID 1 6021a1e1d21SSam Leffler #define IEEE80211_IOC_NUMSSIDS 2 6031a1e1d21SSam Leffler #define IEEE80211_IOC_WEP 3 6041a1e1d21SSam Leffler #define IEEE80211_WEP_NOSUP -1 6051a1e1d21SSam Leffler #define IEEE80211_WEP_OFF 0 6061a1e1d21SSam Leffler #define IEEE80211_WEP_ON 1 6071a1e1d21SSam Leffler #define IEEE80211_WEP_MIXED 2 6081a1e1d21SSam Leffler #define IEEE80211_IOC_WEPKEY 4 6091a1e1d21SSam Leffler #define IEEE80211_IOC_NUMWEPKEYS 5 6101a1e1d21SSam Leffler #define IEEE80211_IOC_WEPTXKEY 6 6111a1e1d21SSam Leffler #define IEEE80211_IOC_AUTHMODE 7 6121a1e1d21SSam Leffler #define IEEE80211_IOC_STATIONNAME 8 6131a1e1d21SSam Leffler #define IEEE80211_IOC_CHANNEL 9 6141a1e1d21SSam Leffler #define IEEE80211_IOC_POWERSAVE 10 6151a1e1d21SSam Leffler #define IEEE80211_POWERSAVE_NOSUP -1 6161a1e1d21SSam Leffler #define IEEE80211_POWERSAVE_OFF 0 6171a1e1d21SSam Leffler #define IEEE80211_POWERSAVE_CAM 1 6181a1e1d21SSam Leffler #define IEEE80211_POWERSAVE_PSP 2 6191a1e1d21SSam Leffler #define IEEE80211_POWERSAVE_PSP_CAM 3 6201a1e1d21SSam Leffler #define IEEE80211_POWERSAVE_ON IEEE80211_POWERSAVE_CAM 6211a1e1d21SSam Leffler #define IEEE80211_IOC_POWERSAVESLEEP 11 62213604e6bSSam Leffler #define IEEE80211_IOC_RTSTHRESHOLD 12 6232e79ca97SSam Leffler #define IEEE80211_IOC_PROTMODE 13 6242e79ca97SSam Leffler #define IEEE80211_PROTMODE_OFF 0 6252e79ca97SSam Leffler #define IEEE80211_PROTMODE_CTS 1 6262e79ca97SSam Leffler #define IEEE80211_PROTMODE_RTSCTS 2 6278a1b9b6aSSam Leffler #define IEEE80211_IOC_TXPOWER 14 /* global tx power limit */ 6288a1b9b6aSSam Leffler #define IEEE80211_IOC_BSSID 15 6298a1b9b6aSSam Leffler #define IEEE80211_IOC_ROAMING 16 /* roaming mode */ 6308a1b9b6aSSam Leffler #define IEEE80211_IOC_PRIVACY 17 /* privacy invoked */ 6318a1b9b6aSSam Leffler #define IEEE80211_IOC_DROPUNENCRYPTED 18 /* discard unencrypted frames */ 6328a1b9b6aSSam Leffler #define IEEE80211_IOC_WPAKEY 19 6338a1b9b6aSSam Leffler #define IEEE80211_IOC_DELKEY 20 6348a1b9b6aSSam Leffler #define IEEE80211_IOC_MLME 21 635b032f27cSSam Leffler /* 22 was IEEE80211_IOC_OPTIE, replaced by IEEE80211_IOC_APPIE */ 636b032f27cSSam Leffler /* 23 was IEEE80211_IOC_SCAN_REQ */ 637239cc3b6SSam Leffler /* 24 was IEEE80211_IOC_SCAN_RESULTS */ 6388a1b9b6aSSam Leffler #define IEEE80211_IOC_COUNTERMEASURES 25 /* WPA/TKIP countermeasures */ 6398a1b9b6aSSam Leffler #define IEEE80211_IOC_WPA 26 /* WPA mode (0,1,2) */ 6408a1b9b6aSSam Leffler #define IEEE80211_IOC_CHANLIST 27 /* channel list */ 6418a1b9b6aSSam Leffler #define IEEE80211_IOC_WME 28 /* WME mode (on, off) */ 6428a1b9b6aSSam Leffler #define IEEE80211_IOC_HIDESSID 29 /* hide SSID mode (on, off) */ 6438a1b9b6aSSam Leffler #define IEEE80211_IOC_APBRIDGE 30 /* AP inter-sta bridging */ 644b032f27cSSam Leffler /* 31-35,37-38 were for WPA authenticator settings */ 645b032f27cSSam Leffler /* 36 was IEEE80211_IOC_DRIVER_CAPS */ 6468a1b9b6aSSam Leffler #define IEEE80211_IOC_WPAIE 39 /* WPA information element */ 6478a1b9b6aSSam Leffler #define IEEE80211_IOC_STA_STATS 40 /* per-station statistics */ 6488a1b9b6aSSam Leffler #define IEEE80211_IOC_MACCMD 41 /* MAC ACL operation */ 6498a1b9b6aSSam Leffler #define IEEE80211_IOC_CHANINFO 42 /* channel info list */ 6508a1b9b6aSSam Leffler #define IEEE80211_IOC_TXPOWMAX 43 /* max tx power for channel */ 6518a1b9b6aSSam Leffler #define IEEE80211_IOC_STA_TXPOW 44 /* per-station tx power limit */ 652d1c85daeSSam Leffler /* 45 was IEEE80211_IOC_STA_INFO */ 6538a1b9b6aSSam Leffler #define IEEE80211_IOC_WME_CWMIN 46 /* WME: ECWmin */ 6548a1b9b6aSSam Leffler #define IEEE80211_IOC_WME_CWMAX 47 /* WME: ECWmax */ 6558a1b9b6aSSam Leffler #define IEEE80211_IOC_WME_AIFS 48 /* WME: AIFSN */ 6568a1b9b6aSSam Leffler #define IEEE80211_IOC_WME_TXOPLIMIT 49 /* WME: txops limit */ 6578a1b9b6aSSam Leffler #define IEEE80211_IOC_WME_ACM 50 /* WME: ACM (bss only) */ 6588a1b9b6aSSam Leffler #define IEEE80211_IOC_WME_ACKPOLICY 51 /* WME: ACK policy (!bss only)*/ 6598a1b9b6aSSam Leffler #define IEEE80211_IOC_DTIM_PERIOD 52 /* DTIM period (beacons) */ 6608a1b9b6aSSam Leffler #define IEEE80211_IOC_BEACON_INTERVAL 53 /* beacon interval (ms) */ 6618a1b9b6aSSam Leffler #define IEEE80211_IOC_ADDMAC 54 /* add sta to MAC ACL table */ 6628a1b9b6aSSam Leffler #define IEEE80211_IOC_DELMAC 55 /* del sta from MAC ACL table */ 663c4f040c3SSam Leffler #define IEEE80211_IOC_PUREG 56 /* pure 11g (no 11b stations) */ 66468e8e04eSSam Leffler #define IEEE80211_IOC_FF 57 /* ATH fast frames (on, off) */ 66568e8e04eSSam Leffler #define IEEE80211_IOC_TURBOP 58 /* ATH turbo' (on, off) */ 66668e8e04eSSam Leffler #define IEEE80211_IOC_BGSCAN 59 /* bg scanning (on, off) */ 66768e8e04eSSam Leffler #define IEEE80211_IOC_BGSCAN_IDLE 60 /* bg scan idle threshold */ 66868e8e04eSSam Leffler #define IEEE80211_IOC_BGSCAN_INTERVAL 61 /* bg scan interval */ 66968e8e04eSSam Leffler #define IEEE80211_IOC_SCANVALID 65 /* scan cache valid threshold */ 670b032f27cSSam Leffler /* 66-72 were IEEE80211_IOC_ROAM_* and IEEE80211_IOC_MCAST_RATE */ 67170231e3dSSam Leffler #define IEEE80211_IOC_FRAGTHRESHOLD 73 /* tx fragmentation threshold */ 672c27e4e31SSam Leffler #define IEEE80211_IOC_BURST 75 /* packet bursting */ 673239cc3b6SSam Leffler #define IEEE80211_IOC_SCAN_RESULTS 76 /* get scan results */ 674546786c9SSam Leffler #define IEEE80211_IOC_BMISSTHRESHOLD 77 /* beacon miss threshold */ 675d1c85daeSSam Leffler #define IEEE80211_IOC_STA_INFO 78 /* station/neighbor info */ 67668e8e04eSSam Leffler #define IEEE80211_IOC_WPAIE2 79 /* WPA+RSN info elements */ 67768e8e04eSSam Leffler #define IEEE80211_IOC_CURCHAN 80 /* current channel */ 67868e8e04eSSam Leffler #define IEEE80211_IOC_SHORTGI 81 /* 802.11n half GI */ 67968e8e04eSSam Leffler #define IEEE80211_IOC_AMPDU 82 /* 802.11n A-MPDU (on, off) */ 68068e8e04eSSam Leffler #define IEEE80211_IOC_AMPDU_LIMIT 83 /* A-MPDU length limit */ 68168e8e04eSSam Leffler #define IEEE80211_IOC_AMPDU_DENSITY 84 /* A-MPDU density */ 68268e8e04eSSam Leffler #define IEEE80211_IOC_AMSDU 85 /* 802.11n A-MSDU (on, off) */ 68368e8e04eSSam Leffler #define IEEE80211_IOC_AMSDU_LIMIT 86 /* A-MSDU length limit */ 68468e8e04eSSam Leffler #define IEEE80211_IOC_PUREN 87 /* pure 11n (no legacy sta's) */ 68568e8e04eSSam Leffler #define IEEE80211_IOC_DOTH 88 /* 802.11h (on, off) */ 686b032f27cSSam Leffler /* 89-91 were regulatory items */ 68768e8e04eSSam Leffler #define IEEE80211_IOC_HTCOMPAT 92 /* support pre-D1.10 HT ie's */ 688b032f27cSSam Leffler #define IEEE80211_IOC_DWDS 93 /* DWDS/4-address handling */ 689c066143cSSam Leffler #define IEEE80211_IOC_INACTIVITY 94 /* sta inactivity handling */ 690b032f27cSSam Leffler #define IEEE80211_IOC_APPIE 95 /* application IE's */ 691b032f27cSSam Leffler #define IEEE80211_IOC_WPS 96 /* WPS operation */ 692b032f27cSSam Leffler #define IEEE80211_IOC_TSN 97 /* TSN operation */ 693b032f27cSSam Leffler #define IEEE80211_IOC_DEVCAPS 98 /* driver+device capabilities */ 694b032f27cSSam Leffler #define IEEE80211_IOC_CHANSWITCH 99 /* start 11h channel switch */ 695b032f27cSSam Leffler #define IEEE80211_IOC_DFS 100 /* DFS (on, off) */ 696b032f27cSSam Leffler #define IEEE80211_IOC_DOTD 101 /* 802.11d (on, off) */ 6971b6167d2SSam Leffler #define IEEE80211_IOC_HTPROTMODE 102 /* HT protection (off, rts) */ 698b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_REQ 103 /* scan w/ specified params */ 699b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_CANCEL 104 /* cancel ongoing scan */ 7001b6167d2SSam Leffler #define IEEE80211_IOC_HTCONF 105 /* HT config (off, HT20, HT40)*/ 701b032f27cSSam Leffler #define IEEE80211_IOC_REGDOMAIN 106 /* regulatory domain info */ 702b032f27cSSam Leffler #define IEEE80211_IOC_ROAM 107 /* roaming params en masse */ 703b032f27cSSam Leffler #define IEEE80211_IOC_TXPARAMS 108 /* tx parameters */ 704b032f27cSSam Leffler #define IEEE80211_IOC_STA_VLAN 109 /* per-station vlan tag */ 7058c070d69SSam Leffler #define IEEE80211_IOC_SMPS 110 /* MIMO power save */ 70644f7a6edSSam Leffler #define IEEE80211_IOC_RIFS 111 /* RIFS config (on, off) */ 707da6e1ed3SSam Leffler #define IEEE80211_IOC_GREENFIELD 112 /* Greenfield (on, off) */ 708da6e1ed3SSam Leffler #define IEEE80211_IOC_STBC 113 /* STBC Tx/RX (on, off) */ 7091729922fSAdrian Chadd #define IEEE80211_IOC_LDPC 114 /* LDPC Tx/RX (on, off) */ 7108379e8dbSAdrian Chadd #define IEEE80211_IOC_UAPSD 115 /* UAPSD (on, off) */ 7118379e8dbSAdrian Chadd #define IEEE80211_IOC_UAPSD_INFO 116 /* UAPSD (SP, per-AC enable) */ 712b032f27cSSam Leffler 71335bcfd1cSAdrian Chadd /* VHT */ 71435bcfd1cSAdrian Chadd #define IEEE80211_IOC_VHTCONF 130 /* VHT config (off, on; widths) */ 71535bcfd1cSAdrian Chadd 71659aa14a9SRui Paulo #define IEEE80211_IOC_MESH_ID 170 /* mesh identifier */ 71759aa14a9SRui Paulo #define IEEE80211_IOC_MESH_AP 171 /* accepting peerings */ 71859aa14a9SRui Paulo #define IEEE80211_IOC_MESH_FWRD 172 /* forward frames */ 71959aa14a9SRui Paulo #define IEEE80211_IOC_MESH_PROTO 173 /* mesh protocols */ 72059aa14a9SRui Paulo #define IEEE80211_IOC_MESH_TTL 174 /* mesh TTL */ 72159aa14a9SRui Paulo #define IEEE80211_IOC_MESH_RTCMD 175 /* mesh routing table commands*/ 72259aa14a9SRui Paulo #define IEEE80211_IOC_MESH_PR_METRIC 176 /* mesh metric protocol */ 72359aa14a9SRui Paulo #define IEEE80211_IOC_MESH_PR_PATH 177 /* mesh path protocol */ 72459aa14a9SRui Paulo #define IEEE80211_IOC_MESH_PR_SIG 178 /* mesh sig protocol */ 72559aa14a9SRui Paulo #define IEEE80211_IOC_MESH_PR_CC 179 /* mesh congestion protocol */ 72659aa14a9SRui Paulo #define IEEE80211_IOC_MESH_PR_AUTH 180 /* mesh auth protocol */ 7279fc85253SMonthadar Al Jaberi #define IEEE80211_IOC_MESH_GATE 181 /* mesh gate XXX: 173? */ 72859aa14a9SRui Paulo 72959aa14a9SRui Paulo #define IEEE80211_IOC_HWMP_ROOTMODE 190 /* HWMP root mode */ 73059aa14a9SRui Paulo #define IEEE80211_IOC_HWMP_MAXHOPS 191 /* number of hops before drop */ 73159aa14a9SRui Paulo #define IEEE80211_IOC_HWMP_TTL 192 /* HWMP TTL */ 73259aa14a9SRui Paulo 73310ad9a77SSam Leffler #define IEEE80211_IOC_TDMA_SLOT 201 /* TDMA: assigned slot */ 73410ad9a77SSam Leffler #define IEEE80211_IOC_TDMA_SLOTCNT 202 /* TDMA: slots in bss */ 73510ad9a77SSam Leffler #define IEEE80211_IOC_TDMA_SLOTLEN 203 /* TDMA: slot length (usecs) */ 73610ad9a77SSam Leffler #define IEEE80211_IOC_TDMA_BINTERVAL 204 /* TDMA: beacon intvl (slots) */ 73710ad9a77SSam Leffler 73832b0e64bSAdrian Chadd #define IEEE80211_IOC_QUIET 205 /* Quiet Enable/Disable */ 73932b0e64bSAdrian Chadd #define IEEE80211_IOC_QUIET_PERIOD 206 /* Quiet Period */ 74032b0e64bSAdrian Chadd #define IEEE80211_IOC_QUIET_OFFSET 207 /* Quiet Offset */ 74132b0e64bSAdrian Chadd #define IEEE80211_IOC_QUIET_DUR 208 /* Quiet Duration */ 74232b0e64bSAdrian Chadd #define IEEE80211_IOC_QUIET_COUNT 209 /* Quiet Count */ 7437d1d4407SBjoern A. Zeeb 7447d1d4407SBjoern A. Zeeb #define IEEE80211_IOC_IC_NAME 210 /* HW device name. */ 7457d1d4407SBjoern A. Zeeb 746b032f27cSSam Leffler /* 747b032f27cSSam Leffler * Parameters for controlling a scan requested with 748b032f27cSSam Leffler * IEEE80211_IOC_SCAN_REQ. 749b032f27cSSam Leffler * 750b032f27cSSam Leffler * Active scans cause ProbeRequest frames to be issued for each 751b032f27cSSam Leffler * specified ssid and, by default, a broadcast ProbeRequest frame. 752b032f27cSSam Leffler * The set of ssid's is specified in the request. 753b032f27cSSam Leffler * 754b032f27cSSam Leffler * By default the scan will cause a BSS to be joined (in station/adhoc 755b032f27cSSam Leffler * mode) or a channel to be selected for operation (hostap mode). 756b032f27cSSam Leffler * To disable that specify IEEE80211_IOC_SCAN_NOPICK and if the 757b032f27cSSam Leffler * 758b032f27cSSam Leffler * If the station is currently associated to an AP then a scan request 759b032f27cSSam Leffler * will cause the station to leave the current channel and potentially 760b032f27cSSam Leffler * miss frames from the AP. Alternatively the station may notify the 761b032f27cSSam Leffler * AP that it is going into power save mode before it leaves the channel. 762b032f27cSSam Leffler * This ensures frames for the station are buffered by the AP. This is 763b032f27cSSam Leffler * termed a ``bg scan'' and is requested with the IEEE80211_IOC_SCAN_BGSCAN 764b032f27cSSam Leffler * flag. Background scans may take longer than foreground scans and may 765b032f27cSSam Leffler * be preempted by traffic. If a station is not associated to an AP 766b032f27cSSam Leffler * then a request for a background scan is automatically done in the 767b032f27cSSam Leffler * foreground. 768b032f27cSSam Leffler * 769b032f27cSSam Leffler * The results of the scan request are cached by the system. This 770b032f27cSSam Leffler * information is aged out and/or invalidated based on events like not 771b032f27cSSam Leffler * being able to associated to an AP. To flush the current cache 772b032f27cSSam Leffler * contents before doing a scan the IEEE80211_IOC_SCAN_FLUSH flag may 773b032f27cSSam Leffler * be specified. 774b032f27cSSam Leffler * 775b032f27cSSam Leffler * By default the scan will be done until a suitable AP is located 776b032f27cSSam Leffler * or a channel is found for use. A scan can also be constrained 777b032f27cSSam Leffler * to be done once (IEEE80211_IOC_SCAN_ONCE) or to last for no more 778b032f27cSSam Leffler * than a specified duration. 779b032f27cSSam Leffler */ 780b032f27cSSam Leffler struct ieee80211_scan_req { 781b032f27cSSam Leffler int sr_flags; 782b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_NOPICK 0x00001 /* scan only, no selection */ 783b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_ACTIVE 0x00002 /* active scan (probe req) */ 784b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_PICK1ST 0x00004 /* ``hey sailor'' mode */ 785b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_BGSCAN 0x00008 /* bg scan, exit ps at end */ 786b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_ONCE 0x00010 /* do one complete pass */ 787b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_NOBCAST 0x00020 /* don't send bcast probe req */ 788b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_NOJOIN 0x00040 /* no auto-sequencing */ 789b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_FLUSH 0x10000 /* flush scan cache first */ 790b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_CHECK 0x20000 /* check scan cache first */ 791b032f27cSSam Leffler u_int sr_duration; /* duration (ms) */ 792b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_DURATION_MIN 1 793b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_DURATION_MAX 0x7fffffff 794b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_FOREVER IEEE80211_IOC_SCAN_DURATION_MAX 795b032f27cSSam Leffler u_int sr_mindwell; /* min channel dwelltime (ms) */ 796b032f27cSSam Leffler u_int sr_maxdwell; /* max channel dwelltime (ms) */ 797b032f27cSSam Leffler int sr_nssid; 798b032f27cSSam Leffler #define IEEE80211_IOC_SCAN_MAX_SSID 3 799b032f27cSSam Leffler struct { 800b032f27cSSam Leffler int len; /* length in bytes */ 801b032f27cSSam Leffler uint8_t ssid[IEEE80211_NWID_LEN]; /* ssid contents */ 802b032f27cSSam Leffler } sr_ssid[IEEE80211_IOC_SCAN_MAX_SSID]; 803b032f27cSSam Leffler }; 8041a1e1d21SSam Leffler 8058a1b9b6aSSam Leffler /* 8068a1b9b6aSSam Leffler * Scan result data returned for IEEE80211_IOC_SCAN_RESULTS. 807239cc3b6SSam Leffler * Each result is a fixed size structure followed by a variable 808239cc3b6SSam Leffler * length SSID and one or more variable length information elements. 809239cc3b6SSam Leffler * The size of each variable length item is found in the fixed 810239cc3b6SSam Leffler * size structure and the entire length of the record is specified 811239cc3b6SSam Leffler * in isr_len. Result records are rounded to a multiple of 4 bytes. 8128a1b9b6aSSam Leffler */ 8138a1b9b6aSSam Leffler struct ieee80211req_scan_result { 814b032f27cSSam Leffler uint16_t isr_len; /* total length (mult of 4) */ 815b032f27cSSam Leffler uint16_t isr_ie_off; /* offset to SSID+IE data */ 81668e8e04eSSam Leffler uint16_t isr_ie_len; /* IE length */ 81768e8e04eSSam Leffler uint16_t isr_freq; /* MHz */ 81868e8e04eSSam Leffler uint16_t isr_flags; /* channel flags */ 819239cc3b6SSam Leffler int8_t isr_noise; 820239cc3b6SSam Leffler int8_t isr_rssi; 821d28e9c14SRui Paulo uint16_t isr_intval; /* beacon interval */ 82268e8e04eSSam Leffler uint8_t isr_capinfo; /* capabilities */ 82368e8e04eSSam Leffler uint8_t isr_erp; /* ERP element */ 82468e8e04eSSam Leffler uint8_t isr_bssid[IEEE80211_ADDR_LEN]; 82568e8e04eSSam Leffler uint8_t isr_nrates; 82668e8e04eSSam Leffler uint8_t isr_rates[IEEE80211_RATE_MAXSIZE]; 82768e8e04eSSam Leffler uint8_t isr_ssid_len; /* SSID length */ 82859aa14a9SRui Paulo uint8_t isr_meshid_len; /* MESH ID length */ 82959aa14a9SRui Paulo /* variable length SSID, followed by variable length MESH ID, 83059aa14a9SRui Paulo followed by IE data */ 8318a1b9b6aSSam Leffler }; 8321be50176SSam Leffler 833b032f27cSSam Leffler /* 834b032f27cSSam Leffler * Virtual AP cloning parameters. The parent device must 835b032f27cSSam Leffler * be a vap-capable device. All parameters specified with 836b032f27cSSam Leffler * the clone request are fixed for the lifetime of the vap. 837b032f27cSSam Leffler * 838b032f27cSSam Leffler * There are two flavors of WDS vaps: legacy and dynamic. 839b032f27cSSam Leffler * Legacy WDS operation implements a static binding between 840b032f27cSSam Leffler * two stations encapsulating traffic in 4-address frames. 841b032f27cSSam Leffler * Dynamic WDS vaps are created when a station associates to 842b032f27cSSam Leffler * an AP and sends a 4-address frame. If the AP vap is 843b032f27cSSam Leffler * configured to support WDS then this will generate an 844b032f27cSSam Leffler * event to user programs listening on the routing socket 845b032f27cSSam Leffler * and a Dynamic WDS vap will be created to handle traffic 846b032f27cSSam Leffler * to/from that station. In both cases the bssid of the 847b032f27cSSam Leffler * peer must be specified when creating the vap. 848b032f27cSSam Leffler * 849b032f27cSSam Leffler * By default a vap will inherit the mac address/bssid of 850b032f27cSSam Leffler * the underlying device. To request a unique address the 851b032f27cSSam Leffler * IEEE80211_CLONE_BSSID flag should be supplied. This is 852b032f27cSSam Leffler * meaningless for WDS vaps as they share the bssid of an 853b032f27cSSam Leffler * AP vap that must otherwise exist. Note that some devices 854b032f27cSSam Leffler * may not be able to support multiple addresses. 855b032f27cSSam Leffler * 856b032f27cSSam Leffler * Station mode vap's normally depend on the device to notice 857b032f27cSSam Leffler * when the AP stops sending beacon frames. If IEEE80211_CLONE_NOBEACONS 858b032f27cSSam Leffler * is specified the net80211 layer will do this in s/w. This 859b032f27cSSam Leffler * is mostly useful when setting up a WDS repeater/extender where 860b032f27cSSam Leffler * an AP vap is combined with a sta vap and the device isn't able 861b032f27cSSam Leffler * to track beacon frames in hardware. 862b032f27cSSam Leffler */ 86368e8e04eSSam Leffler struct ieee80211_clone_params { 86468e8e04eSSam Leffler char icp_parent[IFNAMSIZ]; /* parent device */ 865b032f27cSSam Leffler uint16_t icp_opmode; /* operating mode */ 866b032f27cSSam Leffler uint16_t icp_flags; /* see below */ 867b032f27cSSam Leffler uint8_t icp_bssid[IEEE80211_ADDR_LEN]; /* for WDS links */ 868b032f27cSSam Leffler uint8_t icp_macaddr[IEEE80211_ADDR_LEN];/* local address */ 86968e8e04eSSam Leffler }; 870b032f27cSSam Leffler #define IEEE80211_CLONE_BSSID 0x0001 /* allocate unique mac/bssid */ 871b032f27cSSam Leffler #define IEEE80211_CLONE_NOBEACONS 0x0002 /* don't setup beacon timers */ 872b032f27cSSam Leffler #define IEEE80211_CLONE_WDSLEGACY 0x0004 /* legacy WDS processing */ 873b032f27cSSam Leffler #define IEEE80211_CLONE_MACADDR 0x0008 /* use specified mac addr */ 87410ad9a77SSam Leffler #define IEEE80211_CLONE_TDMA 0x0010 /* operate in TDMA mode */ 8751a1e1d21SSam Leffler #endif /* __FreeBSD__ */ 8761a1e1d21SSam Leffler 8771a1e1d21SSam Leffler #endif /* _NET80211_IEEE80211_IOCTL_H_ */ 878