ieee80211_var.h (191555) | ieee80211_var.h (191746) |
---|---|
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 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 * | 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 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 191555 2009-04-26 23:11:22Z sam $ | 26 * $FreeBSD: head/sys/net80211/ieee80211_var.h 191746 2009-05-02 15:14:18Z thompsa $ |
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 */ --- 86 unchanged lines hidden (view full) --- 121 struct ifnet *ic_ifp; /* associated device */ 122 ieee80211_com_lock_t ic_comlock; /* state update lock */ 123 TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ 124 int ic_headroom; /* driver tx headroom needs */ 125 enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ 126 enum ieee80211_opmode ic_opmode; /* operation mode */ 127 struct ifmedia ic_media; /* interface media config */ 128 struct callout ic_inact; /* inactivity processing */ | 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 */ --- 86 unchanged lines hidden (view full) --- 121 struct ifnet *ic_ifp; /* associated device */ 122 ieee80211_com_lock_t ic_comlock; /* state update lock */ 123 TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ 124 int ic_headroom; /* driver tx headroom needs */ 125 enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ 126 enum ieee80211_opmode ic_opmode; /* operation mode */ 127 struct ifmedia ic_media; /* interface media config */ 128 struct callout ic_inact; /* inactivity processing */ |
129 struct taskqueue *ic_tq; /* deferred state thread */ |
|
129 struct task ic_parent_task; /* deferred parent processing */ | 130 struct task ic_parent_task; /* deferred parent processing */ |
131 struct task ic_promisc_task;/* deferred promisc update */ 132 struct task ic_mcast_task; /* deferred mcast update */ 133 struct task ic_chan_task; /* deferred channel change */ 134 struct task ic_bmiss_task; /* deferred beacon miss hndlr */ |
|
130 131 uint32_t ic_flags; /* state flags */ 132 uint32_t ic_flags_ext; /* extended state flags */ 133 uint32_t ic_flags_ven; /* vendor state flags */ 134 uint32_t ic_caps; /* capabilities */ 135 uint32_t ic_htcaps; /* HT capabilities */ 136 uint32_t ic_cryptocaps; /* crypto capabilities */ 137 uint8_t ic_modecaps[2]; /* set of mode capabilities */ --- 182 unchanged lines hidden (view full) --- 320 uint8_t iv_myaddr[IEEE80211_ADDR_LEN]; 321 uint32_t iv_flags; /* state flags */ 322 uint32_t iv_flags_ext; /* extended state flags */ 323 uint32_t iv_flags_ven; /* vendor state flags */ 324 uint32_t iv_caps; /* capabilities */ 325 uint32_t iv_htcaps; /* HT capabilities */ 326 enum ieee80211_opmode iv_opmode; /* operation mode */ 327 enum ieee80211_state iv_state; /* state machine state */ | 135 136 uint32_t ic_flags; /* state flags */ 137 uint32_t ic_flags_ext; /* extended state flags */ 138 uint32_t ic_flags_ven; /* vendor state flags */ 139 uint32_t ic_caps; /* capabilities */ 140 uint32_t ic_htcaps; /* HT capabilities */ 141 uint32_t ic_cryptocaps; /* crypto capabilities */ 142 uint8_t ic_modecaps[2]; /* set of mode capabilities */ --- 182 unchanged lines hidden (view full) --- 325 uint8_t iv_myaddr[IEEE80211_ADDR_LEN]; 326 uint32_t iv_flags; /* state flags */ 327 uint32_t iv_flags_ext; /* extended state flags */ 328 uint32_t iv_flags_ven; /* vendor state flags */ 329 uint32_t iv_caps; /* capabilities */ 330 uint32_t iv_htcaps; /* HT capabilities */ 331 enum ieee80211_opmode iv_opmode; /* operation mode */ 332 enum ieee80211_state iv_state; /* state machine state */ |
328 void (*iv_newstate_cb)(struct ieee80211vap *, 329 enum ieee80211_state, int); | 333 enum ieee80211_state iv_nstate; /* pending state */ 334 int iv_nstate_arg; /* pending state arg */ 335 struct task iv_nstate_task; /* deferred state processing */ 336 struct task iv_swbmiss_task;/* deferred iv_bmiss call */ |
330 struct callout iv_mgtsend; /* mgmt frame response timer */ 331 /* inactivity timer settings */ 332 int iv_inact_init; /* setting for new station */ 333 int iv_inact_auth; /* auth but not assoc setting */ 334 int iv_inact_run; /* authorized setting */ 335 int iv_inact_probe; /* inactive probe time */ 336 337 int iv_des_nssid; /* # desired ssids */ --- 176 unchanged lines hidden (view full) --- 514#define IEEE80211_FEXT_TSN 0x00000020 /* CONF: TSN enabled */ 515#define IEEE80211_FEXT_SCANREQ 0x00000040 /* STATUS: scan req params */ 516#define IEEE80211_FEXT_RESUME 0x00000080 /* STATUS: start on resume */ 517#define IEEE80211_FEXT_4ADDR 0x00000100 /* CONF: apply 4-addr encap */ 518#define IEEE80211_FEXT_NONERP_PR 0x00000200 /* STATUS: non-ERP sta present*/ 519#define IEEE80211_FEXT_SWBMISS 0x00000400 /* CONF: do bmiss in s/w */ 520#define IEEE80211_FEXT_DFS 0x00000800 /* CONF: DFS enabled */ 521#define IEEE80211_FEXT_DOTD 0x00001000 /* CONF: 11d enabled */ | 337 struct callout iv_mgtsend; /* mgmt frame response timer */ 338 /* inactivity timer settings */ 339 int iv_inact_init; /* setting for new station */ 340 int iv_inact_auth; /* auth but not assoc setting */ 341 int iv_inact_run; /* authorized setting */ 342 int iv_inact_probe; /* inactive probe time */ 343 344 int iv_des_nssid; /* # desired ssids */ --- 176 unchanged lines hidden (view full) --- 521#define IEEE80211_FEXT_TSN 0x00000020 /* CONF: TSN enabled */ 522#define IEEE80211_FEXT_SCANREQ 0x00000040 /* STATUS: scan req params */ 523#define IEEE80211_FEXT_RESUME 0x00000080 /* STATUS: start on resume */ 524#define IEEE80211_FEXT_4ADDR 0x00000100 /* CONF: apply 4-addr encap */ 525#define IEEE80211_FEXT_NONERP_PR 0x00000200 /* STATUS: non-ERP sta present*/ 526#define IEEE80211_FEXT_SWBMISS 0x00000400 /* CONF: do bmiss in s/w */ 527#define IEEE80211_FEXT_DFS 0x00000800 /* CONF: DFS enabled */ 528#define IEEE80211_FEXT_DOTD 0x00001000 /* CONF: 11d enabled */ |
529#define IEEE80211_FEXT_STATEWAIT 0x00002000 /* STATUS: awaiting state chg */ 530#define IEEE80211_FEXT_REINIT 0x00004000 /* STATUS: INIT state first */ |
|
522/* NB: immutable: should be set only when creating a vap */ 523#define IEEE80211_FEXT_WDSLEGACY 0x00010000 /* CONF: legacy WDS operation */ 524#define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/ 525#define IEEE80211_FEXT_HT 0x00080000 /* CONF: HT supported */ 526#define IEEE80211_FEXT_AMPDU_TX 0x00100000 /* CONF: A-MPDU tx supported */ 527#define IEEE80211_FEXT_AMPDU_RX 0x00200000 /* CONF: A-MPDU tx supported */ 528#define IEEE80211_FEXT_AMSDU_TX 0x00400000 /* CONF: A-MSDU tx supported */ 529#define IEEE80211_FEXT_AMSDU_RX 0x00800000 /* CONF: A-MSDU tx supported */ 530#define IEEE80211_FEXT_USEHT40 0x01000000 /* CONF: 20/40 use enabled */ 531#define IEEE80211_FEXT_PUREN 0x02000000 /* CONF: 11n w/o legacy sta's */ 532#define IEEE80211_FEXT_SHORTGI20 0x04000000 /* CONF: short GI in HT20 */ 533#define IEEE80211_FEXT_SHORTGI40 0x08000000 /* CONF: short GI in HT40 */ 534#define IEEE80211_FEXT_HTCOMPAT 0x10000000 /* CONF: HT vendor OUI's */ 535#define IEEE80211_FEXT_RIFS 0x20000000 /* CONF: RIFS enabled */ 536 537#define IEEE80211_FEXT_BITS \ 538 "\20\1NONHT_PR\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ | 531/* NB: immutable: should be set only when creating a vap */ 532#define IEEE80211_FEXT_WDSLEGACY 0x00010000 /* CONF: legacy WDS operation */ 533#define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/ 534#define IEEE80211_FEXT_HT 0x00080000 /* CONF: HT supported */ 535#define IEEE80211_FEXT_AMPDU_TX 0x00100000 /* CONF: A-MPDU tx supported */ 536#define IEEE80211_FEXT_AMPDU_RX 0x00200000 /* CONF: A-MPDU tx supported */ 537#define IEEE80211_FEXT_AMSDU_TX 0x00400000 /* CONF: A-MSDU tx supported */ 538#define IEEE80211_FEXT_AMSDU_RX 0x00800000 /* CONF: A-MSDU tx supported */ 539#define IEEE80211_FEXT_USEHT40 0x01000000 /* CONF: 20/40 use enabled */ 540#define IEEE80211_FEXT_PUREN 0x02000000 /* CONF: 11n w/o legacy sta's */ 541#define IEEE80211_FEXT_SHORTGI20 0x04000000 /* CONF: short GI in HT20 */ 542#define IEEE80211_FEXT_SHORTGI40 0x08000000 /* CONF: short GI in HT40 */ 543#define IEEE80211_FEXT_HTCOMPAT 0x10000000 /* CONF: HT vendor OUI's */ 544#define IEEE80211_FEXT_RIFS 0x20000000 /* CONF: RIFS enabled */ 545 546#define IEEE80211_FEXT_BITS \ 547 "\20\1NONHT_PR\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \ |
539 "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\22WDSLEGACY\23PROBECHAN" \ 540 "\24HT\25AMDPU_TX\26AMPDU_TX\27AMSDU_TX\30AMSDU_RX\31USEHT40\32PUREN" \ 541 "\33SHORTGI20\34SHORTGI40\35HTCOMPAT\36RIFS" | 548 "\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \ 549 "\22WDSLEGACY\23PROBECHAN\24HT\25AMDPU_TX\26AMPDU_TX\27AMSDU_TX" \ 550 "\30AMSDU_RX\31USEHT40\32PUREN\33SHORTGI20\34SHORTGI40\35HTCOMPAT" \ 551 "\36RIFS" |
542 543#define IEEE80211_FVEN_BITS "\20" 544 545/* ic_caps/iv_caps: device driver capabilities */ 546/* 0x2e available */ 547#define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA available */ 548#define IEEE80211_C_8023ENCAP 0x00000002 /* CAPABILITY: 802.3 encap */ 549#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF avail */ --- 78 unchanged lines hidden (view full) --- 628u_int ieee80211_ieee2mhz(u_int, u_int); 629struct ieee80211_channel *ieee80211_find_channel(struct ieee80211com *, 630 int freq, int flags); 631struct ieee80211_channel *ieee80211_find_channel_byieee(struct ieee80211com *, 632 int ieee, int flags); 633int ieee80211_setmode(struct ieee80211com *, enum ieee80211_phymode); 634enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *); 635 | 552 553#define IEEE80211_FVEN_BITS "\20" 554 555/* ic_caps/iv_caps: device driver capabilities */ 556/* 0x2e available */ 557#define IEEE80211_C_STA 0x00000001 /* CAPABILITY: STA available */ 558#define IEEE80211_C_8023ENCAP 0x00000002 /* CAPABILITY: 802.3 encap */ 559#define IEEE80211_C_FF 0x00000040 /* CAPABILITY: ATH FF avail */ --- 78 unchanged lines hidden (view full) --- 638u_int ieee80211_ieee2mhz(u_int, u_int); 639struct ieee80211_channel *ieee80211_find_channel(struct ieee80211com *, 640 int freq, int flags); 641struct ieee80211_channel *ieee80211_find_channel_byieee(struct ieee80211com *, 642 int ieee, int flags); 643int ieee80211_setmode(struct ieee80211com *, enum ieee80211_phymode); 644enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *); 645 |
646/* 647 * Enqueue a task on the state thread. 648 */ 649static __inline void 650ieee80211_runtask(struct ieee80211com *ic, struct task *task) 651{ 652 taskqueue_enqueue(ic->ic_tq, task); 653} 654 655/* 656 * Wait for a queued task to complete. 657 */ 658static __inline void 659ieee80211_draintask(struct ieee80211com *ic, struct task *task) 660{ 661 taskqueue_drain(ic->ic_tq, task); 662} 663 |
|
636/* 637 * Key update synchronization methods. XXX should not be visible. 638 */ 639static __inline void 640ieee80211_key_update_begin(struct ieee80211vap *vap) 641{ 642 vap->iv_key_update_begin(vap); 643} --- 188 unchanged lines hidden --- | 664/* 665 * Key update synchronization methods. XXX should not be visible. 666 */ 667static __inline void 668ieee80211_key_update_begin(struct ieee80211vap *vap) 669{ 670 vap->iv_key_update_begin(vap); 671} --- 188 unchanged lines hidden --- |