Go to the documentation of this file.
26 #define ATH_RATE_MAX 30
27 #define RATE_TABLE_SIZE 72
29 #define RC_INVALID 0x0000
30 #define RC_LEGACY 0x0001
34 #define RC_HT_20 0x0010
35 #define RC_HT_40 0x0020
37 #define RC_STREAM_MASK 0xe
38 #define RC_DS_OR_LATER(f) ((((f) & RC_STREAM_MASK) == RC_DS) || \
39 (((f) & RC_STREAM_MASK) == (RC_DS | RC_TS)))
40 #define RC_TS_ONLY(f) (((f) & RC_STREAM_MASK) == RC_TS)
41 #define RC_SS_OR_LEGACY(f) ((f) & (RC_SS | RC_LEGACY))
43 #define RC_HT_2040 (RC_HT_20 | RC_HT_40)
44 #define RC_ALL_STREAM (RC_SS | RC_DS | RC_TS)
45 #define RC_L_SD (RC_LEGACY | RC_SS | RC_DS)
46 #define RC_L_SDT (RC_LEGACY | RC_SS | RC_DS | RC_TS)
47 #define RC_HT_S_20 (RC_HT_20 | RC_SS)
48 #define RC_HT_D_20 (RC_HT_20 | RC_DS)
49 #define RC_HT_T_20 (RC_HT_20 | RC_TS)
50 #define RC_HT_S_40 (RC_HT_40 | RC_SS)
51 #define RC_HT_D_40 (RC_HT_40 | RC_DS)
52 #define RC_HT_T_40 (RC_HT_40 | RC_TS)
54 #define RC_HT_SD_20 (RC_HT_20 | RC_SS | RC_DS)
55 #define RC_HT_DT_20 (RC_HT_20 | RC_DS | RC_TS)
56 #define RC_HT_SD_40 (RC_HT_40 | RC_SS | RC_DS)
57 #define RC_HT_DT_40 (RC_HT_40 | RC_DS | RC_TS)
59 #define RC_HT_SD_2040 (RC_HT_2040 | RC_SS | RC_DS)
60 #define RC_HT_SDT_2040 (RC_HT_2040 | RC_SS | RC_DS | RC_TS)
62 #define RC_HT_SDT_20 (RC_HT_20 | RC_SS | RC_DS | RC_TS)
63 #define RC_HT_SDT_40 (RC_HT_40 | RC_SS | RC_DS | RC_TS)
65 #define RC_ALL (RC_LEGACY | RC_HT_2040 | RC_ALL_STREAM)
85 #define WLAN_RC_PHY_DS(_phy) ((_phy == WLAN_RC_PHY_HT_20_DS) \
86 || (_phy == WLAN_RC_PHY_HT_40_DS) \
87 || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \
88 || (_phy == WLAN_RC_PHY_HT_40_DS_HGI))
89 #define WLAN_RC_PHY_TS(_phy) ((_phy == WLAN_RC_PHY_HT_20_TS) \
90 || (_phy == WLAN_RC_PHY_HT_40_TS) \
91 || (_phy == WLAN_RC_PHY_HT_20_TS_HGI) \
92 || (_phy == WLAN_RC_PHY_HT_40_TS_HGI))
93 #define WLAN_RC_PHY_20(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS) \
94 || (_phy == WLAN_RC_PHY_HT_20_DS) \
95 || (_phy == WLAN_RC_PHY_HT_20_TS) \
96 || (_phy == WLAN_RC_PHY_HT_20_SS_HGI) \
97 || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \
98 || (_phy == WLAN_RC_PHY_HT_20_TS_HGI))
99 #define WLAN_RC_PHY_40(_phy) ((_phy == WLAN_RC_PHY_HT_40_SS) \
100 || (_phy == WLAN_RC_PHY_HT_40_DS) \
101 || (_phy == WLAN_RC_PHY_HT_40_TS) \
102 || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \
103 || (_phy == WLAN_RC_PHY_HT_40_DS_HGI) \
104 || (_phy == WLAN_RC_PHY_HT_40_TS_HGI))
105 #define WLAN_RC_PHY_SGI(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS_HGI) \
106 || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \
107 || (_phy == WLAN_RC_PHY_HT_20_TS_HGI) \
108 || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \
109 || (_phy == WLAN_RC_PHY_HT_40_DS_HGI) \
110 || (_phy == WLAN_RC_PHY_HT_40_TS_HGI))
112 #define WLAN_RC_PHY_HT(_phy) (_phy >= WLAN_RC_PHY_HT_20_SS)
114 #define WLAN_RC_CAP_MODE(capflag) (((capflag & WLAN_RC_HT_FLAG) ? \
115 ((capflag & WLAN_RC_40_FLAG) ? RC_HT_40 : RC_HT_20) : RC_LEGACY))
117 #define WLAN_RC_CAP_STREAM(capflag) (((capflag & WLAN_RC_TS_FLAG) ? \
118 (RC_TS) : ((capflag & WLAN_RC_DS_FLAG) ? RC_DS : RC_SS)))
124 #define WLAN_RC_PHY_HT_VALID(flag, capflag) \
125 (((flag & RC_HT_20) && !(capflag & WLAN_RC_40_FLAG)) || \
126 ((flag & RC_HT_40) && (capflag & WLAN_RC_40_FLAG)))
128 #define WLAN_RC_DS_FLAG (0x01)
129 #define WLAN_RC_TS_FLAG (0x02)
130 #define WLAN_RC_40_FLAG (0x04)
131 #define WLAN_RC_SGI_FLAG (0x08)
132 #define WLAN_RC_HT_FLAG (0x10)
218 #ifdef CONFIG_ATH9K_RATE_CONTROL