ieee80211_var.h (186107) | ieee80211_var.h (186904) |
---|---|
1/*- 2 * Copyright (c) 2001 Atsushi Onoe | 1/*- 2 * Copyright (c) 2001 Atsushi Onoe |
3 * Copyright (c) 2002-2008 Sam Leffler, Errno Consulting | 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 --- 6 unchanged lines hidden (view full) --- 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 * | 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 --- 6 unchanged lines hidden (view full) --- 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_var.h 186107 2008-12-15 01:26:33Z sam $ | 26 * $FreeBSD: head/sys/net80211/ieee80211_var.h 186904 2009-01-08 17:12:47Z sam $ |
27 */ 28#ifndef _NET80211_IEEE80211_VAR_H_ 29#define _NET80211_IEEE80211_VAR_H_ 30 31/* 32 * Definitions for IEEE 802.11 drivers. 33 */ 34/* NB: portability glue must go first */ --- 65 unchanged lines hidden (view full) --- 100struct ieee80211vap; 101typedef void (*ieee80211vap_attach)(struct ieee80211vap *); 102 103struct ieee80211_appie { 104 uint16_t ie_len; /* size of ie_data */ 105 uint8_t ie_data[]; /* user-specified IE's */ 106}; 107 | 27 */ 28#ifndef _NET80211_IEEE80211_VAR_H_ 29#define _NET80211_IEEE80211_VAR_H_ 30 31/* 32 * Definitions for IEEE 802.11 drivers. 33 */ 34/* NB: portability glue must go first */ --- 65 unchanged lines hidden (view full) --- 100struct ieee80211vap; 101typedef void (*ieee80211vap_attach)(struct ieee80211vap *); 102 103struct ieee80211_appie { 104 uint16_t ie_len; /* size of ie_data */ 105 uint8_t ie_data[]; /* user-specified IE's */ 106}; 107 |
108struct ieee80211_tdma_param; 109 |
|
108struct ieee80211com { 109 struct ifnet *ic_ifp; /* associated device */ 110 ieee80211_com_lock_t ic_comlock; /* state update lock */ 111 TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ 112 struct ieee80211_stats ic_stats; /* statistics */ 113 int ic_headroom; /* driver tx headroom needs */ 114 enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ 115 enum ieee80211_opmode ic_opmode; /* operation mode */ --- 105 unchanged lines hidden (view full) --- 221 /* update device state for 802.11 slot time change */ 222 void (*ic_updateslot)(struct ifnet *); 223 /* handle multicast state changes */ 224 void (*ic_update_mcast)(struct ifnet *); 225 /* handle promiscuous mode changes */ 226 void (*ic_update_promisc)(struct ifnet *); 227 /* new station association callback/notification */ 228 void (*ic_newassoc)(struct ieee80211_node *, int); | 110struct ieee80211com { 111 struct ifnet *ic_ifp; /* associated device */ 112 ieee80211_com_lock_t ic_comlock; /* state update lock */ 113 TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ 114 struct ieee80211_stats ic_stats; /* statistics */ 115 int ic_headroom; /* driver tx headroom needs */ 116 enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ 117 enum ieee80211_opmode ic_opmode; /* operation mode */ --- 105 unchanged lines hidden (view full) --- 223 /* update device state for 802.11 slot time change */ 224 void (*ic_updateslot)(struct ifnet *); 225 /* handle multicast state changes */ 226 void (*ic_update_mcast)(struct ifnet *); 227 /* handle promiscuous mode changes */ 228 void (*ic_update_promisc)(struct ifnet *); 229 /* new station association callback/notification */ 230 void (*ic_newassoc)(struct ieee80211_node *, int); |
231 /* TDMA update notification */ 232 void (*ic_tdma_update)(struct ieee80211_node *, 233 const struct ieee80211_tdma_param *); |
|
229 /* node state management */ 230 struct ieee80211_node* (*ic_node_alloc)(struct ieee80211vap *, 231 const uint8_t [IEEE80211_ADDR_LEN]); 232 void (*ic_node_free)(struct ieee80211_node *); 233 void (*ic_node_cleanup)(struct ieee80211_node *); 234 void (*ic_node_age)(struct ieee80211_node *); 235 void (*ic_node_drain)(struct ieee80211_node *); 236 int8_t (*ic_node_getrssi)(const struct ieee80211_node*); --- 37 unchanged lines hidden (view full) --- 274 void (*ic_addba_stop)(struct ieee80211_node *, 275 struct ieee80211_tx_ampdu *); 276 /* BAR response received */ 277 void (*ic_bar_response)(struct ieee80211_node *, 278 struct ieee80211_tx_ampdu *, int status); 279}; 280 281struct ieee80211_aclator; | 234 /* node state management */ 235 struct ieee80211_node* (*ic_node_alloc)(struct ieee80211vap *, 236 const uint8_t [IEEE80211_ADDR_LEN]); 237 void (*ic_node_free)(struct ieee80211_node *); 238 void (*ic_node_cleanup)(struct ieee80211_node *); 239 void (*ic_node_age)(struct ieee80211_node *); 240 void (*ic_node_drain)(struct ieee80211_node *); 241 int8_t (*ic_node_getrssi)(const struct ieee80211_node*); --- 37 unchanged lines hidden (view full) --- 279 void (*ic_addba_stop)(struct ieee80211_node *, 280 struct ieee80211_tx_ampdu *); 281 /* BAR response received */ 282 void (*ic_bar_response)(struct ieee80211_node *, 283 struct ieee80211_tx_ampdu *, int status); 284}; 285 286struct ieee80211_aclator; |
287struct ieee80211_tdma_state; |
|
282 283struct ieee80211vap { 284 struct ifmedia iv_media; /* interface media config */ 285 struct ifnet *iv_ifp; /* associated device */ 286 struct bpf_if *iv_rawbpf; /* packet filter structure */ 287 struct sysctl_ctx_list *iv_sysctl; /* dynamic sysctl context */ 288 struct sysctl_oid *iv_oid; /* net.wlan.X sysctl oid */ 289 --- 94 unchanged lines hidden (view full) --- 384 void (*iv_key_update_end)(struct ieee80211vap *); 385 386 const struct ieee80211_authenticator *iv_auth; /* authenticator glue */ 387 void *iv_ec; /* private auth state */ 388 389 const struct ieee80211_aclator *iv_acl; /* acl glue */ 390 void *iv_as; /* private aclator state */ 391 | 288 289struct ieee80211vap { 290 struct ifmedia iv_media; /* interface media config */ 291 struct ifnet *iv_ifp; /* associated device */ 292 struct bpf_if *iv_rawbpf; /* packet filter structure */ 293 struct sysctl_ctx_list *iv_sysctl; /* dynamic sysctl context */ 294 struct sysctl_oid *iv_oid; /* net.wlan.X sysctl oid */ 295 --- 94 unchanged lines hidden (view full) --- 390 void (*iv_key_update_end)(struct ieee80211vap *); 391 392 const struct ieee80211_authenticator *iv_auth; /* authenticator glue */ 393 void *iv_ec; /* private auth state */ 394 395 const struct ieee80211_aclator *iv_acl; /* acl glue */ 396 void *iv_as; /* private aclator state */ 397 |
398 struct ieee80211_tdma_state *iv_tdma; /* tdma state */ 399 |
|
392 /* operate-mode detach hook */ 393 void (*iv_opdetach)(struct ieee80211vap *); 394 /* receive processing */ 395 int (*iv_input)(struct ieee80211_node *, 396 struct mbuf *, int rssi, int noise, 397 uint32_t rstamp); 398 void (*iv_recv_mgmt)(struct ieee80211_node *, 399 struct mbuf *, int, int, int, uint32_t); --- 117 unchanged lines hidden (view full) --- 517#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ 518#define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ 519#define IEEE80211_C_BURST 0x02000000 /* CAPABILITY: frame bursting */ 520#define IEEE80211_C_WME 0x04000000 /* CAPABILITY: WME avail */ 521#define IEEE80211_C_WDS 0x08000000 /* CAPABILITY: 4-addr support */ 522/* 0x10000000 reserved */ 523#define IEEE80211_C_BGSCAN 0x20000000 /* CAPABILITY: bg scanning */ 524#define IEEE80211_C_TXFRAG 0x40000000 /* CAPABILITY: tx fragments */ | 400 /* operate-mode detach hook */ 401 void (*iv_opdetach)(struct ieee80211vap *); 402 /* receive processing */ 403 int (*iv_input)(struct ieee80211_node *, 404 struct mbuf *, int rssi, int noise, 405 uint32_t rstamp); 406 void (*iv_recv_mgmt)(struct ieee80211_node *, 407 struct mbuf *, int, int, int, uint32_t); --- 117 unchanged lines hidden (view full) --- 525#define IEEE80211_C_WPA2 0x01000000 /* CAPABILITY: WPA2 avail */ 526#define IEEE80211_C_WPA 0x01800000 /* CAPABILITY: WPA1+WPA2 avail*/ 527#define IEEE80211_C_BURST 0x02000000 /* CAPABILITY: frame bursting */ 528#define IEEE80211_C_WME 0x04000000 /* CAPABILITY: WME avail */ 529#define IEEE80211_C_WDS 0x08000000 /* CAPABILITY: 4-addr support */ 530/* 0x10000000 reserved */ 531#define IEEE80211_C_BGSCAN 0x20000000 /* CAPABILITY: bg scanning */ 532#define IEEE80211_C_TXFRAG 0x40000000 /* CAPABILITY: tx fragments */ |
533#define IEEE80211_C_TDMA 0x80000000 /* CAPABILITY: TDMA avail */ |
|
525/* XXX protection/barker? */ 526 527#define IEEE80211_C_OPMODE \ 528 (IEEE80211_C_STA | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | \ | 534/* XXX protection/barker? */ 535 536#define IEEE80211_C_OPMODE \ 537 (IEEE80211_C_STA | IEEE80211_C_IBSS | IEEE80211_C_HOSTAP | \ |
529 IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS) | 538 IEEE80211_C_AHDEMO | IEEE80211_C_MONITOR | IEEE80211_C_WDS | \ 539 IEEE80211_C_TDMA) |
530 531/* 532 * ic_htcaps/iv_htcaps: HT-specific device/driver capabilities 533 * 534 * NB: the low 16-bits are the 802.11 definitions, the upper 535 * 16-bits are used to define s/w/driver capabilities. 536 */ 537#define IEEE80211_HTC_AMPDU 0x00010000 /* CAPABILITY: A-MPDU tx */ --- 137 unchanged lines hidden (view full) --- 675#define IEEE80211_MSG_SUPERG 0x00000200 /* Atheros SuperG protocol */ 676#define IEEE80211_MSG_DOTH 0x00000100 /* 802.11h support */ 677#define IEEE80211_MSG_INACT 0x00000080 /* inactivity handling */ 678#define IEEE80211_MSG_ROAM 0x00000040 /* sta-mode roaming */ 679#define IEEE80211_MSG_RATECTL 0x00000020 /* tx rate control */ 680#define IEEE80211_MSG_ACTION 0x00000010 /* action frame handling */ 681#define IEEE80211_MSG_WDS 0x00000008 /* WDS handling */ 682#define IEEE80211_MSG_IOCTL 0x00000004 /* ioctl handling */ | 540 541/* 542 * ic_htcaps/iv_htcaps: HT-specific device/driver capabilities 543 * 544 * NB: the low 16-bits are the 802.11 definitions, the upper 545 * 16-bits are used to define s/w/driver capabilities. 546 */ 547#define IEEE80211_HTC_AMPDU 0x00010000 /* CAPABILITY: A-MPDU tx */ --- 137 unchanged lines hidden (view full) --- 685#define IEEE80211_MSG_SUPERG 0x00000200 /* Atheros SuperG protocol */ 686#define IEEE80211_MSG_DOTH 0x00000100 /* 802.11h support */ 687#define IEEE80211_MSG_INACT 0x00000080 /* inactivity handling */ 688#define IEEE80211_MSG_ROAM 0x00000040 /* sta-mode roaming */ 689#define IEEE80211_MSG_RATECTL 0x00000020 /* tx rate control */ 690#define IEEE80211_MSG_ACTION 0x00000010 /* action frame handling */ 691#define IEEE80211_MSG_WDS 0x00000008 /* WDS handling */ 692#define IEEE80211_MSG_IOCTL 0x00000004 /* ioctl handling */ |
693#define IEEE80211_MSG_TDMA 0x00000002 /* TDMA handling */ |
|
683 684#define IEEE80211_MSG_ANY 0xffffffff /* anything */ 685 686#ifdef IEEE80211_DEBUG 687#define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m)) 688#define IEEE80211_DPRINTF(_vap, _m, _fmt, ...) do { \ 689 if (ieee80211_msg(_vap, _m)) \ 690 ieee80211_note(_vap, _fmt, __VA_ARGS__); \ --- 75 unchanged lines hidden --- | 694 695#define IEEE80211_MSG_ANY 0xffffffff /* anything */ 696 697#ifdef IEEE80211_DEBUG 698#define ieee80211_msg(_vap, _m) ((_vap)->iv_debug & (_m)) 699#define IEEE80211_DPRINTF(_vap, _m, _fmt, ...) do { \ 700 if (ieee80211_msg(_vap, _m)) \ 701 ieee80211_note(_vap, _fmt, __VA_ARGS__); \ --- 75 unchanged lines hidden --- |