📄 ieee80211_var.h.svn-base
字号:
u_int16_t iv_opt_ie_len; /* length of ni_opt_ie */ ieee80211_keyix_t iv_def_txkey; /* default/group TX key index */ struct ieee80211_key iv_nw_keys[IEEE80211_WEP_NKID]; ieee80211_keyix_t (*iv_key_alloc)(struct ieee80211vap *, const struct ieee80211_key *); int (*iv_key_delete)(struct ieee80211vap *, const struct ieee80211_key *, struct ieee80211_node *); int (*iv_key_set)(struct ieee80211vap *, const struct ieee80211_key *, const u_int8_t mac[IEEE80211_ADDR_LEN]); void (*iv_key_update_begin)(struct ieee80211vap *); void (*iv_key_update_end)(struct ieee80211vap *);#ifdef ATH_SUPERG_COMP void (*iv_comp_set)(struct ieee80211vap *, struct ieee80211_node *, int);#endif const struct ieee80211_authenticator *iv_auth; /* authenticator glue */ void *iv_ec; /* private auth state */ struct ieee80211vap *iv_xrvap; /* pointer to XR VAP , if XR is enabled */ u_int16_t iv_xrbcnwait; /* SWBA count incremented until it reaches XR_BECON_FACTOR */ struct timer_list iv_xrvapstart; /* timer to start xr */ u_int8_t iv_chanchange_count; /* 11h counter for channel change */ int iv_mcast_rate; /* Multicast rate (Kbps) */ const struct ieee80211_aclator *iv_acl; /* aclator glue */ void *iv_as; /* private aclator state */ struct timer_list iv_swbmiss; /* software beacon miss timer */ u_int16_t iv_swbmiss_period; /* software beacon miss timer period */ struct ieee80211_nsparams iv_nsparams; /* new state parameters for tasklet for stajoin1 */ struct IEEE80211_TQ_STRUCT iv_stajoin1tq; /* tasklet for newstate action called from stajoin1tq */ unsigned int iv_nsdone; /* Done with scheduled newstate tasklet */ uint8_t wds_mac[IEEE80211_ADDR_LEN]; struct ieee80211_spy iv_spy; /* IWSPY support */ struct ieee80211_app_ie app_ie[IEEE80211_APPIE_NUM_OF_FRAME]; /* app-specified IEs by frame type */ u_int32_t app_filter; /* filters which management frames are forwarded to app */};/* Debug functions need the definition of struct ieee80211vap because iv_debug * is used at runtime to determine if we should log an event */#include <net80211/ieee80211_debug.h>#include <net80211/ieee80211_node.h>#include <net80211/ieee80211_skb.h>struct ieee80211com { struct net_device *ic_dev; /* associated device */ ieee80211com_lock_t ic_comlock; /* state update lock */ ieee80211com_lock_t ic_vapslock; /* vap state machine lock */ TAILQ_HEAD(ieee80211vap_headtype, ieee80211vap) ic_vaps; /* list of vap instances */ enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ enum ieee80211_opmode ic_opmode; /* operation mode */ struct ifmedia ic_media; /* interface media config */ u_int8_t ic_myaddr[IEEE80211_ADDR_LEN]; struct timer_list ic_inact; /* mgmt/inactivity timer */ u_int32_t ic_flags; /* state flags */ u_int32_t ic_flags_ext; /* extension of state flags */ u_int32_t ic_caps; /* capabilities */ u_int8_t ic_ath_cap; /* Atheros adv. capabilities */ u_int8_t ic_promisc; /* VAPs needing promisc mode */ u_int8_t ic_allmulti; /* VAPs needing all multicast */ u_int8_t ic_nopened; /* VAPs been opened */ struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; struct ieee80211_rateset ic_sup_xr_rates; struct ieee80211_rateset ic_sup_half_rates; struct ieee80211_rateset ic_sup_quarter_rates; u_int16_t ic_modecaps; /* set of mode capabilities */ u_int16_t ic_curmode; /* current mode */ u_int16_t ic_lintval; /* beacon interval */ u_int16_t ic_holdover; /* PM hold over duration */ u_int16_t ic_bmissthreshold; /* beacon miss threshold (# beacons) */ unsigned long ic_bmiss_guard; /* when to cease ignoring bmiss (jiffies) */ u_int16_t ic_txpowlimit; /* global tx power limit (in 0.5 dBm) */ u_int16_t ic_newtxpowlimit; /* tx power limit to change to (in 0.5 dBm) */ u_int16_t ic_uapsdmaxtriggers; /* max triggers that could arrive */ u_int8_t ic_coverageclass; /* coverage class */ /* Channel state: * * ic_channels is the set of available channels for the device; * it is setup by the driver * ic_nchans is the number of valid entries in ic_channels * ic_chan_avail is a bit vector of these channels used to check * whether a channel is available w/o searching the channel table. * ic_chan_active is a (potentially) constrained subset of * ic_chan_avail that reflects any mode setting or user-specified * limit on the set of channels to use/scan * ic_curchan is the current channel the device is set to; it may * be different from ic_bsschan when we are off-channel scanning * or otherwise doing background work * ic_bsschan is the channel selected for operation; it may * be undefined (IEEE80211_CHAN_ANYC) */ int ic_nchans; /* # entries in ic_channels */ struct ieee80211_channel ic_channels[IEEE80211_CHAN_MAX+1]; struct timeval ic_chan_non_occupy[IEEE80211_CHAN_MAX]; u_int8_t ic_chan_avail[IEEE80211_CHAN_BYTES]; u_int8_t ic_chan_active[IEEE80211_CHAN_BYTES]; struct ieee80211_channel *ic_curchan; /* current channel */ struct ieee80211_channel *ic_bsschan; /* bss channel */ int16_t ic_channoise; /* current channel noise in dBm */ struct timer_list ic_dfs_excl_timer; /* * Spectrum management (IEEE 802.11h-2003): * * ic_chan_nodes is an array of numbers of nodes that provide * ni_suppchans with the given channel reported as supported. Index * of the array is an IEEE channel number (ic_ieee) * ic_cn_total is the number of nodes counted in ic_chan_nodes * (provided ni_suppchans and are associated) * ic_sc_mincom is the desired minimum number of common channels, the * parameter used by SC_TIGHT and SC_STRICT algorithms * ic_sc_algorithm is the algorithm for (re)association based on * supported channels * ic_sc_slcg is the permil of Stations Lost per Channel Gained, the * parameter used by SC_TIGHT and SC_STRICT algorithms. If due to * association of the STA and disassociation of x other STAs (out of * y associated STAs in total), the number of common channel * increases by z, then such an action is performed if * 1000 * x/y < z * ic_sc_slcg * ic_sc_sldg is the permil of Stations Lost per rssi Db Gained, the * parameter used by SC_LOOSE algorithm. If due to the switch, * the maximum RSSI of received packets on the current channel would * decrease by z decibels and x stations from the set of y stations * would be lost, then such a switch will be performed if * 1000 * x/y < z * ic_sc_sldg * ic_sc_ie is the Supported Channels IE that is about to be sent along * with (re)assoc requests (STA mode) */ u_int16_t ic_chan_nodes[IEEE80211_CHAN_MAX+1]; u_int16_t ic_cn_total; /* # nodes counted in ic_chan nodes */ u_int16_t ic_sc_mincom; /* minimum number of common channels */ enum ieee80211_sc_algorithm ic_sc_algorithm; u_int16_t ic_sc_slcg; /* permil of Stations Lost per Channel Gained */ u_int16_t ic_sc_sldg; /* permil of Stations Lost per rssi Db Gained */ struct ieee80211_ie_sc ic_sc_ie; /* Supported Channels IE */ /* Regulatory class ids */ u_int ic_nregclass; /* # entries in ic_regclassids */ u_int8_t ic_regclassids[IEEE80211_REGCLASSIDS_MAX]; /* Scan-related state */ struct ieee80211_scan_state *ic_scan; /* scan state */ enum ieee80211_roamingmode ic_roaming; /* roaming mode */ unsigned long ic_lastdata; /* time of last data frame */ unsigned long ic_lastscan; /* time last scan completed */ /* NB: this is the union of all vap stations/neighbors */ struct ieee80211_node_table ic_sta; /* stations/neighbors */ /* XXX Multi-BSS: split out common/VAP parts? */ struct ieee80211_wme_state ic_wme; /* WME/WMM state */ /* XXX Multi-BSS: can per-VAP be done/make sense? */ enum ieee80211_protmode ic_protmode; /* 802.11g protection mode */ int ic_rssi_ewma; u_int16_t ic_nonerpsta; /* # non-ERP stations */ u_int16_t ic_longslotsta; /* # long slot time stations */ u_int16_t ic_sta_assoc; /* stations associated */ u_int16_t ic_dt_sta_assoc; /* dturbo capable stations */ u_int16_t ic_xr_sta_assoc; /* XR stations associated */ /* Spectrum management. */ u_int16_t ic_country_code; int ic_country_outdoor; struct ieee80211_ie_country ic_country_ie; /* country info element */ /* Current channel max. power, used to compute Power Constraint IE. * * NB: local power constraint depends on the channel, but assuming it must * be detected dynamically, we cannot maintain a table (i.e., will not * know value until change to channel and detect). */ u_int8_t ic_curchanmaxpwr; u_int8_t ic_chanchange_tbtt; u_int8_t ic_chanchange_chan; /* Global debug flags applicable to all VAPs */ int ic_debug; /* used for reference tracking/counting. Nodes are shared between VAPs, * so we put this here. */ atomic_t ic_node_counter; /* Virtual AP create/delete */ struct ieee80211vap *(*ic_vap_create)(struct ieee80211com *, const char *, int, int, struct net_device *); void (*ic_vap_delete)(struct ieee80211vap *); /* Send/recv 802.11 management frame */ int (*ic_send_mgmt)(struct ieee80211_node *, int, int); int (*ic_recv_mgmt)(struct ieee80211vap *, struct ieee80211_node *, struct sk_buff *, int, int, u_int64_t); /* Send management frame to driver (like hardstart) */ int (*ic_mgtstart)(struct ieee80211com *, struct sk_buff *); /* Reset device state after 802.11 parameter/state change */ int (*ic_init)(struct net_device *); int (*ic_reset)(struct net_device *); /* Update device state for 802.11 slot time change */ void (*ic_updateslot)(struct net_device *); /* New station association callback/notification */ void (*ic_newassoc)(struct ieee80211_node *, int); /* Node state management */ int32_t (*ic_node_count)(struct ieee80211com *); struct ieee80211_node *(*ic_node_alloc)(struct ieee80211vap *); void (*ic_node_cleanup)(struct ieee80211_node *); void (*ic_node_free)(struct ieee80211_node *); u_int8_t (*ic_node_getrssi)(const struct ieee80211_node *); u_int8_t (*ic_node_move_data)(const struct ieee80211_node *); /* Scanning support */ void (*ic_scan_start)(struct ieee80211com *); void (*ic_scan_end)(struct ieee80211com *); void (*ic_set_channel)(struct ieee80211com *); /* U-APSD support */ void (*ic_uapsd_flush)(struct ieee80211_node *); /* continuous transmission support */ void (*ic_set_txcont)(struct ieee80211com *, int); int (*ic_get_txcont)(struct ieee80211com *); void (*ic_set_txcont_power)(struct ieee80211com *, u_int); int (*ic_get_txcont_power)(struct ieee80211com *); void (*ic_set_txcont_rate)(struct ieee80211com *, u_int); u_int (*ic_get_txcont_rate)(struct ieee80211com *); /* DFS test mode prevents marking channel interference and channel * switching during detection probability tests */ void (*ic_set_dfs_testmode)(struct ieee80211com *, int); int (*ic_get_dfs_testmode)(struct ieee80211com *); /* inject a fake radar signal -- used while on a 802.11h DFS channels */ unsigned int (*ic_test_radar)(struct ieee80211com *); /* dump HAL */ unsigned int (*ic_dump_hal_map)(struct ieee80211com *); /* DFS channel availability check time (in seconds) */ void (*ic_set_dfs_cac_time)(struct ieee80211com *, unsigned int); unsigned int (*ic_get_dfs_cac_time)(struct ieee80211com *); /* DFS non-occupancy period (in seconds) */ void (*ic_set_dfs_excl_period)(struct ieee80211com *, unsigned int); unsigned int (*ic_get_dfs_excl_period)(struct ieee80211com *); /* Set coverage class */ void (*ic_set_coverageclass)(struct ieee80211com *); /* MHz to IEEE channel conversion */ u_int (*ic_mhz2ieee)(struct ieee80211com *, u_int, u_int);#ifdef ATH_REVERSE_ENGINEERING /* debug and reverse engineering hooks */ void (*ic_registers_dump)(struct ieee80211com *); void (*ic_registers_mark)(struct ieee80211com *); void (*ic_registers_dump_delta)(struct ieee80211com *); unsigned int (*ic_write_register)(struct ieee80211com *, unsigned int, unsigned int);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -