]> git.ipfire.org Git - thirdparty/iw.git/blob - ieee80211.h
iw: survey: add support for radio stats
[thirdparty/iw.git] / ieee80211.h
1 #ifndef __IEEE80211
2 #define __IEEE80211
3
4 /* 802.11n HT capability AMPDU settings (for ampdu_params_info) */
5 #define IEEE80211_HT_AMPDU_PARM_FACTOR 0x03
6 #define IEEE80211_HT_AMPDU_PARM_DENSITY 0x1C
7
8 #define IEEE80211_HT_CAP_SUP_WIDTH_20_40 0x0002
9 #define IEEE80211_HT_CAP_SGI_40 0x0040
10 #define IEEE80211_HT_CAP_MAX_AMSDU 0x0800
11
12 #define IEEE80211_HT_MCS_MASK_LEN 10
13
14 /**
15 * struct ieee80211_mcs_info - MCS information
16 * @rx_mask: RX mask
17 * @rx_highest: highest supported RX rate. If set represents
18 * the highest supported RX data rate in units of 1 Mbps.
19 * If this field is 0 this value should not be used to
20 * consider the highest RX data rate supported.
21 * @tx_params: TX parameters
22 */
23 struct ieee80211_mcs_info {
24 __u8 rx_mask[IEEE80211_HT_MCS_MASK_LEN];
25 __u16 rx_highest;
26 __u8 tx_params;
27 __u8 reserved[3];
28 } __attribute__ ((packed));
29
30
31 /**
32 * struct ieee80211_ht_cap - HT capabilities
33 *
34 * This structure is the "HT capabilities element" as
35 * described in 802.11n D5.0 7.3.2.57
36 */
37 struct ieee80211_ht_cap {
38 __u16 cap_info;
39 __u8 ampdu_params_info;
40
41 /* 16 bytes MCS information */
42 struct ieee80211_mcs_info mcs;
43
44 __u16 extended_ht_cap_info;
45 __u32 tx_BF_cap_info;
46 __u8 antenna_selection_info;
47 } __attribute__ ((packed));
48
49 struct ieee80211_vht_mcs_info {
50 __u16 rx_vht_mcs;
51 __u16 rx_highest;
52 __u16 tx_vht_mcs;
53 __u16 tx_highest;
54 } __attribute__ ((packed));
55
56 struct ieee80211_vht_cap {
57 __u32 cap_info;
58 struct ieee80211_vht_mcs_info mcs;
59 } __attribute__ ((packed));
60
61 #define SUITE(oui, id) (((oui) << 8) | (id))
62
63 /* cipher suite selectors */
64 #define WLAN_CIPHER_SUITE_USE_GROUP SUITE(0x000FAC, 0)
65 #define WLAN_CIPHER_SUITE_WEP40 SUITE(0x000FAC, 1)
66 #define WLAN_CIPHER_SUITE_TKIP SUITE(0x000FAC, 2)
67 /* reserved: SUITE(0x000FAC, 3) */
68 #define WLAN_CIPHER_SUITE_CCMP SUITE(0x000FAC, 4)
69 #define WLAN_CIPHER_SUITE_WEP104 SUITE(0x000FAC, 5)
70 #define WLAN_CIPHER_SUITE_AES_CMAC SUITE(0x000FAC, 6)
71 #define WLAN_CIPHER_SUITE_GCMP SUITE(0x000FAC, 8)
72 #define WLAN_CIPHER_SUITE_GCMP_256 SUITE(0x000FAC, 9)
73 #define WLAN_CIPHER_SUITE_CCMP_256 SUITE(0x000FAC, 10)
74 #define WLAN_CIPHER_SUITE_BIP_GMAC_128 SUITE(0x000FAC, 11)
75 #define WLAN_CIPHER_SUITE_BIP_GMAC_256 SUITE(0x000FAC, 12)
76 #define WLAN_CIPHER_SUITE_BIP_CMAC_256 SUITE(0x000FAC, 13)
77
78 #endif /* __IEEE80211 */