Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/ieee80211_var.h
Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | |||||
struct ieee80211_tdma_param; | struct ieee80211_tdma_param; | ||||
struct ieee80211_rate_table; | struct ieee80211_rate_table; | ||||
struct ieee80211_tx_ampdu; | struct ieee80211_tx_ampdu; | ||||
struct ieee80211_rx_ampdu; | struct ieee80211_rx_ampdu; | ||||
struct ieee80211_superg; | struct ieee80211_superg; | ||||
struct ieee80211_frame; | struct ieee80211_frame; | ||||
struct ieee80211com { | struct ieee80211com { | ||||
struct ifnet *ic_ifp; /* associated device */ | |||||
void *ic_softc; /* driver softc */ | void *ic_softc; /* driver softc */ | ||||
const char *ic_name; /* usually device name */ | const char *ic_name; /* usually device name */ | ||||
ieee80211_com_lock_t ic_comlock; /* state update lock */ | ieee80211_com_lock_t ic_comlock; /* state update lock */ | ||||
ieee80211_tx_lock_t ic_txlock; /* ic/vap TX lock */ | ieee80211_tx_lock_t ic_txlock; /* ic/vap TX lock */ | ||||
LIST_ENTRY(ieee80211com) ic_next; /* on global list */ | |||||
TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ | TAILQ_HEAD(, ieee80211vap) ic_vaps; /* list of vap instances */ | ||||
int ic_headroom; /* driver tx headroom needs */ | int ic_headroom; /* driver tx headroom needs */ | ||||
enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ | enum ieee80211_phytype ic_phytype; /* XXX wrong for multi-mode */ | ||||
enum ieee80211_opmode ic_opmode; /* operation mode */ | enum ieee80211_opmode ic_opmode; /* operation mode */ | ||||
struct ifmedia ic_media; /* interface media config */ | |||||
struct callout ic_inact; /* inactivity processing */ | struct callout ic_inact; /* inactivity processing */ | ||||
struct taskqueue *ic_tq; /* deferred state thread */ | struct taskqueue *ic_tq; /* deferred state thread */ | ||||
struct task ic_parent_task; /* deferred parent processing */ | struct task ic_parent_task; /* deferred parent processing */ | ||||
struct task ic_promisc_task;/* deferred promisc update */ | struct task ic_promisc_task;/* deferred promisc update */ | ||||
struct task ic_mcast_task; /* deferred mcast update */ | struct task ic_mcast_task; /* deferred mcast update */ | ||||
struct task ic_chan_task; /* deferred channel change */ | struct task ic_chan_task; /* deferred channel change */ | ||||
struct task ic_bmiss_task; /* deferred beacon miss hndlr */ | struct task ic_bmiss_task; /* deferred beacon miss hndlr */ | ||||
struct task ic_chw_task; /* deferred HT CHW update */ | struct task ic_chw_task; /* deferred HT CHW update */ | ||||
Show All 9 Lines | struct ieee80211com { | ||||
uint32_t ic_htcaps; /* HT capabilities */ | uint32_t ic_htcaps; /* HT capabilities */ | ||||
uint32_t ic_htextcaps; /* HT extended capabilities */ | uint32_t ic_htextcaps; /* HT extended capabilities */ | ||||
uint32_t ic_cryptocaps; /* crypto capabilities */ | uint32_t ic_cryptocaps; /* crypto capabilities */ | ||||
uint8_t ic_modecaps[2]; /* set of mode capabilities */ | uint8_t ic_modecaps[2]; /* set of mode capabilities */ | ||||
uint8_t ic_promisc; /* vap's needing promisc mode */ | uint8_t ic_promisc; /* vap's needing promisc mode */ | ||||
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]; | |||||
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]; | struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; | ||||
/* | /* | ||||
* Channel state: | * Channel state: | ||||
▲ Show 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | struct ieee80211com { | ||||
/* virtual ap create/delete */ | /* virtual ap create/delete */ | ||||
struct ieee80211vap* (*ic_vap_create)(struct ieee80211com *, | struct ieee80211vap* (*ic_vap_create)(struct ieee80211com *, | ||||
const char [IFNAMSIZ], int, | const char [IFNAMSIZ], int, | ||||
enum ieee80211_opmode, int, | enum ieee80211_opmode, int, | ||||
const uint8_t [IEEE80211_ADDR_LEN], | const uint8_t [IEEE80211_ADDR_LEN], | ||||
const uint8_t [IEEE80211_ADDR_LEN]); | const uint8_t [IEEE80211_ADDR_LEN]); | ||||
void (*ic_vap_delete)(struct ieee80211vap *); | void (*ic_vap_delete)(struct ieee80211vap *); | ||||
/* device specific ioctls */ | |||||
int (*ic_ioctl)(struct ieee80211com *, | |||||
u_long, void *); | |||||
/* start/stop device */ | |||||
void (*ic_parent)(struct ieee80211com *); | |||||
/* operating mode attachment */ | /* operating mode attachment */ | ||||
ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; | ieee80211vap_attach ic_vattach[IEEE80211_OPMODE_MAX]; | ||||
/* return hardware/radio capabilities */ | /* return hardware/radio capabilities */ | ||||
void (*ic_getradiocaps)(struct ieee80211com *, | void (*ic_getradiocaps)(struct ieee80211com *, | ||||
int, int *, struct ieee80211_channel []); | int, int *, struct ieee80211_channel []); | ||||
/* check and/or prepare regdomain state change */ | /* check and/or prepare regdomain state change */ | ||||
int (*ic_setregdomain)(struct ieee80211com *, | int (*ic_setregdomain)(struct ieee80211com *, | ||||
struct ieee80211_regdomain *, | struct ieee80211_regdomain *, | ||||
int, struct ieee80211_channel []); | int, struct ieee80211_channel []); | ||||
int (*ic_set_quiet)(struct ieee80211_node *, | int (*ic_set_quiet)(struct ieee80211_node *, | ||||
u_int8_t *quiet_elm); | u_int8_t *quiet_elm); | ||||
/* regular transmit */ | |||||
int (*ic_transmit)(struct ieee80211com *, | |||||
struct mbuf *); | |||||
/* send/recv 802.11 management frame */ | /* send/recv 802.11 management frame */ | ||||
int (*ic_send_mgmt)(struct ieee80211_node *, | int (*ic_send_mgmt)(struct ieee80211_node *, | ||||
int, int); | int, int); | ||||
/* send raw 802.11 frame */ | /* send raw 802.11 frame */ | ||||
int (*ic_raw_xmit)(struct ieee80211_node *, | int (*ic_raw_xmit)(struct ieee80211_node *, | ||||
struct mbuf *, | struct mbuf *, | ||||
const struct ieee80211_bpf_params *); | const struct ieee80211_bpf_params *); | ||||
/* update device state for 802.11 slot time change */ | /* update device state for 802.11 slot time change */ | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | struct ieee80211vap { | ||||
struct ifmedia iv_media; /* interface media config */ | struct ifmedia iv_media; /* interface media config */ | ||||
struct ifnet *iv_ifp; /* associated device */ | struct ifnet *iv_ifp; /* associated device */ | ||||
struct bpf_if *iv_rawbpf; /* packet filter structure */ | struct bpf_if *iv_rawbpf; /* packet filter structure */ | ||||
struct sysctl_ctx_list *iv_sysctl; /* dynamic sysctl context */ | struct sysctl_ctx_list *iv_sysctl; /* dynamic sysctl context */ | ||||
struct sysctl_oid *iv_oid; /* net.wlan.X sysctl oid */ | struct sysctl_oid *iv_oid; /* net.wlan.X sysctl oid */ | ||||
TAILQ_ENTRY(ieee80211vap) iv_next; /* list of vap instances */ | TAILQ_ENTRY(ieee80211vap) iv_next; /* list of vap instances */ | ||||
struct ieee80211com *iv_ic; /* back ptr to common state */ | struct ieee80211com *iv_ic; /* back ptr to common state */ | ||||
const uint8_t *iv_myaddr; /* MAC address: ifp or ic */ | |||||
uint32_t iv_debug; /* debug msg flags */ | uint32_t iv_debug; /* debug msg flags */ | ||||
struct ieee80211_stats iv_stats; /* statistics */ | struct ieee80211_stats iv_stats; /* statistics */ | ||||
uint8_t iv_myaddr[IEEE80211_ADDR_LEN]; | |||||
uint32_t iv_flags; /* state flags */ | uint32_t iv_flags; /* state flags */ | ||||
uint32_t iv_flags_ext; /* extended state flags */ | uint32_t iv_flags_ext; /* extended state flags */ | ||||
uint32_t iv_flags_ht; /* HT state flags */ | uint32_t iv_flags_ht; /* HT state flags */ | ||||
uint32_t iv_flags_ven; /* vendor state flags */ | uint32_t iv_flags_ven; /* vendor state flags */ | ||||
uint32_t iv_ifflags; /* ifnet flags */ | |||||
uint32_t iv_caps; /* capabilities */ | uint32_t iv_caps; /* capabilities */ | ||||
uint32_t iv_htcaps; /* HT capabilities */ | uint32_t iv_htcaps; /* HT capabilities */ | ||||
uint32_t iv_htextcaps; /* HT extended capabilities */ | uint32_t iv_htextcaps; /* HT extended capabilities */ | ||||
enum ieee80211_opmode iv_opmode; /* operation mode */ | enum ieee80211_opmode iv_opmode; /* operation mode */ | ||||
enum ieee80211_state iv_state; /* state machine state */ | enum ieee80211_state iv_state; /* state machine state */ | ||||
enum ieee80211_state iv_nstate; /* pending state */ | enum ieee80211_state iv_nstate; /* pending state */ | ||||
int iv_nstate_arg; /* pending state arg */ | int iv_nstate_arg; /* pending state arg */ | ||||
struct task iv_nstate_task; /* deferred state processing */ | struct task iv_nstate_task; /* deferred state processing */ | ||||
▲ Show 20 Lines • Show All 306 Lines • ▼ Show 20 Lines | |||||
#define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX unequal MCS */ | #define IEEE80211_HTC_TXUNEQUAL 0x00800000 /* CAPABILITY: TX unequal MCS */ | ||||
#define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32 suport */ | #define IEEE80211_HTC_TXMCS32 0x01000000 /* CAPABILITY: MCS32 suport */ | ||||
#define IEEE80211_C_HTCAP_BITS \ | #define IEEE80211_C_HTCAP_BITS \ | ||||
"\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ | "\20\1LDPC\2CHWIDTH40\5GREENFIELD\6SHORTGI20\7SHORTGI40\10TXSTBC" \ | ||||
"\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" | "\21AMPDU\22AMSDU\23HT\24SMPS\25RIFS" | ||||
int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); | int ic_printf(struct ieee80211com *, const char *, ...) __printflike(2, 3); | ||||
void ieee80211_ifattach(struct ieee80211com *, | void ieee80211_ifattach(struct ieee80211com *); | ||||
const uint8_t macaddr[IEEE80211_ADDR_LEN]); | |||||
void ieee80211_ifdetach(struct ieee80211com *); | void ieee80211_ifdetach(struct ieee80211com *); | ||||
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]); | ||||
const uint8_t macaddr[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]); | |||||
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_rateset *ieee80211_get_suprates(struct ieee80211com *ic, | ||||
const struct ieee80211_channel *); | 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_media_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); | |||||
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 *, int, | ||||
enum ieee80211_phymode); | 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 *, | ||||
▲ Show 20 Lines • Show All 281 Lines • Show Last 20 Lines |