Deleted Added
full compact
ieee80211_var.h (172062) ieee80211_var.h (172211)
1/*-
2 * Copyright (c) 2001 Atsushi Onoe
3 * Copyright (c) 2002-2007 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-2007 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 172062 2007-09-06 00:04:36Z sam $
26 * $FreeBSD: head/sys/net80211/ieee80211_var.h 172211 2007-09-17 19:07:24Z 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#define IEEE80211_DEBUG

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

170 struct ieee80211_wme_state ic_wme; /* WME/WMM state */
171 const struct ieee80211_aclator *ic_acl; /* aclator glue */
172 void *ic_as; /* private aclator state */
173
174 enum ieee80211_protmode ic_protmode; /* 802.11g protection mode */
175 uint16_t ic_nonerpsta; /* # non-ERP stations */
176 uint16_t ic_longslotsta; /* # long slot time stations */
177 uint16_t ic_sta_assoc; /* stations associated */
27 */
28#ifndef _NET80211_IEEE80211_VAR_H_
29#define _NET80211_IEEE80211_VAR_H_
30
31/*
32 * Definitions for IEEE 802.11 drivers.
33 */
34#define IEEE80211_DEBUG

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

170 struct ieee80211_wme_state ic_wme; /* WME/WMM state */
171 const struct ieee80211_aclator *ic_acl; /* aclator glue */
172 void *ic_as; /* private aclator state */
173
174 enum ieee80211_protmode ic_protmode; /* 802.11g protection mode */
175 uint16_t ic_nonerpsta; /* # non-ERP stations */
176 uint16_t ic_longslotsta; /* # long slot time stations */
177 uint16_t ic_sta_assoc; /* stations associated */
178 uint8_t ic_curhtprotmode;/* HTINFO bss state */
179 int ic_lastnonerp; /* last time non-ERP sta noted*/
178
179 struct ifqueue ic_mgtq;
180 enum ieee80211_state ic_state; /* 802.11 state */
181 struct callout ic_mgtsend; /* mgmt frame response timer */
182 uint32_t *ic_aid_bitmap; /* association id map */
183 uint16_t ic_max_aid;
184 uint16_t ic_ps_sta; /* stations in power save */
185 uint16_t ic_ps_pending; /* ps sta's w/ pending frames */

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

232 struct mbuf *, struct ieee80211_node *,
233 int, int, int, uint32_t);
234 /* send raw 802.11 frame */
235 int (*ic_raw_xmit)(struct ieee80211_node *,
236 struct mbuf *,
237 const struct ieee80211_bpf_params *);
238 /* reset device state after 802.11 parameter/state change */
239 int (*ic_reset)(struct ifnet *);
180
181 struct ifqueue ic_mgtq;
182 enum ieee80211_state ic_state; /* 802.11 state */
183 struct callout ic_mgtsend; /* mgmt frame response timer */
184 uint32_t *ic_aid_bitmap; /* association id map */
185 uint16_t ic_max_aid;
186 uint16_t ic_ps_sta; /* stations in power save */
187 uint16_t ic_ps_pending; /* ps sta's w/ pending frames */

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

234 struct mbuf *, struct ieee80211_node *,
235 int, int, int, uint32_t);
236 /* send raw 802.11 frame */
237 int (*ic_raw_xmit)(struct ieee80211_node *,
238 struct mbuf *,
239 const struct ieee80211_bpf_params *);
240 /* reset device state after 802.11 parameter/state change */
241 int (*ic_reset)(struct ifnet *);
242 /* [schedule] beacon frame update */
243 void (*ic_update_beacon)(struct ieee80211com *, int);
240 /* update device state for 802.11 slot time change */
241 void (*ic_updateslot)(struct ifnet *);
242 /* new station association callback/notification */
243 void (*ic_newassoc)(struct ieee80211_node *, int);
244 /* node state management */
245 struct ieee80211_node *(*ic_node_alloc)(struct ieee80211_node_table*);
246 void (*ic_node_free)(struct ieee80211_node *);
247 void (*ic_node_cleanup)(struct ieee80211_node *);

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

308#define IEEE80211_F_BGSCAN 0x00004000 /* CONF: bg scan enabled (???)*/
309#define IEEE80211_F_SWRETRY 0x00008000 /* CONF: sw tx retry enabled */
310#define IEEE80211_F_TXPOW_FIXED 0x00010000 /* TX Power: fixed rate */
311#define IEEE80211_F_IBSSON 0x00020000 /* CONF: IBSS creation enable */
312#define IEEE80211_F_SHPREAMBLE 0x00040000 /* STATUS: use short preamble */
313#define IEEE80211_F_DATAPAD 0x00080000 /* CONF: do alignment pad */
314#define IEEE80211_F_USEPROT 0x00100000 /* STATUS: protection enabled */
315#define IEEE80211_F_USEBARKER 0x00200000 /* STATUS: use barker preamble*/
244 /* update device state for 802.11 slot time change */
245 void (*ic_updateslot)(struct ifnet *);
246 /* new station association callback/notification */
247 void (*ic_newassoc)(struct ieee80211_node *, int);
248 /* node state management */
249 struct ieee80211_node *(*ic_node_alloc)(struct ieee80211_node_table*);
250 void (*ic_node_free)(struct ieee80211_node *);
251 void (*ic_node_cleanup)(struct ieee80211_node *);

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

312#define IEEE80211_F_BGSCAN 0x00004000 /* CONF: bg scan enabled (???)*/
313#define IEEE80211_F_SWRETRY 0x00008000 /* CONF: sw tx retry enabled */
314#define IEEE80211_F_TXPOW_FIXED 0x00010000 /* TX Power: fixed rate */
315#define IEEE80211_F_IBSSON 0x00020000 /* CONF: IBSS creation enable */
316#define IEEE80211_F_SHPREAMBLE 0x00040000 /* STATUS: use short preamble */
317#define IEEE80211_F_DATAPAD 0x00080000 /* CONF: do alignment pad */
318#define IEEE80211_F_USEPROT 0x00100000 /* STATUS: protection enabled */
319#define IEEE80211_F_USEBARKER 0x00200000 /* STATUS: use barker preamble*/
316#define IEEE80211_F_TIMUPDATE 0x00400000 /* STATUS: update beacon tim */
317#define IEEE80211_F_WPA1 0x00800000 /* CONF: WPA enabled */
318#define IEEE80211_F_WPA2 0x01000000 /* CONF: WPA2 enabled */
319#define IEEE80211_F_WPA 0x01800000 /* CONF: WPA/WPA2 enabled */
320#define IEEE80211_F_DROPUNENC 0x02000000 /* CONF: drop unencrypted */
321#define IEEE80211_F_COUNTERM 0x04000000 /* CONF: TKIP countermeasures */
322#define IEEE80211_F_HIDESSID 0x08000000 /* CONF: hide SSID in beacon */
323#define IEEE80211_F_NOBRIDGE 0x10000000 /* CONF: dis. internal bridge */
320#define IEEE80211_F_WPA1 0x00800000 /* CONF: WPA enabled */
321#define IEEE80211_F_WPA2 0x01000000 /* CONF: WPA2 enabled */
322#define IEEE80211_F_WPA 0x01800000 /* CONF: WPA/WPA2 enabled */
323#define IEEE80211_F_DROPUNENC 0x02000000 /* CONF: drop unencrypted */
324#define IEEE80211_F_COUNTERM 0x04000000 /* CONF: TKIP countermeasures */
325#define IEEE80211_F_HIDESSID 0x08000000 /* CONF: hide SSID in beacon */
326#define IEEE80211_F_NOBRIDGE 0x10000000 /* CONF: dis. internal bridge */
324#define IEEE80211_F_WMEUPDATE 0x20000000 /* STATUS: update beacon wme */
325#define IEEE80211_F_DOTH 0x40000000 /* CONF: 11h enabled */
326
327/* Atheros protocol-specific flags */
328#define IEEE80211_F_ATHEROS \
329 (IEEE80211_F_FF | IEEE80211_F_COMP | IEEE80211_F_TURBOP)
330/* Check if an Atheros capability was negotiated for use */
331#define IEEE80211_ATH_CAP(ic, ni, bit) \
332 ((ic)->ic_flags & (ni)->ni_ath_flags & (bit))
333
334/* ic_flags_ext */
335#define IEEE80211_FEXT_WDS 0x00000001 /* CONF: 4 addr allowed */
336#define IEEE80211_FEXT_INACT 0x00000002 /* CONF: sta inact handling */
337/* 0x00000006 reserved */
338#define IEEE80211_FEXT_BGSCAN 0x00000008 /* STATUS: complete bgscan */
327#define IEEE80211_F_DOTH 0x40000000 /* CONF: 11h enabled */
328
329/* Atheros protocol-specific flags */
330#define IEEE80211_F_ATHEROS \
331 (IEEE80211_F_FF | IEEE80211_F_COMP | IEEE80211_F_TURBOP)
332/* Check if an Atheros capability was negotiated for use */
333#define IEEE80211_ATH_CAP(ic, ni, bit) \
334 ((ic)->ic_flags & (ni)->ni_ath_flags & (bit))
335
336/* ic_flags_ext */
337#define IEEE80211_FEXT_WDS 0x00000001 /* CONF: 4 addr allowed */
338#define IEEE80211_FEXT_INACT 0x00000002 /* CONF: sta inact handling */
339/* 0x00000006 reserved */
340#define IEEE80211_FEXT_BGSCAN 0x00000008 /* STATUS: complete bgscan */
339#define IEEE80211_FEXT_ERPUPDATE 0x00000200 /* STATUS: update ERP element */
341#define IEEE80211_FEXT_NONERP_PR 0x00000200 /* STATUS: non-ERP sta present*/
340#define IEEE80211_FEXT_SWBMISS 0x00000400 /* CONF: do bmiss in s/w */
341#define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/
342#define IEEE80211_FEXT_HT 0x00080000 /* CONF: HT supported */
343#define IEEE80211_FEXT_AMPDU_TX 0x00100000 /* CONF: A-MPDU tx supported */
344#define IEEE80211_FEXT_AMPDU_RX 0x00200000 /* CONF: A-MPDU tx supported */
345#define IEEE80211_FEXT_AMSDU_TX 0x00400000 /* CONF: A-MSDU tx supported */
346#define IEEE80211_FEXT_AMSDU_RX 0x00800000 /* CONF: A-MSDU tx supported */
347#define IEEE80211_FEXT_USEHT40 0x01000000 /* CONF: 20/40 use enabled */

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

455ieee80211_anyhdrspace(struct ieee80211com *ic, const void *data)
456{
457 int size = ieee80211_anyhdrsize(data);
458 if (ic->ic_flags & IEEE80211_F_DATAPAD)
459 size = roundup(size, sizeof(uint32_t));
460 return size;
461}
462
342#define IEEE80211_FEXT_SWBMISS 0x00000400 /* CONF: do bmiss in s/w */
343#define IEEE80211_FEXT_PROBECHAN 0x00020000 /* CONF: probe passive channel*/
344#define IEEE80211_FEXT_HT 0x00080000 /* CONF: HT supported */
345#define IEEE80211_FEXT_AMPDU_TX 0x00100000 /* CONF: A-MPDU tx supported */
346#define IEEE80211_FEXT_AMPDU_RX 0x00200000 /* CONF: A-MPDU tx supported */
347#define IEEE80211_FEXT_AMSDU_TX 0x00400000 /* CONF: A-MSDU tx supported */
348#define IEEE80211_FEXT_AMSDU_RX 0x00800000 /* CONF: A-MSDU tx supported */
349#define IEEE80211_FEXT_USEHT40 0x01000000 /* CONF: 20/40 use enabled */

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

457ieee80211_anyhdrspace(struct ieee80211com *ic, const void *data)
458{
459 int size = ieee80211_anyhdrsize(data);
460 if (ic->ic_flags & IEEE80211_F_DATAPAD)
461 size = roundup(size, sizeof(uint32_t));
462 return size;
463}
464
465/*
466 * Notify a driver that beacon state has been updated.
467 */
468static __inline void
469ieee80211_beacon_notify(struct ieee80211com *ic, int what)
470{
471 if (ic->ic_state == IEEE80211_S_RUN)
472 ic->ic_update_beacon(ic, what);
473}
474
463#define IEEE80211_MSG_11N 0x80000000 /* 11n mode debug */
464#define IEEE80211_MSG_DEBUG 0x40000000 /* IFF_DEBUG equivalent */
465#define IEEE80211_MSG_DUMPPKTS 0x20000000 /* IFF_LINK2 equivalant */
466#define IEEE80211_MSG_CRYPTO 0x10000000 /* crypto work */
467#define IEEE80211_MSG_INPUT 0x08000000 /* input handling */
468#define IEEE80211_MSG_XRATE 0x04000000 /* rate set handling */
469#define IEEE80211_MSG_ELEMID 0x02000000 /* element id parsing */
470#define IEEE80211_MSG_NODE 0x01000000 /* node handling */

--- 103 unchanged lines hidden ---
475#define IEEE80211_MSG_11N 0x80000000 /* 11n mode debug */
476#define IEEE80211_MSG_DEBUG 0x40000000 /* IFF_DEBUG equivalent */
477#define IEEE80211_MSG_DUMPPKTS 0x20000000 /* IFF_LINK2 equivalant */
478#define IEEE80211_MSG_CRYPTO 0x10000000 /* crypto work */
479#define IEEE80211_MSG_INPUT 0x08000000 /* input handling */
480#define IEEE80211_MSG_XRATE 0x04000000 /* rate set handling */
481#define IEEE80211_MSG_ELEMID 0x02000000 /* element id parsing */
482#define IEEE80211_MSG_NODE 0x01000000 /* node handling */

--- 103 unchanged lines hidden ---