Changeset View
Changeset View
Standalone View
Standalone View
sys/net80211/_ieee80211.h
Show All 35 Lines | |||||
* NB: this file is used by applications. | * NB: this file is used by applications. | ||||
*/ | */ | ||||
/* | /* | ||||
* PHY type; mostly used to identify FH phys. | * PHY type; mostly used to identify FH phys. | ||||
*/ | */ | ||||
enum ieee80211_phytype { | enum ieee80211_phytype { | ||||
IEEE80211_T_DS, /* direct sequence spread spectrum */ | IEEE80211_T_DS, /* direct sequence spread spectrum */ | ||||
IEEE80211_T_PBCC, /* packet binary convolutional code */ | |||||
IEEE80211_T_FH, /* frequency hopping */ | IEEE80211_T_FH, /* frequency hopping */ | ||||
IEEE80211_T_OFDM, /* frequency division multiplexing */ | IEEE80211_T_OFDM, /* frequency division multiplexing */ | ||||
IEEE80211_T_TURBO, /* high rate OFDM, aka turbo mode */ | IEEE80211_T_TURBO, /* high rate OFDM, aka turbo mode */ | ||||
IEEE80211_T_HT, /* high throughput */ | IEEE80211_T_HT, /* high throughput */ | ||||
IEEE80211_T_OFDM_HALF, /* 1/2 rate OFDM */ | IEEE80211_T_OFDM_HALF, /* 1/2 rate OFDM */ | ||||
IEEE80211_T_OFDM_QUARTER, /* 1/4 rate OFDM */ | IEEE80211_T_OFDM_QUARTER, /* 1/4 rate OFDM */ | ||||
IEEE80211_T_VHT, /* VHT PHY */ | IEEE80211_T_VHT, /* VHT PHY */ | ||||
}; | }; | ||||
#define IEEE80211_T_CCK IEEE80211_T_DS /* more common nomenclature */ | #define IEEE80211_T_CCK IEEE80211_T_DS /* more common nomenclature */ | ||||
#define IEEE80211_T_MAX (IEEE80211_T_VHT + 1) | |||||
/* | /* | ||||
* PHY mode; this is not really a mode as multi-mode devices | * PHY mode; this is not really a mode as multi-mode devices | ||||
* have multiple PHY's. Mode is mostly used as a shorthand | * have multiple PHY's. Mode is mostly used as a shorthand | ||||
* for constraining which channels to consider in setting up | * for constraining which channels to consider in setting up | ||||
* operation. Modes used to be used more extensively when | * operation. Modes used to be used more extensively when | ||||
* channels were identified as IEEE channel numbers. | * channels were identified as IEEE channel numbers. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | |||||
* associated at once. For most AP's this is way more | * associated at once. For most AP's this is way more | ||||
* than is feasible so we use a default of 128. This | * than is feasible so we use a default of 128. This | ||||
* number may be overridden by the driver and/or by | * number may be overridden by the driver and/or by | ||||
* user configuration but may not be less than IEEE80211_AID_MIN. | * user configuration but may not be less than IEEE80211_AID_MIN. | ||||
*/ | */ | ||||
#define IEEE80211_AID_DEF 128 | #define IEEE80211_AID_DEF 128 | ||||
#define IEEE80211_AID_MIN 16 | #define IEEE80211_AID_MIN 16 | ||||
struct ieee80211_rate_t { | |||||
uint8_t type; | |||||
uint8_t value; | |||||
union { | |||||
struct { | |||||
uint8_t short_preamble; | |||||
} cck; | |||||
struct { | |||||
uint8_t streams; | |||||
uint8_t no_20mhz:1, | |||||
no_40mhz:1, | |||||
no_80mhz:1, | |||||
no_160mhz:1, | |||||
unequal:1; | |||||
} ht; | |||||
} props; | |||||
}; | |||||
/* | /* | ||||
* 802.11 rate set. | * 802.11 rate set. | ||||
*/ | */ | ||||
#define IEEE80211_RATE_SIZE 8 /* 802.11 standard */ | #define IEEE80211_RATE_SIZE 8 /* 802.11 standard */ | ||||
#define IEEE80211_RATE_MAXSIZE 15 /* max rates we'll handle */ | #define IEEE80211_RATE_MAXSIZE 15 /* max rates we'll handle */ | ||||
#define IEEE80211_RATE_VALUE_MAX 128 | |||||
#define IEEE80211_RATE_BITMAP_SIZE howmany(IEEE80211_RATE_VALUE_MAX, NBBY) | |||||
#define IEEE80211_HT_MCS_CHAIN 8 | |||||
#define IEEE80211_VHT_MCS_CHAIN 10 | |||||
struct ieee80211_rateset { | struct ieee80211_rateset { | ||||
uint8_t rs_nrates; | uint8_t rs_nrates; | ||||
uint8_t rs_rates[IEEE80211_RATE_MAXSIZE]; | uint8_t rs_bitmap[IEEE80211_RATE_BITMAP_SIZE]; | ||||
struct { | |||||
uint16_t rs_index; /* index in the global table */ | |||||
uint8_t rs_basic:1; | |||||
} rates[IEEE80211_RATE_MAXSIZE]; | |||||
}; | }; | ||||
/* | /* | ||||
* 802.11n variant of ieee80211_rateset. Instead of | * 802.11n/ac variant of ieee80211_rateset. Instead of | ||||
* legacy rates the entries are MCS rates. We define | * legacy rates the entries are MCS rates. We define | ||||
* the structure such that it can be used interchangeably | * the structure such that it can be used interchangeably | ||||
* with an ieee80211_rateset (modulo structure size). | * with an ieee80211_rateset (modulo structure size). | ||||
*/ | */ | ||||
#define IEEE80211_HTRATE_MAXSIZE 77 | #define IEEE80211_HTRATE_MAXSIZE 80 /* count of VHT rates */ | ||||
struct ieee80211_htrateset { | struct ieee80211_htrateset { | ||||
uint8_t rs_nrates; | uint8_t rs_nrates; | ||||
uint8_t rs_rates[IEEE80211_HTRATE_MAXSIZE]; | uint8_t rs_bitmap[IEEE80211_RATE_BITMAP_SIZE]; | ||||
struct { | |||||
uint16_t rs_index; /* index in the global table */ | |||||
uint8_t rs_basic:1; | |||||
} rates[IEEE80211_HTRATE_MAXSIZE]; | |||||
}; | }; | ||||
#define IEEE80211_RATE_MCS 0x80 | #define IEEE80211_RATE_MCS 0x80 | ||||
/* | /* | ||||
* Per-mode transmit parameters/controls visible to user space. | * Per-mode transmit parameters/controls visible to user space. | ||||
* These can be used to set fixed transmit rate for all operating | * These can be used to set fixed transmit rate for all operating | ||||
* modes or on a per-client basis according to the capabilities | * modes or on a per-client basis according to the capabilities | ||||
* of the client (e.g. an 11b client associated to an 11g ap). | * of the client (e.g. an 11b client associated to an 11g ap). | ||||
* | |||||
* MCS are distinguished from legacy rates by or'ing in 0x80. | |||||
*/ | */ | ||||
struct ieee80211_txparam { | struct ieee80211_txparam_vht { | ||||
uint8_t ucastrate; /* ucast data rate (legacy/MCS|0x80) */ | uint16_t ucastrate; /* ucast data rate index */ | ||||
uint8_t mgmtrate; /* mgmt frame rate (legacy/MCS|0x80) */ | uint16_t mgmtrate; /* mgmt frame rate index */ | ||||
uint8_t mcastrate; /* multicast rate (legacy/MCS|0x80) */ | uint16_t mcastrate; /* multicast rate index */ | ||||
uint8_t maxretry; /* max unicast data retry count */ | uint8_t maxretry; /* max unicast data retry count */ | ||||
}; | }; | ||||
/* | /* | ||||
* Legacy version (w/ MCS/0x80 bits and without VHT support). | |||||
*/ | |||||
struct ieee80211_txparam { | |||||
uint8_t ucastrate; | |||||
uint8_t mgmtrate; | |||||
uint8_t mcastrate; | |||||
uint8_t maxretry; | |||||
}; | |||||
/* | |||||
* Per-mode roaming state visible to user space. There are two | * Per-mode roaming state visible to user space. There are two | ||||
* thresholds that control whether roaming is considered; when | * thresholds that control whether roaming is considered; when | ||||
* either is exceeded the 802.11 layer will check the scan cache | * either is exceeded the 802.11 layer will check the scan cache | ||||
* for another AP. If the cache is stale then a scan may be | * for another AP. If the cache is stale then a scan may be | ||||
* triggered. | * triggered. | ||||
*/ | */ | ||||
struct ieee80211_roamparam_vht { | |||||
int8_t rssi; /* rssi thresh (.5 dBm) */ | |||||
uint8_t pad; /* reserve */ | |||||
uint16_t rate; /* tx rate index thresh */ | |||||
}; | |||||
/* | |||||
* Legacy version (w/ MCS/0x80 bits and without VHT support). | |||||
*/ | |||||
struct ieee80211_roamparam { | struct ieee80211_roamparam { | ||||
int8_t rssi; /* rssi thresh (.5 dBm) */ | int8_t rssi; /* rssi thresh (.5 dBm) */ | ||||
uint8_t rate; /* tx rate thresh (.5 Mb/s or MCS) */ | uint8_t rate; /* tx rate thresh (.5 Mb/s or MCS) */ | ||||
uint16_t pad; /* reserve */ | uint16_t pad; /* reserve */ | ||||
}; | }; | ||||
/* | /* | ||||
* Regulatory Information. | * Regulatory Information. | ||||
▲ Show 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | struct ieee80211_rx_stats { | ||||
int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ | int16_t c_nf_ext[IEEE80211_MAX_CHAINS]; /* per-chain NF */ | ||||
int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ | int16_t c_rssi_ctl[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ | ||||
int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ | int16_t c_rssi_ext[IEEE80211_MAX_CHAINS]; /* per-chain RSSI */ | ||||
/* 32 bits */ | /* 32 bits */ | ||||
uint8_t c_nf; /* global NF */ | uint8_t c_nf; /* global NF */ | ||||
uint8_t c_rssi; /* global RSSI */ | uint8_t c_rssi; /* global RSSI */ | ||||
uint8_t c_chain; /* number of RX chains involved */ | uint8_t c_chain; /* number of RX chains involved */ | ||||
/* XXX use rate index instead */ | |||||
uint8_t c_rate; /* legacy; 11n rate code; VHT MCS */ | uint8_t c_rate; /* legacy; 11n rate code; VHT MCS */ | ||||
/* 32 bits */ | /* 32 bits */ | ||||
uint16_t c_freq; /* Frequency, MHz */ | uint16_t c_freq; /* Frequency, MHz */ | ||||
uint8_t c_ieee; /* Channel */ | uint8_t c_ieee; /* Channel */ | ||||
uint8_t c_width; /* channel width, FW flags above */ | uint8_t c_width; /* channel width, FW flags above */ | ||||
/* Force alignment to DWORD */ | /* Force alignment to DWORD */ | ||||
Show All 17 Lines |