Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_var.h
Show First 20 Lines • Show All 169 Lines • ▼ Show 20 Lines | struct ieee80211com { | ||||
uint8_t ic_allmulti; /* vap's needing all multicast*/ | uint8_t ic_allmulti; /* vap's needing all multicast*/ | ||||
uint8_t ic_nrunning; /* vap's marked running */ | uint8_t ic_nrunning; /* vap's marked running */ | ||||
uint8_t ic_curmode; /* current mode */ | uint8_t ic_curmode; /* current mode */ | ||||
uint8_t ic_macaddr[IEEE80211_ADDR_LEN]; | uint8_t ic_macaddr[IEEE80211_ADDR_LEN]; | ||||
uint16_t ic_bintval; /* beacon interval */ | uint16_t ic_bintval; /* beacon interval */ | ||||
uint16_t ic_lintval; /* listen interval */ | uint16_t ic_lintval; /* listen interval */ | ||||
uint16_t ic_holdover; /* PM hold over duration */ | uint16_t ic_holdover; /* PM hold over duration */ | ||||
uint16_t ic_txpowlimit; /* global tx power limit */ | uint16_t ic_txpowlimit; /* global tx power limit */ | ||||
struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; | |||||
const struct ieee80211_rateset *ic_sup_rates[IEEE80211_MODE_MAX]; | |||||
struct ieee80211_htrateset ic_sup_htrates; | struct ieee80211_htrateset ic_sup_htrates; | ||||
struct ieee80211_htrateset ic_sup_vhtrates; | |||||
/* | /* | ||||
* Channel state: | * Channel state: | ||||
* | * | ||||
* ic_channels is the set of available channels for the device; | * ic_channels is the set of available channels for the device; | ||||
* it is setup by the driver | * it is setup by the driver | ||||
* ic_nchans is the number of valid entries in ic_channels | * ic_nchans is the number of valid entries in ic_channels | ||||
* ic_chan_avail is a bit vector of these channels used to check | * ic_chan_avail is a bit vector of these channels used to check | ||||
▲ Show 20 Lines • Show All 245 Lines • ▼ Show 20 Lines | struct ieee80211vap { | ||||
u_int iv_scanreq_duration; | u_int iv_scanreq_duration; | ||||
u_int iv_scanreq_mindwell; | u_int iv_scanreq_mindwell; | ||||
u_int iv_scanreq_maxdwell; | u_int iv_scanreq_maxdwell; | ||||
uint16_t iv_scanreq_flags;/* held scan request params */ | uint16_t iv_scanreq_flags;/* held scan request params */ | ||||
uint8_t iv_scanreq_nssid; | uint8_t iv_scanreq_nssid; | ||||
struct ieee80211_scan_ssid iv_scanreq_ssid[IEEE80211_SCAN_MAX_SSID]; | struct ieee80211_scan_ssid iv_scanreq_ssid[IEEE80211_SCAN_MAX_SSID]; | ||||
/* sta-mode roaming state */ | /* sta-mode roaming state */ | ||||
enum ieee80211_roamingmode iv_roaming; /* roaming mode */ | enum ieee80211_roamingmode iv_roaming; /* roaming mode */ | ||||
struct ieee80211_roamparam iv_roamparms[IEEE80211_MODE_MAX]; | struct ieee80211_roamparam_vht iv_roamparms[IEEE80211_MODE_MAX]; | ||||
uint8_t iv_bmissthreshold; | uint8_t iv_bmissthreshold; | ||||
uint8_t iv_bmiss_count; /* current beacon miss count */ | uint8_t iv_bmiss_count; /* current beacon miss count */ | ||||
int iv_bmiss_max; /* max bmiss before scan */ | int iv_bmiss_max; /* max bmiss before scan */ | ||||
uint16_t iv_swbmiss_count;/* beacons in last period */ | uint16_t iv_swbmiss_count;/* beacons in last period */ | ||||
uint16_t iv_swbmiss_period;/* s/w bmiss period */ | uint16_t iv_swbmiss_period;/* s/w bmiss period */ | ||||
struct callout iv_swbmiss; /* s/w beacon miss timer */ | struct callout iv_swbmiss; /* s/w beacon miss timer */ | ||||
Show All 19 Lines | struct ieee80211vap { | ||||
uint8_t iv_quiet_count; /* constant count for Quiet Element */ | uint8_t iv_quiet_count; /* constant count for Quiet Element */ | ||||
uint8_t iv_quiet_count_value; /* variable count for Quiet Element */ | uint8_t iv_quiet_count_value; /* variable count for Quiet Element */ | ||||
uint8_t iv_quiet_period; /* period for Quiet Element */ | uint8_t iv_quiet_period; /* period for Quiet Element */ | ||||
uint16_t iv_quiet_duration; /* duration for Quiet Element */ | uint16_t iv_quiet_duration; /* duration for Quiet Element */ | ||||
uint16_t iv_quiet_offset; /* offset for Quiet Element */ | uint16_t iv_quiet_offset; /* offset for Quiet Element */ | ||||
int iv_csa_count; /* count for doing CSA */ | int iv_csa_count; /* count for doing CSA */ | ||||
struct ieee80211_node *iv_bss; /* information for this node */ | struct ieee80211_node *iv_bss; /* information for this node */ | ||||
struct ieee80211_txparam iv_txparms[IEEE80211_MODE_MAX]; | struct ieee80211_txparam_vht iv_txparms[IEEE80211_MODE_MAX]; | ||||
uint16_t iv_rtsthreshold; | uint16_t iv_rtsthreshold; | ||||
uint16_t iv_fragthreshold; | uint16_t iv_fragthreshold; | ||||
int iv_inact_timer; /* inactivity timer wait */ | int iv_inact_timer; /* inactivity timer wait */ | ||||
/* application-specified IE's to attach to mgt frames */ | /* application-specified IE's to attach to mgt frames */ | ||||
struct ieee80211_appie *iv_appie_beacon; | struct ieee80211_appie *iv_appie_beacon; | ||||
struct ieee80211_appie *iv_appie_probereq; | struct ieee80211_appie *iv_appie_probereq; | ||||
struct ieee80211_appie *iv_appie_proberesp; | struct ieee80211_appie *iv_appie_proberesp; | ||||
struct ieee80211_appie *iv_appie_assocreq; | struct ieee80211_appie *iv_appie_assocreq; | ||||
▲ Show 20 Lines • Show All 205 Lines • ▼ Show 20 Lines | |||||
int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *, | int ieee80211_vap_setup(struct ieee80211com *, struct ieee80211vap *, | ||||
const char name[IFNAMSIZ], int unit, | const char name[IFNAMSIZ], int unit, | ||||
enum ieee80211_opmode opmode, int flags, | enum ieee80211_opmode opmode, int flags, | ||||
const uint8_t bssid[IEEE80211_ADDR_LEN]); | const uint8_t bssid[IEEE80211_ADDR_LEN]); | ||||
int ieee80211_vap_attach(struct ieee80211vap *, | int ieee80211_vap_attach(struct ieee80211vap *, | ||||
ifm_change_cb_t, ifm_stat_cb_t, | ifm_change_cb_t, ifm_stat_cb_t, | ||||
const uint8_t macaddr[IEEE80211_ADDR_LEN]); | const uint8_t macaddr[IEEE80211_ADDR_LEN]); | ||||
void ieee80211_vap_detach(struct ieee80211vap *); | void ieee80211_vap_detach(struct ieee80211vap *); | ||||
const struct ieee80211_rateset *ieee80211_get_suprates(struct ieee80211com *ic, | |||||
const struct ieee80211_channel *); | |||||
const struct ieee80211_htrateset *ieee80211_get_suphtrates( | |||||
struct ieee80211com *, const struct ieee80211_channel *); | |||||
void ieee80211_announce(struct ieee80211com *); | void ieee80211_announce(struct ieee80211com *); | ||||
void ieee80211_announce_channels(struct ieee80211com *); | void ieee80211_announce_channels(struct ieee80211com *); | ||||
void ieee80211_drain(struct ieee80211com *); | void ieee80211_drain(struct ieee80211com *); | ||||
void ieee80211_chan_init(struct ieee80211com *); | void ieee80211_chan_init(struct ieee80211com *); | ||||
struct ieee80211com *ieee80211_find_vap(const uint8_t mac[IEEE80211_ADDR_LEN]); | struct ieee80211com *ieee80211_find_vap(const uint8_t mac[IEEE80211_ADDR_LEN]); | ||||
struct ieee80211com *ieee80211_find_com(const char *name); | struct ieee80211com *ieee80211_find_com(const char *name); | ||||
typedef void ieee80211_com_iter_func(void *, struct ieee80211com *); | typedef void ieee80211_com_iter_func(void *, struct ieee80211com *); | ||||
void ieee80211_iterate_coms(ieee80211_com_iter_func *, void *); | void ieee80211_iterate_coms(ieee80211_com_iter_func *, void *); | ||||
int ieee80211_media_change(struct ifnet *); | int ieee80211_media_change(struct ifnet *); | ||||
void ieee80211_media_status(struct ifnet *, struct ifmediareq *); | void ieee80211_media_status(struct ifnet *, struct ifmediareq *); | ||||
int ieee80211_ioctl(struct ifnet *, u_long, caddr_t); | int ieee80211_ioctl(struct ifnet *, u_long, caddr_t); | ||||
int ieee80211_rate2media(struct ieee80211com *, int, | int ieee80211_rate2media(struct ieee80211com *, | ||||
enum ieee80211_phymode); | const struct ieee80211_rate_t *, enum ieee80211_phymode); | ||||
int ieee80211_media2rate(int); | int ieee80211_media2rate(int); | ||||
int ieee80211_mhz2ieee(u_int, u_int); | int ieee80211_mhz2ieee(u_int, u_int); | ||||
int ieee80211_chan2ieee(struct ieee80211com *, | int ieee80211_chan2ieee(struct ieee80211com *, | ||||
const struct ieee80211_channel *); | const struct ieee80211_channel *); | ||||
u_int ieee80211_ieee2mhz(u_int, u_int); | u_int ieee80211_ieee2mhz(u_int, u_int); | ||||
int ieee80211_add_channel(struct ieee80211_channel[], int, int *, | int ieee80211_add_channel(struct ieee80211_channel[], int, int *, | ||||
uint8_t, uint16_t, int8_t, uint32_t, const uint8_t[]); | uint8_t, uint16_t, int8_t, uint32_t, const uint8_t[]); | ||||
int ieee80211_add_channel_ht40(struct ieee80211_channel[], int, int *, | int ieee80211_add_channel_ht40(struct ieee80211_channel[], int, int *, | ||||
uint8_t, int8_t, uint32_t); | uint8_t, int8_t, uint32_t); | ||||
uint32_t ieee80211_get_channel_center_freq(const struct ieee80211_channel *); | uint32_t ieee80211_get_channel_center_freq(const struct ieee80211_channel *); | ||||
uint32_t ieee80211_get_channel_center_freq1(const struct ieee80211_channel *); | uint32_t ieee80211_get_channel_center_freq1(const struct ieee80211_channel *); | ||||
uint32_t ieee80211_get_channel_center_freq2(const struct ieee80211_channel *); | uint32_t ieee80211_get_channel_center_freq2(const struct ieee80211_channel *); | ||||
int ieee80211_add_channel_list_2ghz(struct ieee80211_channel[], int, int *, | int ieee80211_add_channel_list_2ghz(struct ieee80211_channel[], int, int *, | ||||
const uint8_t[], int, const uint8_t[], int); | const uint8_t[], int, const uint8_t[], int); | ||||
int ieee80211_add_channel_list_5ghz(struct ieee80211_channel[], int, int *, | int ieee80211_add_channel_list_5ghz(struct ieee80211_channel[], int, int *, | ||||
const uint8_t[], int, const uint8_t[], int); | const uint8_t[], int, const uint8_t[], int); | ||||
struct ieee80211_channel *ieee80211_find_channel(struct ieee80211com *, | struct ieee80211_channel *ieee80211_find_channel(struct ieee80211com *, | ||||
int freq, int flags); | int freq, int flags); | ||||
struct ieee80211_channel *ieee80211_find_channel_byieee(struct ieee80211com *, | struct ieee80211_channel *ieee80211_find_channel_byieee(struct ieee80211com *, | ||||
int ieee, int flags); | int ieee, int flags); | ||||
struct ieee80211_channel *ieee80211_lookup_channel_rxstatus(struct ieee80211vap *, | struct ieee80211_channel *ieee80211_lookup_channel_rxstatus(struct ieee80211vap *, | ||||
const struct ieee80211_rx_stats *); | const struct ieee80211_rx_stats *); | ||||
int ieee80211_setmode(struct ieee80211com *, enum ieee80211_phymode); | void ieee80211_setmode(struct ieee80211com *, enum ieee80211_phymode); | ||||
enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *); | enum ieee80211_phymode ieee80211_chan2mode(const struct ieee80211_channel *); | ||||
uint32_t ieee80211_mac_hash(const struct ieee80211com *, | uint32_t ieee80211_mac_hash(const struct ieee80211com *, | ||||
const uint8_t addr[IEEE80211_ADDR_LEN]); | const uint8_t addr[IEEE80211_ADDR_LEN]); | ||||
char ieee80211_channel_type_char(const struct ieee80211_channel *c); | char ieee80211_channel_type_char(const struct ieee80211_channel *c); | ||||
#define ieee80211_get_current_channel(_ic) ((_ic)->ic_curchan) | #define ieee80211_get_current_channel(_ic) ((_ic)->ic_curchan) | ||||
#define ieee80211_get_home_channel(_ic) ((_ic)->ic_bsschan) | #define ieee80211_get_home_channel(_ic) ((_ic)->ic_bsschan) | ||||
#define ieee80211_get_vap_desired_channel(_iv) ((_iv)->iv_des_chan) | #define ieee80211_get_vap_desired_channel(_iv) ((_iv)->iv_des_chan) | ||||
Show All 10 Lines | void ieee80211_radiotap_attachv(struct ieee80211com *, | ||||
int rlen, int n_rx_v, uint32_t rx_radiotap); | int rlen, int n_rx_v, uint32_t rx_radiotap); | ||||
void ieee80211_radiotap_detach(struct ieee80211com *); | void ieee80211_radiotap_detach(struct ieee80211com *); | ||||
void ieee80211_radiotap_vattach(struct ieee80211vap *); | void ieee80211_radiotap_vattach(struct ieee80211vap *); | ||||
void ieee80211_radiotap_vdetach(struct ieee80211vap *); | void ieee80211_radiotap_vdetach(struct ieee80211vap *); | ||||
void ieee80211_radiotap_chan_change(struct ieee80211com *); | void ieee80211_radiotap_chan_change(struct ieee80211com *); | ||||
void ieee80211_radiotap_tx(struct ieee80211vap *, struct mbuf *); | void ieee80211_radiotap_tx(struct ieee80211vap *, struct mbuf *); | ||||
void ieee80211_radiotap_rx(struct ieee80211vap *, struct mbuf *); | void ieee80211_radiotap_rx(struct ieee80211vap *, struct mbuf *); | ||||
void ieee80211_radiotap_rx_all(struct ieee80211com *, struct mbuf *); | void ieee80211_radiotap_rx_all(struct ieee80211com *, struct mbuf *); | ||||
static __inline const struct ieee80211_rateset * | |||||
ieee80211_get_suprates(struct ieee80211com *ic, | |||||
const struct ieee80211_channel *c) | |||||
{ | |||||
return ic->ic_sup_rates[ieee80211_chan2mode(c)]; | |||||
} | |||||
static __inline const struct ieee80211_htrateset * | |||||
ieee80211_get_suphtrates(struct ieee80211com *ic) | |||||
{ | |||||
return &ic->ic_sup_htrates; | |||||
} | |||||
static __inline const struct ieee80211_htrateset * | |||||
ieee80211_get_supvhtrates(struct ieee80211com *ic) | |||||
{ | |||||
return &ic->ic_sup_vhtrates; | |||||
} | |||||
static __inline int | static __inline int | ||||
ieee80211_radiotap_active(const struct ieee80211com *ic) | ieee80211_radiotap_active(const struct ieee80211com *ic) | ||||
{ | { | ||||
return (ic->ic_flags_ext & IEEE80211_FEXT_BPF) != 0; | return (ic->ic_flags_ext & IEEE80211_FEXT_BPF) != 0; | ||||
} | } | ||||
static __inline int | static __inline int | ||||
▲ Show 20 Lines • Show All 263 Lines • Show Last 20 Lines |