⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ieee80211_var.h.svn-base

📁 最新之atheros芯片driver source code, 基于linux操作系统,內含atheros芯片HAL全部代码
💻 SVN-BASE
📖 第 1 页 / 共 3 页
字号:
/*- * Copyright (c) 2001 Atsushi Onoe * Copyright (c) 2002-2005 Sam Leffler, Errno Consulting * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products *    derived from this software without specific prior written permission. * * Alternatively, this software may be distributed under the terms of the * GNU General Public License ("GPL") version 2 as published by the Free * Software Foundation. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $Id$ */#ifndef _NET80211_IEEE80211_VAR_H_#define _NET80211_IEEE80211_VAR_H_/* Definitions for IEEE 802.11 drivers. */#include <net80211/ieee80211_linux.h>#include <sys/queue.h>#include <net80211/_ieee80211.h>#include <net80211/ieee80211.h>#include <net80211/ieee80211_crypto.h>#include <net80211/ieee80211_ioctl.h>		/* for ieee80211_stats */#include <net80211/ieee80211_power.h>#include <net80211/ieee80211_proto.h>#include <net80211/ieee80211_scan.h>/* NB:  * - Atheros chips use 6 bits when power is specified in whole dBm units, with  *   a value range from 0 to 63. * - Atheros chips use 7 bits when power is specified in half dBm units, with  *   a value range from 0 to 127. */#define	IEEE80211_TXPOWER_MAX		127	/* .5 dBm units */#define	IEEE80211_TXPOWER_MIN		0	/* kill radio */#define	IEEE80211_DTIM_MAX		15	/* max DTIM period */#define	IEEE80211_DTIM_MIN		1	/* min DTIM period */#define	IEEE80211_DTIM_DEFAULT		1	/* default DTIM period */#define	IEEE80211_BINTVAL_MAX		1000	/* max beacon interval (TUs) */#define	IEEE80211_BINTVAL_MIN		25	/* min beacon interval (TUs) */#define	IEEE80211_BINTVAL_DEFAULT 	100	/* default beacon interval (TUs) */#define IEEE80211_BINTVAL_VALID(_bi) \	((IEEE80211_BINTVAL_MIN <= (_bi)) && \	 ((_bi) <= IEEE80211_BINTVAL_MAX))#define IEEE80211_BINTVAL_SANITISE(_bi) \	(IEEE80211_BINTVAL_VALID(_bi) ? \	 (_bi) : IEEE80211_BINTVAL_DEFAULT)#define IEEE80211_BMISSTHRESH_BMIN	2	/* min bmiss threshold (beacons) *//* Default beacon miss threshold is set to roundup from 850ms  * This is halfway between the 10@100ms default from prior hardcoded setting for * software beacon miss timers, and the 7@100ms default from prior hardcoded  * timer value for hardware beacon miss timer. * Based upon emperical evidence and practices of commercial vendors, I believe * this should really be 2500ms by default. */#define IEEE80211_BMISSTHRESH_DEFAULT_MS 850#define IEEE80211_BMISSTHRESH_VALID(_bmt) \	(IEEE80211_BMISSTHRESH_BMIN <= (_bmt))#define IEEE80211_BMISSTHRESH_SANITISE(_bmt) \	((IEEE80211_BMISSTHRESH_BMIN > (_bmt)) ? \	 IEEE80211_BMISSTHRESH_BMIN : (_bmt))#define	IEEE80211_BGSCAN_INTVAL_MIN	15	/* min bg scan intvl (secs) */#define	IEEE80211_BGSCAN_INTVAL_DEFAULT	(5 * 60)	/* default BG scan int. */#define	IEEE80211_BGSCAN_IDLE_MIN	100	/* min idle time (ms) */#define	IEEE80211_BGSCAN_IDLE_DEFAULT	250	/* default idle time (ms) */#define IEEE80211_COVERAGE_CLASS_MAX	31	/* max coverage class */#define IEEE80211_REGCLASSIDS_MAX	10	/* max regclass id list */#define	IEEE80211_PS_SLEEP	0x1		/* STA is in power saving mode */#define	IEEE80211_PS_MAX_QUEUE	50		/* maximum saved packets */#define	IEEE80211_XR_BEACON_FACTOR	3	/* factor between xr Beacon interval and normal beacon interval */#define	IEEE80211_XR_DEFAULT_RATE_INDEX	0#define	IEEE80211_XR_FRAG_THRESHOLD	540#define	IEEE80211_FIXED_RATE_NONE	-1#define DEV_NAME(_d) \	 ((NULL == _d || NULL == _d->name || 0 == strncmp(_d->name, "wifi%d", 6)) ? \	  "MadWifi" : \	  _d->name)#define VAP_DEV_NAME(_v) \	 ((NULL == _v) ? \	  "MadWifi" : \	  DEV_NAME(_v->iv_dev))#define SC_DEV_NAME(_sc) \	 ((NULL == _sc) ? \	  "MadWifi" : \	  DEV_NAME(_sc->sc_dev))#define VAP_IC_DEV_NAME(_v) \	 ((NULL == _v || NULL == _v->iv_ic) ? \	  "MadWifi" : \	  DEV_NAME(_v->iv_ic->ic_dev))/* * TU conversions: * * TU is a 32bit value and defined by IEEE802.11 (page 6) as "A measurement of * time equal to 1024 usec (microseconds)". * * TSF is a 64bit value in usec, therefore if we right shift it by 10 bit this * will directly convert it to TU. The rest is truncated to fit into 32 bit. */#define	IEEE80211_TSF_TO_TU(_tsf)	((u_int32_t)((_tsf) >> 10))#define	IEEE80211_MS_TO_TU(x)	(((x) * 1000) / 1024)#define	IEEE80211_TU_TO_MS(x)	(((x) * 1024) / 1000)#define	IEEE80211_TU_TO_JIFFIES(x) ((IEEE80211_TU_TO_MS(x) * HZ) / 1000)#define	IEEE80211_JIFFIES_TO_TU(x) IEEE80211_MS_TO_TU((x) * 1000 / HZ)#define	IEEE80211_APPIE_MAX	1024#define IEEE80211_PWRCONSTRAINT_VAL(ic) \	(((ic)->ic_bsschan->ic_maxregpower > (ic)->ic_curchanmaxpwr) ? \	    (ic)->ic_bsschan->ic_maxregpower - (ic)->ic_curchanmaxpwr : 0)/* 802.11 control state is split into a common portion that maps * 1-1 to a physical device and one or more "Virtual APs" (VAP) * that are bound to an ieee80211com instance and share a single * underlying device.  Each VAP has a corresponding OS device * entity through which traffic flows and that applications use * for issuing ioctls, etc. *//* Data common to one or more virtual APs.  State shared by * the underlying device and the net80211 layer is exposed here; * e.g. device-specific callbacks. */struct ieee80211com;struct ieee80211_proc_entry;struct vlan_group;struct eapolcom;struct ieee80211_aclator;struct ieee80211_nsparams {	enum ieee80211_state newstate;	int arg;	int result;};#define IW_MAX_SPY 8struct ieee80211_spy {	u_int8_t mac[IW_MAX_SPY * IEEE80211_ADDR_LEN];	u_int64_t ts_rssi[IW_MAX_SPY];		/* ts of rssi value from last read */	u_int8_t thr_low;			/* 1 byte rssi value, 0 = threshold is off */	u_int8_t thr_high;			/* 1 byte rssi value */	u_int8_t num;};struct ieee80211_app_ie {	u_int32_t		length;		/* buffer length */	struct ieee80211_ie    *ie;		/* buffer containing one or more IEs */};struct ieee80211vap {	struct net_device *iv_dev;			/* associated device */	struct net_device_stats	iv_devstats;		/* interface statistics */	struct ifmedia iv_media;			/* interface media config */	struct iw_statistics iv_iwstats;		/* wireless statistics block */	struct ctl_table_header	*iv_sysctl_header;	struct ctl_table *iv_sysctls;	struct proc_dir_entry *iv_proc;	struct ieee80211_proc_entry *iv_proc_entries;	struct vlan_group *iv_vlgrp;			/* vlan group state */	TAILQ_ENTRY(ieee80211vap) iv_next;		/* list of vap instances */	struct ieee80211com *iv_ic;			/* back ptr to common state */	u_int32_t iv_debug;				/* debug msg flags */	struct ieee80211_stats iv_stats;		/* statistics */	int iv_monitor_nods_only;			/* in monitor mode only nods traffic */	int iv_monitor_txf_len;				/* in monitor mode, truncate tx packets */	int iv_monitor_phy_errors;			/* in monitor mode, accept phy errors */	int iv_monitor_crc_errors;			/* in monitor mode, accept crc errors */	int (*iv_newstate)(struct ieee80211vap *, enum ieee80211_state, int);	u_int8_t iv_myaddr[IEEE80211_ADDR_LEN];	u_int32_t iv_flags;				/* state flags */	u_int32_t iv_flags_ext;				/* extension of state flags */	u_int32_t iv_caps;				/* capabilities */	u_int8_t iv_ath_cap;				/* Atheros adv. capabilities */	enum ieee80211_opmode iv_opmode;		/* operation mode */	enum ieee80211_state iv_state;			/* state machine state */	struct timer_list iv_mgtsend;			/* mgmt frame response timer */							/* inactivity timer settings */	int iv_inact_init;				/* setting for new station */	int iv_inact_auth;				/* auth but not assoc setting */	int iv_inact_run;				/* authorized setting */	int iv_inact_probe;				/* inactive probe time */	int iv_des_nssid;				/* # desired ssids */	struct ieee80211_scan_ssid iv_des_ssid[1];	/* desired ssid table */	u_int8_t iv_des_bssid[IEEE80211_ADDR_LEN];	struct ieee80211_channel *iv_des_chan;		/* desired channel */	u_int16_t iv_des_mode;				/* desired mode */	int iv_nicknamelen;				/* XXX junk */	u_int8_t iv_nickname[IEEE80211_NWID_LEN];	u_int iv_bgscanidle;				/* bg scan idle threshold */	u_int iv_bgscanintvl;				/* bg scan min interval */	u_int iv_scanvalid;				/* scan cache valid threshold */	struct ieee80211_roam iv_roam;			/* sta-mode roaming state */	unsigned long iv_csa_jiffies;			/* last csa recv jiffies */	u_int8_t iv_csa_count;				/* last csa count */	struct ieee80211_channel *iv_csa_chan;		/* last csa channel */	u_int8_t iv_csa_mode;				/* last csa mode */	struct timer_list iv_csa_timer;			/* csa timer */	u_int32_t *iv_aid_bitmap;			/* association id map */	u_int16_t iv_max_aid;	u_int16_t iv_sta_assoc;				/* stations associated */	u_int16_t iv_ps_sta;				/* stations in power save */	u_int16_t iv_ps_pending;			/* PS STAs w/ pending frames */	u_int8_t *iv_tim_bitmap;			/* power-save stations w/ data */	u_int16_t iv_tim_len;				/* ic_tim_bitmap size (bytes) */	u_int8_t iv_dtim_period;			/* DTIM period */	u_int8_t iv_dtim_count;				/* DTIM count from last bcn */							/* set/unset aid pwrsav state */	void (*iv_set_tim)(struct ieee80211_node *, int);	u_int8_t iv_uapsdinfo;				/* sta mode QoS Info flags */	struct ieee80211_node *iv_bss;			/* information for this node */	u_int8_t iv_bssid[IEEE80211_ADDR_LEN];	int iv_fixed_rate;				/* 802.11 rate or IEEE80211_FIXED_RATE_NONE */	u_int16_t iv_rtsthreshold;	u_int16_t iv_fragthreshold;	u_int16_t iv_txmin;				/* min tx retry count */	u_int16_t iv_txmax;				/* max tx retry count */	u_int16_t iv_txlifetime;			/* tx lifetime */	int iv_inact_timer;				/* inactivity timer wait */	void *iv_opt_ie;				/* user-specified IEs */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -