diff options
author | Senthil Balasubramanian <senthilkumar@atheros.com> | 2010-07-27 09:46:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-27 14:59:58 -0400 |
commit | 1d9d06a27ae579b330887724201e7ac857c827d1 (patch) | |
tree | 45bbd3e1b695d60ab9e9f54de69effa17255c093 /drivers | |
parent | f63b340d1bab58aac07ae1b528d58a73b76b0970 (diff) |
ath9k: Add three stream rate control support for AR938X.
This patch adds 3 stream rate control support for AR938X family
chipsets which supports 3 streams.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 528 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.h | 63 |
2 files changed, 366 insertions, 225 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index f8a4c39e5a0c..7b63958b8926 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -20,95 +20,145 @@ | |||
20 | #include "ath9k.h" | 20 | #include "ath9k.h" |
21 | 21 | ||
22 | static const struct ath_rate_table ar5416_11na_ratetable = { | 22 | static const struct ath_rate_table ar5416_11na_ratetable = { |
23 | 43, | 23 | 68, |
24 | 8, /* MCS start */ | 24 | 8, /* MCS start */ |
25 | { | 25 | { |
26 | { RC_L_SD, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ | 26 | [0] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 6000, |
27 | 5400, 0, 12, 0, 0, 0, 0, 0 }, | 27 | 5400, 0, 12, 0, 0, 0, 0, 0 }, /* 6 Mb */ |
28 | { RC_L_SD, WLAN_RC_PHY_OFDM, 9000, /* 9 Mb */ | 28 | [1] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 9000, |
29 | 7800, 1, 18, 0, 1, 1, 1, 1 }, | 29 | 7800, 1, 18, 0, 1, 1, 1, 1 }, /* 9 Mb */ |
30 | { RC_L_SD, WLAN_RC_PHY_OFDM, 12000, /* 12 Mb */ | 30 | [2] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 12000, |
31 | 10000, 2, 24, 2, 2, 2, 2, 2 }, | 31 | 10000, 2, 24, 2, 2, 2, 2, 2 }, /* 12 Mb */ |
32 | { RC_L_SD, WLAN_RC_PHY_OFDM, 18000, /* 18 Mb */ | 32 | [3] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 18000, |
33 | 13900, 3, 36, 2, 3, 3, 3, 3 }, | 33 | 13900, 3, 36, 2, 3, 3, 3, 3 }, /* 18 Mb */ |
34 | { RC_L_SD, WLAN_RC_PHY_OFDM, 24000, /* 24 Mb */ | 34 | [4] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 24000, |
35 | 17300, 4, 48, 4, 4, 4, 4, 4 }, | 35 | 17300, 4, 48, 4, 4, 4, 4, 4 }, /* 24 Mb */ |
36 | { RC_L_SD, WLAN_RC_PHY_OFDM, 36000, /* 36 Mb */ | 36 | [5] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 36000, |
37 | 23000, 5, 72, 4, 5, 5, 5, 5 }, | 37 | 23000, 5, 72, 4, 5, 5, 5, 5 }, /* 36 Mb */ |
38 | { RC_L_SD, WLAN_RC_PHY_OFDM, 48000, /* 48 Mb */ | 38 | [6] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 48000, |
39 | 27400, 6, 96, 4, 6, 6, 6, 6 }, | 39 | 27400, 6, 96, 4, 6, 6, 6, 6 }, /* 48 Mb */ |
40 | { RC_L_SD, WLAN_RC_PHY_OFDM, 54000, /* 54 Mb */ | 40 | [7] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 54000, |
41 | 29300, 7, 108, 4, 7, 7, 7, 7 }, | 41 | 29300, 7, 108, 4, 7, 7, 7, 7 }, /* 54 Mb */ |
42 | { RC_HT_SD_2040, WLAN_RC_PHY_HT_20_SS, 6500, /* 6.5 Mb */ | 42 | [8] = { RC_HT_SDT_2040, WLAN_RC_PHY_HT_20_SS, 6500, |
43 | 6400, 0, 0, 0, 8, 25, 8, 25 }, | 43 | 6400, 0, 0, 0, 8, 38, 8, 38 }, /* 6.5 Mb */ |
44 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 13000, /* 13 Mb */ | 44 | [9] = { RC_HT_SDT_20, WLAN_RC_PHY_HT_20_SS, 13000, |
45 | 12700, 1, 1, 2, 9, 26, 9, 26 }, | 45 | 12700, 1, 1, 2, 9, 39, 9, 39 }, /* 13 Mb */ |
46 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 19500, /* 19.5 Mb */ | 46 | [10] = { RC_HT_SDT_20, WLAN_RC_PHY_HT_20_SS, 19500, |
47 | 18800, 2, 2, 2, 10, 27, 10, 27 }, | 47 | 18800, 2, 2, 2, 10, 40, 10, 40 }, /* 19.5 Mb */ |
48 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 26000, /* 26 Mb */ | 48 | [11] = { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 26000, |
49 | 25000, 3, 3, 4, 11, 28, 11, 28 }, | 49 | 25000, 3, 3, 4, 11, 41, 11, 41 }, /* 26 Mb */ |
50 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 39000, /* 39 Mb */ | 50 | [12] = { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 39000, |
51 | 36700, 4, 4, 4, 12, 29, 12, 29 }, | 51 | 36700, 4, 4, 4, 12, 42, 12, 42 }, /* 39 Mb */ |
52 | { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 52000, /* 52 Mb */ | 52 | [13] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 52000, |
53 | 48100, 5, 5, 4, 13, 30, 13, 30 }, | 53 | 48100, 5, 5, 4, 13, 43, 13, 43 }, /* 52 Mb */ |
54 | { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 58500, /* 58.5 Mb */ | 54 | [14] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 58500, |
55 | 53500, 6, 6, 4, 14, 31, 14, 31 }, | 55 | 53500, 6, 6, 4, 14, 44, 14, 44 }, /* 58.5 Mb */ |
56 | { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 65000, /* 65 Mb */ | 56 | [15] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 65000, |
57 | 59000, 7, 7, 4, 15, 32, 15, 33 }, | 57 | 59000, 7, 7, 4, 15, 45, 16, 46 }, /* 65 Mb */ |
58 | { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 13000, /* 13 Mb */ | 58 | [16] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS_HGI, 72200, |
59 | 12700, 8, 8, 3, 16, 34, 16, 34 }, | 59 | 65400, 7, 7, 4, 15, 45, 16, 46 }, /* 75 Mb */ |
60 | { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 26000, /* 26 Mb */ | 60 | [17] = { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 13000, |
61 | 24800, 9, 9, 2, 17, 35, 17, 35 }, | 61 | 12700, 8, 8, 0, 16, 47, 17, 47 }, /* 13 Mb */ |
62 | { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 39000, /* 39 Mb */ | 62 | [18] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_DS, 26000, |
63 | 36600, 10, 10, 2, 18, 36, 18, 36 }, | 63 | 24800, 9, 9, 2, 17, 48, 18, 48 }, /* 26 Mb */ |
64 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 52000, /* 52 Mb */ | 64 | [19] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_DS, 39000, |
65 | 48100, 11, 11, 4, 19, 37, 19, 37 }, | 65 | 36600, 10, 10, 2, 18, 49, 19, 49 }, /* 39 Mb */ |
66 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 78000, /* 78 Mb */ | 66 | [20] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 52000, |
67 | 69500, 12, 12, 4, 20, 38, 20, 38 }, | 67 | 48100, 11, 11, 4, 19, 50, 20, 50 }, /* 52 Mb */ |
68 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 104000, /* 104 Mb */ | 68 | [21] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 78000, |
69 | 89500, 13, 13, 4, 21, 39, 21, 39 }, | 69 | 69500, 12, 12, 4, 20, 51, 21, 51 }, /* 78 Mb */ |
70 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 117000, /* 117 Mb */ | 70 | [22] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 104000, |
71 | 98900, 14, 14, 4, 22, 40, 22, 40 }, | 71 | 89500, 13, 13, 4, 21, 52, 22, 52 }, /* 104 Mb */ |
72 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 130000, /* 130 Mb */ | 72 | [23] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 117000, |
73 | 108300, 15, 15, 4, 23, 41, 24, 42 }, | 73 | 98900, 14, 14, 4, 22, 53, 23, 53 }, /* 117 Mb */ |
74 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS_HGI, 144400, /* 144.4 Mb */ | 74 | [24] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 130000, |
75 | 12000, 15, 15, 4, 23, 41, 24, 42 }, | 75 | 108300, 15, 15, 4, 23, 54, 25, 55 }, /* 130 Mb */ |
76 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 13500, /* 13.5 Mb */ | 76 | [25] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS_HGI, 144400, |
77 | 13200, 0, 0, 0, 8, 25, 25, 25 }, | 77 | 12000, 15, 15, 4, 23, 54, 25, 55 }, /* 144.4 Mb */ |
78 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 27500, /* 27.0 Mb */ | 78 | [26] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 19500, |
79 | 25900, 1, 1, 2, 9, 26, 26, 26 }, | 79 | 17400, 16, 16, 0, 24, 56, 26, 56 }, /* 19.5 Mb */ |
80 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 40500, /* 40.5 Mb */ | 80 | [27] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 39000, |
81 | 38600, 2, 2, 2, 10, 27, 27, 27 }, | 81 | 35100, 17, 17, 2, 25, 57, 27, 57 }, /* 39 Mb */ |
82 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 54000, /* 54 Mb */ | 82 | [28] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 58500, |
83 | 49800, 3, 3, 4, 11, 28, 28, 28 }, | 83 | 52600, 18, 18, 2, 26, 58, 28, 58 }, /* 58.5 Mb */ |
84 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 81500, /* 81 Mb */ | 84 | [29] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 78000, |
85 | 72200, 4, 4, 4, 12, 29, 29, 29 }, | 85 | 70400, 19, 19, 4, 27, 59, 29, 59 }, /* 78 Mb */ |
86 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 108000, /* 108 Mb */ | 86 | [30] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 117000, |
87 | 92900, 5, 5, 4, 13, 30, 30, 30 }, | 87 | 104900, 20, 20, 4, 28, 60, 31, 61 }, /* 117 Mb */ |
88 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 121500, /* 121.5 Mb */ | 88 | [31] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS_HGI, 130000, |
89 | 102700, 6, 6, 4, 14, 31, 31, 31 }, | 89 | 115800, 20, 20, 4, 28, 60, 31, 61 }, /* 130 Mb*/ |
90 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 135000, /* 135 Mb */ | 90 | [32] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS, 156000, |
91 | 112000, 7, 7, 4, 15, 32, 33, 33 }, | 91 | 137200, 21, 21, 4, 29, 62, 33, 63 }, /* 156 Mb */ |
92 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS_HGI, 150000, /* 150 Mb */ | 92 | [33] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS_HGI, 173300, |
93 | 122000, 7, 7, 4, 15, 32, 33, 33 }, | 93 | 151100, 21, 21, 4, 29, 62, 33, 63 }, /* 173.3 Mb */ |
94 | { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 27000, /* 27 Mb */ | 94 | [34] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS, 175500, |
95 | 25800, 8, 8, 0, 16, 34, 34, 34 }, | 95 | 152800, 22, 22, 4, 30, 64, 35, 65 }, /* 175.5 Mb */ |
96 | { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 54000, /* 54 Mb */ | 96 | [35] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS_HGI, 195000, |
97 | 49800, 9, 9, 2, 17, 35, 35, 35 }, | 97 | 168400, 22, 22, 4, 30, 64, 35, 65 }, /* 195 Mb*/ |
98 | { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 81000, /* 81 Mb */ | 98 | [36] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS, 195000, |
99 | 71900, 10, 10, 2, 18, 36, 36, 36 }, | 99 | 168400, 23, 23, 4, 31, 66, 37, 67 }, /* 195 Mb */ |
100 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 108000, /* 108 Mb */ | 100 | [37] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS_HGI, 216700, |
101 | 92500, 11, 11, 4, 19, 37, 37, 37 }, | 101 | 185000, 23, 23, 4, 31, 66, 37, 67 }, /* 216.7 Mb */ |
102 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 162000, /* 162 Mb */ | 102 | [38] = { RC_HT_SDT_40, WLAN_RC_PHY_HT_40_SS, 13500, |
103 | 130300, 12, 12, 4, 20, 38, 38, 38 }, | 103 | 13200, 0, 0, 0, 8, 38, 38, 38 }, /* 13.5 Mb*/ |
104 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 216000, /* 216 Mb */ | 104 | [39] = { RC_HT_SDT_40, WLAN_RC_PHY_HT_40_SS, 27500, |
105 | 162800, 13, 13, 4, 21, 39, 39, 39 }, | 105 | 25900, 1, 1, 2, 9, 39, 39, 39 }, /* 27.0 Mb*/ |
106 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 243000, /* 243 Mb */ | 106 | [40] = { RC_HT_SDT_40, WLAN_RC_PHY_HT_40_SS, 40500, |
107 | 178200, 14, 14, 4, 22, 40, 40, 40 }, | 107 | 38600, 2, 2, 2, 10, 40, 40, 40 }, /* 40.5 Mb*/ |
108 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 270000, /* 270 Mb */ | 108 | [41] = { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 54000, |
109 | 192100, 15, 15, 4, 23, 41, 42, 42 }, | 109 | 49800, 3, 3, 4, 11, 41, 41, 41 }, /* 54 Mb */ |
110 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS_HGI, 300000, /* 300 Mb */ | 110 | [42] = { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 81500, |
111 | 207000, 15, 15, 4, 23, 41, 42, 42 }, | 111 | 72200, 4, 4, 4, 12, 42, 42, 42 }, /* 81 Mb */ |
112 | [43] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 108000, | ||
113 | 92900, 5, 5, 4, 13, 43, 43, 43 }, /* 108 Mb */ | ||
114 | [44] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 121500, | ||
115 | 102700, 6, 6, 4, 14, 44, 44, 44 }, /* 121.5 Mb*/ | ||
116 | [45] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 135000, | ||
117 | 112000, 7, 7, 4, 15, 45, 46, 46 }, /* 135 Mb */ | ||
118 | [46] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS_HGI, 150000, | ||
119 | 122000, 7, 7, 4, 15, 45, 46, 46 }, /* 150 Mb */ | ||
120 | [47] = { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 27000, | ||
121 | 25800, 8, 8, 0, 16, 47, 47, 47 }, /* 27 Mb */ | ||
122 | [48] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_DS, 54000, | ||
123 | 49800, 9, 9, 2, 17, 48, 48, 48 }, /* 54 Mb */ | ||
124 | [49] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_DS, 81000, | ||
125 | 71900, 10, 10, 2, 18, 49, 49, 49 }, /* 81 Mb */ | ||
126 | [50] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 108000, | ||
127 | 92500, 11, 11, 4, 19, 50, 50, 50 }, /* 108 Mb */ | ||
128 | [51] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 162000, | ||
129 | 130300, 12, 12, 4, 20, 51, 51, 51 }, /* 162 Mb */ | ||
130 | [52] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 216000, | ||
131 | 162800, 13, 13, 4, 21, 52, 52, 52 }, /* 216 Mb */ | ||
132 | [53] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 243000, | ||
133 | 178200, 14, 14, 4, 22, 53, 53, 53 }, /* 243 Mb */ | ||
134 | [54] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 270000, | ||
135 | 192100, 15, 15, 4, 23, 54, 55, 55 }, /* 270 Mb */ | ||
136 | [55] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS_HGI, 300000, | ||
137 | 207000, 15, 15, 4, 23, 54, 55, 55 }, /* 300 Mb */ | ||
138 | [56] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 40500, | ||
139 | 36100, 16, 16, 0, 24, 56, 56, 56 }, /* 40.5 Mb */ | ||
140 | [57] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 81000, | ||
141 | 72900, 17, 17, 2, 25, 57, 57, 57 }, /* 81 Mb */ | ||
142 | [58] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 121500, | ||
143 | 108300, 18, 18, 2, 26, 58, 58, 58 }, /* 121.5 Mb */ | ||
144 | [59] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 162000, | ||
145 | 142000, 19, 19, 4, 27, 59, 59, 59 }, /* 162 Mb */ | ||
146 | [60] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 243000, | ||
147 | 205100, 20, 20, 4, 28, 60, 61, 61 }, /* 243 Mb */ | ||
148 | [61] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS_HGI, 270000, | ||
149 | 224700, 20, 20, 4, 28, 60, 61, 61 }, /* 270 Mb */ | ||
150 | [62] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS, 324000, | ||
151 | 263100, 21, 21, 4, 29, 62, 63, 63 }, /* 324 Mb */ | ||
152 | [63] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS_HGI, 360000, | ||
153 | 288000, 21, 21, 4, 29, 62, 63, 63 }, /* 360 Mb */ | ||
154 | [64] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS, 364500, | ||
155 | 290700, 22, 22, 4, 30, 64, 65, 65 }, /* 364.5 Mb */ | ||
156 | [65] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS_HGI, 405000, | ||
157 | 317200, 22, 22, 4, 30, 64, 65, 65 }, /* 405 Mb */ | ||
158 | [66] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS, 405000, | ||
159 | 317200, 23, 23, 4, 31, 66, 67, 67 }, /* 405 Mb */ | ||
160 | [67] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS_HGI, 450000, | ||
161 | 346400, 23, 23, 4, 31, 66, 67, 67 }, /* 450 Mb */ | ||
112 | }, | 162 | }, |
113 | 50, /* probe interval */ | 163 | 50, /* probe interval */ |
114 | WLAN_RC_HT_FLAG, /* Phy rates allowed initially */ | 164 | WLAN_RC_HT_FLAG, /* Phy rates allowed initially */ |
@@ -118,103 +168,153 @@ static const struct ath_rate_table ar5416_11na_ratetable = { | |||
118 | * for HT are the 64K max aggregate limit */ | 168 | * for HT are the 64K max aggregate limit */ |
119 | 169 | ||
120 | static const struct ath_rate_table ar5416_11ng_ratetable = { | 170 | static const struct ath_rate_table ar5416_11ng_ratetable = { |
121 | 47, | 171 | 72, |
122 | 12, /* MCS start */ | 172 | 12, /* MCS start */ |
123 | { | 173 | { |
124 | { RC_ALL, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ | 174 | [0] = { RC_ALL, WLAN_RC_PHY_CCK, 1000, |
125 | 900, 0, 2, 0, 0, 0, 0, 0 }, | 175 | 900, 0, 2, 0, 0, 0, 0, 0 }, /* 1 Mb */ |
126 | { RC_ALL, WLAN_RC_PHY_CCK, 2000, /* 2 Mb */ | 176 | [1] = { RC_ALL, WLAN_RC_PHY_CCK, 2000, |
127 | 1900, 1, 4, 1, 1, 1, 1, 1 }, | 177 | 1900, 1, 4, 1, 1, 1, 1, 1 }, /* 2 Mb */ |
128 | { RC_ALL, WLAN_RC_PHY_CCK, 5500, /* 5.5 Mb */ | 178 | [2] = { RC_ALL, WLAN_RC_PHY_CCK, 5500, |
129 | 4900, 2, 11, 2, 2, 2, 2, 2 }, | 179 | 4900, 2, 11, 2, 2, 2, 2, 2 }, /* 5.5 Mb */ |
130 | { RC_ALL, WLAN_RC_PHY_CCK, 11000, /* 11 Mb */ | 180 | [3] = { RC_ALL, WLAN_RC_PHY_CCK, 11000, |
131 | 8100, 3, 22, 3, 3, 3, 3, 3 }, | 181 | 8100, 3, 22, 3, 3, 3, 3, 3 }, /* 11 Mb */ |
132 | { RC_INVALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ | 182 | [4] = { RC_INVALID, WLAN_RC_PHY_OFDM, 6000, |
133 | 5400, 4, 12, 4, 4, 4, 4, 4 }, | 183 | 5400, 4, 12, 4, 4, 4, 4, 4 }, /* 6 Mb */ |
134 | { RC_INVALID, WLAN_RC_PHY_OFDM, 9000, /* 9 Mb */ | 184 | [5] = { RC_INVALID, WLAN_RC_PHY_OFDM, 9000, |
135 | 7800, 5, 18, 4, 5, 5, 5, 5 }, | 185 | 7800, 5, 18, 4, 5, 5, 5, 5 }, /* 9 Mb */ |
136 | { RC_L_SD, WLAN_RC_PHY_OFDM, 12000, /* 12 Mb */ | 186 | [6] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 12000, |
137 | 10100, 6, 24, 6, 6, 6, 6, 6 }, | 187 | 10100, 6, 24, 6, 6, 6, 6, 6 }, /* 12 Mb */ |
138 | { RC_L_SD, WLAN_RC_PHY_OFDM, 18000, /* 18 Mb */ | 188 | [7] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 18000, |
139 | 14100, 7, 36, 6, 7, 7, 7, 7 }, | 189 | 14100, 7, 36, 6, 7, 7, 7, 7 }, /* 18 Mb */ |
140 | { RC_L_SD, WLAN_RC_PHY_OFDM, 24000, /* 24 Mb */ | 190 | [8] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 24000, |
141 | 17700, 8, 48, 8, 8, 8, 8, 8 }, | 191 | 17700, 8, 48, 8, 8, 8, 8, 8 }, /* 24 Mb */ |
142 | { RC_L_SD, WLAN_RC_PHY_OFDM, 36000, /* 36 Mb */ | 192 | [9] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 36000, |
143 | 23700, 9, 72, 8, 9, 9, 9, 9 }, | 193 | 23700, 9, 72, 8, 9, 9, 9, 9 }, /* 36 Mb */ |
144 | { RC_L_SD, WLAN_RC_PHY_OFDM, 48000, /* 48 Mb */ | 194 | [10] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 48000, |
145 | 27400, 10, 96, 8, 10, 10, 10, 10 }, | 195 | 27400, 10, 96, 8, 10, 10, 10, 10 }, /* 48 Mb */ |
146 | { RC_L_SD, WLAN_RC_PHY_OFDM, 54000, /* 54 Mb */ | 196 | [11] = { RC_L_SDT, WLAN_RC_PHY_OFDM, 54000, |
147 | 30900, 11, 108, 8, 11, 11, 11, 11 }, | 197 | 30900, 11, 108, 8, 11, 11, 11, 11 }, /* 54 Mb */ |
148 | { RC_INVALID, WLAN_RC_PHY_HT_20_SS, 6500, /* 6.5 Mb */ | 198 | [12] = { RC_INVALID, WLAN_RC_PHY_HT_20_SS, 6500, |
149 | 6400, 0, 0, 4, 12, 29, 12, 29 }, | 199 | 6400, 0, 0, 4, 12, 42, 12, 42 }, /* 6.5 Mb */ |
150 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 13000, /* 13 Mb */ | 200 | [13] = { RC_HT_SDT_20, WLAN_RC_PHY_HT_20_SS, 13000, |
151 | 12700, 1, 1, 6, 13, 30, 13, 30 }, | 201 | 12700, 1, 1, 6, 13, 43, 13, 43 }, /* 13 Mb */ |
152 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 19500, /* 19.5 Mb */ | 202 | [14] = { RC_HT_SDT_20, WLAN_RC_PHY_HT_20_SS, 19500, |
153 | 18800, 2, 2, 6, 14, 31, 14, 31 }, | 203 | 18800, 2, 2, 6, 14, 44, 14, 44 }, /* 19.5 Mb*/ |
154 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 26000, /* 26 Mb */ | 204 | [15] = { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 26000, |
155 | 25000, 3, 3, 8, 15, 32, 15, 32 }, | 205 | 25000, 3, 3, 8, 15, 45, 15, 45 }, /* 26 Mb */ |
156 | { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 39000, /* 39 Mb */ | 206 | [16] = { RC_HT_SD_20, WLAN_RC_PHY_HT_20_SS, 39000, |
157 | 36700, 4, 4, 8, 16, 33, 16, 33 }, | 207 | 36700, 4, 4, 8, 16, 46, 16, 46 }, /* 39 Mb */ |
158 | { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 52000, /* 52 Mb */ | 208 | [17] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 52000, |
159 | 48100, 5, 5, 8, 17, 34, 17, 34 }, | 209 | 48100, 5, 5, 8, 17, 47, 17, 47 }, /* 52 Mb */ |
160 | { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 58500, /* 58.5 Mb */ | 210 | [18] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 58500, |
161 | 53500, 6, 6, 8, 18, 35, 18, 35 }, | 211 | 53500, 6, 6, 8, 18, 48, 18, 48 }, /* 58.5 Mb */ |
162 | { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 65000, /* 65 Mb */ | 212 | [19] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS, 65000, |
163 | 59000, 7, 7, 8, 19, 36, 19, 37 }, | 213 | 59000, 7, 7, 8, 19, 49, 20, 50 }, /* 65 Mb */ |
164 | { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 13000, /* 13 Mb */ | 214 | [20] = { RC_HT_S_20, WLAN_RC_PHY_HT_20_SS_HGI, 72200, |
165 | 12700, 8, 8, 4, 20, 38, 20, 38 }, | 215 | 65400, 7, 7, 8, 19, 49, 20, 50 }, /* 65 Mb*/ |
166 | { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 26000, /* 26 Mb */ | 216 | [21] = { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 13000, |
167 | 24800, 9, 9, 6, 21, 39, 21, 39 }, | 217 | 12700, 8, 8, 4, 20, 51, 21, 51 }, /* 13 Mb */ |
168 | { RC_INVALID, WLAN_RC_PHY_HT_20_DS, 39000, /* 39 Mb */ | 218 | [22] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_DS, 26000, |
169 | 36600, 10, 10, 6, 22, 40, 22, 40 }, | 219 | 24800, 9, 9, 6, 21, 52, 22, 52 }, /* 26 Mb */ |
170 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 52000, /* 52 Mb */ | 220 | [23] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_DS, 39000, |
171 | 48100, 11, 11, 8, 23, 41, 23, 41 }, | 221 | 36600, 10, 10, 6, 22, 53, 23, 53 }, /* 39 Mb */ |
172 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 78000, /* 78 Mb */ | 222 | [24] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 52000, |
173 | 69500, 12, 12, 8, 24, 42, 24, 42 }, | 223 | 48100, 11, 11, 8, 23, 54, 24, 54 }, /* 52 Mb */ |
174 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 104000, /* 104 Mb */ | 224 | [25] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 78000, |
175 | 89500, 13, 13, 8, 25, 43, 25, 43 }, | 225 | 69500, 12, 12, 8, 24, 55, 25, 55 }, /* 78 Mb */ |
176 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 117000, /* 117 Mb */ | 226 | [26] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 104000, |
177 | 98900, 14, 14, 8, 26, 44, 26, 44 }, | 227 | 89500, 13, 13, 8, 25, 56, 26, 56 }, /* 104 Mb */ |
178 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS, 130000, /* 130 Mb */ | 228 | [27] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 117000, |
179 | 108300, 15, 15, 8, 27, 45, 28, 46 }, | 229 | 98900, 14, 14, 8, 26, 57, 27, 57 }, /* 117 Mb */ |
180 | { RC_HT_D_20, WLAN_RC_PHY_HT_20_DS_HGI, 144400, /* 130 Mb */ | 230 | [28] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS, 130000, |
181 | 120000, 15, 15, 8, 27, 45, 28, 46 }, | 231 | 108300, 15, 15, 8, 27, 58, 29, 59 }, /* 130 Mb */ |
182 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 13500, /* 13.5 Mb */ | 232 | [29] = { RC_HT_DT_20, WLAN_RC_PHY_HT_20_DS_HGI, 144400, |
183 | 13200, 0, 0, 8, 12, 29, 29, 29 }, | 233 | 120000, 15, 15, 8, 27, 58, 29, 59 }, /* 144.4 Mb */ |
184 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 27500, /* 27.0 Mb */ | 234 | [30] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 19500, |
185 | 25900, 1, 1, 8, 13, 30, 30, 30 }, | 235 | 17400, 16, 16, 4, 28, 60, 30, 60 }, /* 19.5 Mb */ |
186 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 40500, /* 40.5 Mb */ | 236 | [31] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 39000, |
187 | 38600, 2, 2, 8, 14, 31, 31, 31 }, | 237 | 35100, 17, 17, 6, 29, 61, 31, 61 }, /* 39 Mb */ |
188 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 54000, /* 54 Mb */ | 238 | [32] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 58500, |
189 | 49800, 3, 3, 8, 15, 32, 32, 32 }, | 239 | 52600, 18, 18, 6, 30, 62, 32, 62 }, /* 58.5 Mb */ |
190 | { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 81500, /* 81 Mb */ | 240 | [33] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 78000, |
191 | 72200, 4, 4, 8, 16, 33, 33, 33 }, | 241 | 70400, 19, 19, 8, 31, 63, 33, 63 }, /* 78 Mb */ |
192 | { RC_HT_S_40 , WLAN_RC_PHY_HT_40_SS, 108000, /* 108 Mb */ | 242 | [34] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS, 117000, |
193 | 92900, 5, 5, 8, 17, 34, 34, 34 }, | 243 | 104900, 20, 20, 8, 32, 64, 35, 65 }, /* 117 Mb */ |
194 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 121500, /* 121.5 Mb */ | 244 | [35] = { RC_INVALID, WLAN_RC_PHY_HT_20_TS_HGI, 130000, |
195 | 102700, 6, 6, 8, 18, 35, 35, 35 }, | 245 | 115800, 20, 20, 8, 32, 64, 35, 65 }, /* 130 Mb */ |
196 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 135000, /* 135 Mb */ | 246 | [36] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS, 156000, |
197 | 112000, 7, 7, 8, 19, 36, 37, 37 }, | 247 | 137200, 21, 21, 8, 33, 66, 37, 67 }, /* 156 Mb */ |
198 | { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS_HGI, 150000, /* 150 Mb */ | 248 | [37] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS_HGI, 173300, |
199 | 122000, 7, 7, 8, 19, 36, 37, 37 }, | 249 | 151100, 21, 21, 8, 33, 66, 37, 67 }, /* 173.3 Mb */ |
200 | { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 27000, /* 27 Mb */ | 250 | [38] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS, 175500, |
201 | 25800, 8, 8, 8, 20, 38, 38, 38 }, | 251 | 152800, 22, 22, 8, 34, 68, 39, 69 }, /* 175.5 Mb */ |
202 | { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 54000, /* 54 Mb */ | 252 | [39] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS_HGI, 195000, |
203 | 49800, 9, 9, 8, 21, 39, 39, 39 }, | 253 | 168400, 22, 22, 8, 34, 68, 39, 69 }, /* 195 Mb */ |
204 | { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 81000, /* 81 Mb */ | 254 | [40] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS, 195000, |
205 | 71900, 10, 10, 8, 22, 40, 40, 40 }, | 255 | 168400, 23, 23, 8, 35, 70, 41, 71 }, /* 195 Mb */ |
206 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 108000, /* 108 Mb */ | 256 | [41] = { RC_HT_T_20, WLAN_RC_PHY_HT_20_TS_HGI, 216700, |
207 | 92500, 11, 11, 8, 23, 41, 41, 41 }, | 257 | 185000, 23, 23, 8, 35, 70, 41, 71 }, /* 216.7 Mb */ |
208 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 162000, /* 162 Mb */ | 258 | [42] = { RC_HT_SDT_40, WLAN_RC_PHY_HT_40_SS, 13500, |
209 | 130300, 12, 12, 8, 24, 42, 42, 42 }, | 259 | 13200, 0, 0, 8, 12, 42, 42, 42 }, /* 13.5 Mb */ |
210 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 216000, /* 216 Mb */ | 260 | [43] = { RC_HT_SDT_40, WLAN_RC_PHY_HT_40_SS, 27500, |
211 | 162800, 13, 13, 8, 25, 43, 43, 43 }, | 261 | 25900, 1, 1, 8, 13, 43, 43, 43 }, /* 27.0 Mb */ |
212 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 243000, /* 243 Mb */ | 262 | [44] = { RC_HT_SDT_40, WLAN_RC_PHY_HT_40_SS, 40500, |
213 | 178200, 14, 14, 8, 26, 44, 44, 44 }, | 263 | 38600, 2, 2, 8, 14, 44, 44, 44 }, /* 40.5 Mb */ |
214 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS, 270000, /* 270 Mb */ | 264 | [45] = { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 54000, |
215 | 192100, 15, 15, 8, 27, 45, 46, 46 }, | 265 | 49800, 3, 3, 8, 15, 45, 45, 45 }, /* 54 Mb */ |
216 | { RC_HT_D_40, WLAN_RC_PHY_HT_40_DS_HGI, 300000, /* 300 Mb */ | 266 | [46] = { RC_HT_SD_40, WLAN_RC_PHY_HT_40_SS, 81500, |
217 | 207000, 15, 15, 8, 27, 45, 46, 46 }, | 267 | 72200, 4, 4, 8, 16, 46, 46, 46 }, /* 81 Mb */ |
268 | [47] = { RC_HT_S_40 , WLAN_RC_PHY_HT_40_SS, 108000, | ||
269 | 92900, 5, 5, 8, 17, 47, 47, 47 }, /* 108 Mb */ | ||
270 | [48] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 121500, | ||
271 | 102700, 6, 6, 8, 18, 48, 48, 48 }, /* 121.5 Mb */ | ||
272 | [49] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS, 135000, | ||
273 | 112000, 7, 7, 8, 19, 49, 50, 50 }, /* 135 Mb */ | ||
274 | [50] = { RC_HT_S_40, WLAN_RC_PHY_HT_40_SS_HGI, 150000, | ||
275 | 122000, 7, 7, 8, 19, 49, 50, 50 }, /* 150 Mb */ | ||
276 | [51] = { RC_INVALID, WLAN_RC_PHY_HT_40_DS, 27000, | ||
277 | 25800, 8, 8, 8, 20, 51, 51, 51 }, /* 27 Mb */ | ||
278 | [52] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_DS, 54000, | ||
279 | 49800, 9, 9, 8, 21, 52, 52, 52 }, /* 54 Mb */ | ||
280 | [53] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_DS, 81000, | ||
281 | 71900, 10, 10, 8, 22, 53, 53, 53 }, /* 81 Mb */ | ||
282 | [54] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 108000, | ||
283 | 92500, 11, 11, 8, 23, 54, 54, 54 }, /* 108 Mb */ | ||
284 | [55] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 162000, | ||
285 | 130300, 12, 12, 8, 24, 55, 55, 55 }, /* 162 Mb */ | ||
286 | [56] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 216000, | ||
287 | 162800, 13, 13, 8, 25, 56, 56, 56 }, /* 216 Mb */ | ||
288 | [57] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 243000, | ||
289 | 178200, 14, 14, 8, 26, 57, 57, 57 }, /* 243 Mb */ | ||
290 | [58] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS, 270000, | ||
291 | 192100, 15, 15, 8, 27, 58, 59, 59 }, /* 270 Mb */ | ||
292 | [59] = { RC_HT_DT_40, WLAN_RC_PHY_HT_40_DS_HGI, 300000, | ||
293 | 207000, 15, 15, 8, 27, 58, 59, 59 }, /* 300 Mb */ | ||
294 | [60] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 40500, | ||
295 | 36100, 16, 16, 8, 28, 60, 60, 60 }, /* 40.5 Mb */ | ||
296 | [61] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 81000, | ||
297 | 72900, 17, 17, 8, 29, 61, 61, 61 }, /* 81 Mb */ | ||
298 | [62] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 121500, | ||
299 | 108300, 18, 18, 8, 30, 62, 62, 62 }, /* 121.5 Mb */ | ||
300 | [63] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 162000, | ||
301 | 142000, 19, 19, 8, 31, 63, 63, 63 }, /* 162 Mb */ | ||
302 | [64] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS, 243000, | ||
303 | 205100, 20, 20, 8, 32, 64, 65, 65 }, /* 243 Mb */ | ||
304 | [65] = { RC_INVALID, WLAN_RC_PHY_HT_40_TS_HGI, 270000, | ||
305 | 224700, 20, 20, 8, 32, 64, 65, 65 }, /* 170 Mb */ | ||
306 | [66] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS, 324000, | ||
307 | 263100, 21, 21, 8, 33, 66, 67, 67 }, /* 324 Mb */ | ||
308 | [67] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS_HGI, 360000, | ||
309 | 288000, 21, 21, 8, 33, 66, 67, 67 }, /* 360 Mb */ | ||
310 | [68] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS, 364500, | ||
311 | 290700, 22, 22, 8, 34, 68, 69, 69 }, /* 364.5 Mb */ | ||
312 | [69] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS_HGI, 405000, | ||
313 | 317200, 22, 22, 8, 34, 68, 69, 69 }, /* 405 Mb */ | ||
314 | [70] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS, 405000, | ||
315 | 317200, 23, 23, 8, 35, 70, 71, 71 }, /* 405 Mb */ | ||
316 | [71] = { RC_HT_T_40, WLAN_RC_PHY_HT_40_TS_HGI, 450000, | ||
317 | 346400, 23, 23, 8, 35, 70, 71, 71 }, /* 450 Mb */ | ||
218 | }, | 318 | }, |
219 | 50, /* probe interval */ | 319 | 50, /* probe interval */ |
220 | WLAN_RC_HT_FLAG, /* Phy rates allowed initially */ | 320 | WLAN_RC_HT_FLAG, /* Phy rates allowed initially */ |
@@ -224,21 +324,21 @@ static const struct ath_rate_table ar5416_11a_ratetable = { | |||
224 | 8, | 324 | 8, |
225 | 0, | 325 | 0, |
226 | { | 326 | { |
227 | { RC_L_SD, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ | 327 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ |
228 | 5400, 0, 12, 0, 0, 0 }, | 328 | 5400, 0, 12, 0, 0, 0 }, |
229 | { RC_L_SD, WLAN_RC_PHY_OFDM, 9000, /* 9 Mb */ | 329 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 9000, /* 9 Mb */ |
230 | 7800, 1, 18, 0, 1, 0 }, | 330 | 7800, 1, 18, 0, 1, 0 }, |
231 | { RC_L_SD, WLAN_RC_PHY_OFDM, 12000, /* 12 Mb */ | 331 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 12000, /* 12 Mb */ |
232 | 10000, 2, 24, 2, 2, 0 }, | 332 | 10000, 2, 24, 2, 2, 0 }, |
233 | { RC_L_SD, WLAN_RC_PHY_OFDM, 18000, /* 18 Mb */ | 333 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 18000, /* 18 Mb */ |
234 | 13900, 3, 36, 2, 3, 0 }, | 334 | 13900, 3, 36, 2, 3, 0 }, |
235 | { RC_L_SD, WLAN_RC_PHY_OFDM, 24000, /* 24 Mb */ | 335 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 24000, /* 24 Mb */ |
236 | 17300, 4, 48, 4, 4, 0 }, | 336 | 17300, 4, 48, 4, 4, 0 }, |
237 | { RC_L_SD, WLAN_RC_PHY_OFDM, 36000, /* 36 Mb */ | 337 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 36000, /* 36 Mb */ |
238 | 23000, 5, 72, 4, 5, 0 }, | 338 | 23000, 5, 72, 4, 5, 0 }, |
239 | { RC_L_SD, WLAN_RC_PHY_OFDM, 48000, /* 48 Mb */ | 339 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 48000, /* 48 Mb */ |
240 | 27400, 6, 96, 4, 6, 0 }, | 340 | 27400, 6, 96, 4, 6, 0 }, |
241 | { RC_L_SD, WLAN_RC_PHY_OFDM, 54000, /* 54 Mb */ | 341 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 54000, /* 54 Mb */ |
242 | 29300, 7, 108, 4, 7, 0 }, | 342 | 29300, 7, 108, 4, 7, 0 }, |
243 | }, | 343 | }, |
244 | 50, /* probe interval */ | 344 | 50, /* probe interval */ |
@@ -249,29 +349,29 @@ static const struct ath_rate_table ar5416_11g_ratetable = { | |||
249 | 12, | 349 | 12, |
250 | 0, | 350 | 0, |
251 | { | 351 | { |
252 | { RC_L_SD, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ | 352 | { RC_L_SDT, WLAN_RC_PHY_CCK, 1000, /* 1 Mb */ |
253 | 900, 0, 2, 0, 0, 0 }, | 353 | 900, 0, 2, 0, 0, 0 }, |
254 | { RC_L_SD, WLAN_RC_PHY_CCK, 2000, /* 2 Mb */ | 354 | { RC_L_SDT, WLAN_RC_PHY_CCK, 2000, /* 2 Mb */ |
255 | 1900, 1, 4, 1, 1, 0 }, | 355 | 1900, 1, 4, 1, 1, 0 }, |
256 | { RC_L_SD, WLAN_RC_PHY_CCK, 5500, /* 5.5 Mb */ | 356 | { RC_L_SDT, WLAN_RC_PHY_CCK, 5500, /* 5.5 Mb */ |
257 | 4900, 2, 11, 2, 2, 0 }, | 357 | 4900, 2, 11, 2, 2, 0 }, |
258 | { RC_L_SD, WLAN_RC_PHY_CCK, 11000, /* 11 Mb */ | 358 | { RC_L_SDT, WLAN_RC_PHY_CCK, 11000, /* 11 Mb */ |
259 | 8100, 3, 22, 3, 3, 0 }, | 359 | 8100, 3, 22, 3, 3, 0 }, |
260 | { RC_INVALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ | 360 | { RC_INVALID, WLAN_RC_PHY_OFDM, 6000, /* 6 Mb */ |
261 | 5400, 4, 12, 4, 4, 0 }, | 361 | 5400, 4, 12, 4, 4, 0 }, |
262 | { RC_INVALID, WLAN_RC_PHY_OFDM, 9000, /* 9 Mb */ | 362 | { RC_INVALID, WLAN_RC_PHY_OFDM, 9000, /* 9 Mb */ |
263 | 7800, 5, 18, 4, 5, 0 }, | 363 | 7800, 5, 18, 4, 5, 0 }, |
264 | { RC_L_SD, WLAN_RC_PHY_OFDM, 12000, /* 12 Mb */ | 364 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 12000, /* 12 Mb */ |
265 | 10000, 6, 24, 6, 6, 0 }, | 365 | 10000, 6, 24, 6, 6, 0 }, |
266 | { RC_L_SD, WLAN_RC_PHY_OFDM, 18000, /* 18 Mb */ | 366 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 18000, /* 18 Mb */ |
267 | 13900, 7, 36, 6, 7, 0 }, | 367 | 13900, 7, 36, 6, 7, 0 }, |
268 | { RC_L_SD, WLAN_RC_PHY_OFDM, 24000, /* 24 Mb */ | 368 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 24000, /* 24 Mb */ |
269 | 17300, 8, 48, 8, 8, 0 }, | 369 | 17300, 8, 48, 8, 8, 0 }, |
270 | { RC_L_SD, WLAN_RC_PHY_OFDM, 36000, /* 36 Mb */ | 370 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 36000, /* 36 Mb */ |
271 | 23000, 9, 72, 8, 9, 0 }, | 371 | 23000, 9, 72, 8, 9, 0 }, |
272 | { RC_L_SD, WLAN_RC_PHY_OFDM, 48000, /* 48 Mb */ | 372 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 48000, /* 48 Mb */ |
273 | 27400, 10, 96, 8, 10, 0 }, | 373 | 27400, 10, 96, 8, 10, 0 }, |
274 | { RC_L_SD, WLAN_RC_PHY_OFDM, 54000, /* 54 Mb */ | 374 | { RC_L_SDT, WLAN_RC_PHY_OFDM, 54000, /* 54 Mb */ |
275 | 29300, 11, 108, 8, 11, 0 }, | 375 | 29300, 11, 108, 8, 11, 0 }, |
276 | }, | 376 | }, |
277 | 50, /* probe interval */ | 377 | 50, /* probe interval */ |
@@ -374,6 +474,8 @@ static int ath_rc_valid_phyrate(u32 phy, u32 capflag, int ignore_cw) | |||
374 | return 0; | 474 | return 0; |
375 | if (WLAN_RC_PHY_DS(phy) && !(capflag & WLAN_RC_DS_FLAG)) | 475 | if (WLAN_RC_PHY_DS(phy) && !(capflag & WLAN_RC_DS_FLAG)) |
376 | return 0; | 476 | return 0; |
477 | if (WLAN_RC_PHY_TS(phy) && !(capflag & WLAN_RC_TS_FLAG)) | ||
478 | return 0; | ||
377 | if (WLAN_RC_PHY_SGI(phy) && !(capflag & WLAN_RC_SGI_FLAG)) | 479 | if (WLAN_RC_PHY_SGI(phy) && !(capflag & WLAN_RC_SGI_FLAG)) |
378 | return 0; | 480 | return 0; |
379 | if (!ignore_cw && WLAN_RC_PHY_HT(phy)) | 481 | if (!ignore_cw && WLAN_RC_PHY_HT(phy)) |
@@ -583,8 +685,12 @@ static u8 ath_rc_get_highest_rix(struct ath_softc *sc, | |||
583 | if (rate > (ath_rc_priv->rate_table_size - 1)) | 685 | if (rate > (ath_rc_priv->rate_table_size - 1)) |
584 | rate = ath_rc_priv->rate_table_size - 1; | 686 | rate = ath_rc_priv->rate_table_size - 1; |
585 | 687 | ||
586 | if (rate_table->info[rate].rate_flags & RC_DS && | 688 | if (RC_TS_ONLY(rate_table->info[rate].rate_flags) && |
587 | (ath_rc_priv->ht_cap & WLAN_RC_DS_FLAG)) | 689 | (ath_rc_priv->ht_cap & WLAN_RC_TS_FLAG)) |
690 | return rate; | ||
691 | |||
692 | if (RC_DS_OR_LATER(rate_table->info[rate].rate_flags) && | ||
693 | (ath_rc_priv->ht_cap & (WLAN_RC_DS_FLAG | WLAN_RC_TS_FLAG))) | ||
588 | return rate; | 694 | return rate; |
589 | 695 | ||
590 | if (RC_SS_OR_LEGACY(rate_table->info[rate].rate_flags)) | 696 | if (RC_SS_OR_LEGACY(rate_table->info[rate].rate_flags)) |
@@ -1000,12 +1106,19 @@ static void ath_rc_update_ht(struct ath_softc *sc, | |||
1000 | static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table, | 1106 | static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table, |
1001 | struct ieee80211_tx_rate *rate) | 1107 | struct ieee80211_tx_rate *rate) |
1002 | { | 1108 | { |
1003 | int rix; | 1109 | int rix = 0, i = 0; |
1110 | int mcs_rix_off[] = { 7, 15, 20, 21, 22, 23 }; | ||
1004 | 1111 | ||
1005 | if (!(rate->flags & IEEE80211_TX_RC_MCS)) | 1112 | if (!(rate->flags & IEEE80211_TX_RC_MCS)) |
1006 | return rate->idx; | 1113 | return rate->idx; |
1007 | 1114 | ||
1008 | rix = rate->idx + rate_table->mcs_start; | 1115 | while (rate->idx > mcs_rix_off[i] && |
1116 | i < sizeof(mcs_rix_off)/sizeof(int)) { | ||
1117 | rix++; i++; | ||
1118 | } | ||
1119 | |||
1120 | rix += rate->idx + rate_table->mcs_start; | ||
1121 | |||
1009 | if ((rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) && | 1122 | if ((rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) && |
1010 | (rate->flags & IEEE80211_TX_RC_SHORT_GI)) | 1123 | (rate->flags & IEEE80211_TX_RC_SHORT_GI)) |
1011 | rix = rate_table->info[rix].ht_index; | 1124 | rix = rate_table->info[rix].ht_index; |
@@ -1013,8 +1126,6 @@ static int ath_rc_get_rateindex(const struct ath_rate_table *rate_table, | |||
1013 | rix = rate_table->info[rix].sgi_index; | 1126 | rix = rate_table->info[rix].sgi_index; |
1014 | else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) | 1127 | else if (rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) |
1015 | rix = rate_table->info[rix].cw40index; | 1128 | rix = rate_table->info[rix].cw40index; |
1016 | else | ||
1017 | rix = rate_table->info[rix].base_index; | ||
1018 | 1129 | ||
1019 | return rix; | 1130 | return rix; |
1020 | } | 1131 | } |
@@ -1196,13 +1307,14 @@ static u8 ath_rc_build_ht_caps(struct ath_softc *sc, struct ieee80211_sta *sta, | |||
1196 | 1307 | ||
1197 | if (sta->ht_cap.ht_supported) { | 1308 | if (sta->ht_cap.ht_supported) { |
1198 | caps = WLAN_RC_HT_FLAG; | 1309 | caps = WLAN_RC_HT_FLAG; |
1199 | if (sta->ht_cap.mcs.rx_mask[1]) | 1310 | if (sta->ht_cap.mcs.rx_mask[1] && sta->ht_cap.mcs.rx_mask[2]) |
1311 | caps |= WLAN_RC_TS_FLAG | WLAN_RC_DS_FLAG; | ||
1312 | else if (sta->ht_cap.mcs.rx_mask[1]) | ||
1200 | caps |= WLAN_RC_DS_FLAG; | 1313 | caps |= WLAN_RC_DS_FLAG; |
1201 | if (is_cw40) | 1314 | if (is_cw40) |
1202 | caps |= WLAN_RC_40_FLAG; | 1315 | caps |= WLAN_RC_40_FLAG; |
1203 | if (is_sgi) | 1316 | if (is_sgi) |
1204 | caps |= WLAN_RC_SGI_FLAG; | 1317 | caps |= WLAN_RC_SGI_FLAG; |
1205 | |||
1206 | } | 1318 | } |
1207 | 1319 | ||
1208 | return caps; | 1320 | return caps; |
diff --git a/drivers/net/wireless/ath/ath9k/rc.h b/drivers/net/wireless/ath/ath9k/rc.h index 601803aa06ff..e914c334c65e 100644 --- a/drivers/net/wireless/ath/ath9k/rc.h +++ b/drivers/net/wireless/ath/ath9k/rc.h | |||
@@ -24,7 +24,7 @@ | |||
24 | struct ath_softc; | 24 | struct ath_softc; |
25 | 25 | ||
26 | #define ATH_RATE_MAX 30 | 26 | #define ATH_RATE_MAX 30 |
27 | #define RATE_TABLE_SIZE 64 | 27 | #define RATE_TABLE_SIZE 72 |
28 | #define MAX_TX_RATE_PHY 48 | 28 | #define MAX_TX_RATE_PHY 48 |
29 | 29 | ||
30 | 30 | ||
@@ -36,19 +36,34 @@ struct ath_softc; | |||
36 | #define RC_HT_20 0x0010 | 36 | #define RC_HT_20 0x0010 |
37 | #define RC_HT_40 0x0020 | 37 | #define RC_HT_40 0x0020 |
38 | 38 | ||
39 | #define RC_SS_OR_LEGACY(f) ((f) & (RC_SS | RC_LEGACY)) | 39 | #define RC_STREAM_MASK 0xe |
40 | #define RC_DS_OR_LATER(f) ((((f) & RC_STREAM_MASK) == RC_DS) || \ | ||
41 | (((f) & RC_STREAM_MASK) == (RC_DS | RC_TS))) | ||
42 | #define RC_TS_ONLY(f) (((f) & RC_STREAM_MASK) == RC_TS) | ||
43 | #define RC_SS_OR_LEGACY(f) ((f) & (RC_SS | RC_LEGACY)) | ||
40 | 44 | ||
41 | #define RC_HT_2040 (RC_HT_20 | RC_HT_40) | 45 | #define RC_HT_2040 (RC_HT_20 | RC_HT_40) |
42 | #define RC_ALL_STREAM (RC_SS | RC_DS) | 46 | #define RC_ALL_STREAM (RC_SS | RC_DS | RC_TS) |
43 | #define RC_L_SD (RC_LEGACY | RC_SS | RC_DS) | 47 | #define RC_L_SD (RC_LEGACY | RC_SS | RC_DS) |
44 | #define RC_HT_SD_2040 (RC_HT_2040 | RC_SS | RC_DS) | 48 | #define RC_L_SDT (RC_LEGACY | RC_SS | RC_DS | RC_TS) |
45 | #define RC_HT_S_20 (RC_HT_20 | RC_SS) | 49 | #define RC_HT_S_20 (RC_HT_20 | RC_SS) |
46 | #define RC_HT_SD_20 (RC_HT_20 | RC_SS | RC_DS) | ||
47 | #define RC_HT_SD_40 (RC_HT_40 | RC_SS | RC_DS) | ||
48 | #define RC_HT_S_20 (RC_HT_20 | RC_SS) | ||
49 | #define RC_HT_S_40 (RC_HT_40 | RC_SS) | ||
50 | #define RC_HT_D_20 (RC_HT_20 | RC_DS) | 50 | #define RC_HT_D_20 (RC_HT_20 | RC_DS) |
51 | #define RC_HT_T_20 (RC_HT_20 | RC_TS) | ||
52 | #define RC_HT_S_40 (RC_HT_40 | RC_SS) | ||
51 | #define RC_HT_D_40 (RC_HT_40 | RC_DS) | 53 | #define RC_HT_D_40 (RC_HT_40 | RC_DS) |
54 | #define RC_HT_T_40 (RC_HT_40 | RC_TS) | ||
55 | |||
56 | #define RC_HT_SD_20 (RC_HT_20 | RC_SS | RC_DS) | ||
57 | #define RC_HT_DT_20 (RC_HT_20 | RC_DS | RC_TS) | ||
58 | #define RC_HT_SD_40 (RC_HT_40 | RC_SS | RC_DS) | ||
59 | #define RC_HT_DT_40 (RC_HT_40 | RC_DS | RC_TS) | ||
60 | |||
61 | #define RC_HT_SD_2040 (RC_HT_2040 | RC_SS | RC_DS) | ||
62 | #define RC_HT_SDT_2040 (RC_HT_2040 | RC_SS | RC_DS | RC_TS) | ||
63 | |||
64 | #define RC_HT_SDT_20 (RC_HT_20 | RC_SS | RC_DS | RC_TS) | ||
65 | #define RC_HT_SDT_40 (RC_HT_40 | RC_SS | RC_DS | RC_TS) | ||
66 | |||
52 | #define RC_ALL (RC_LEGACY | RC_HT_2040 | RC_ALL_STREAM) | 67 | #define RC_ALL (RC_LEGACY | RC_HT_2040 | RC_ALL_STREAM) |
53 | 68 | ||
54 | enum { | 69 | enum { |
@@ -56,12 +71,16 @@ enum { | |||
56 | WLAN_RC_PHY_CCK, | 71 | WLAN_RC_PHY_CCK, |
57 | WLAN_RC_PHY_HT_20_SS, | 72 | WLAN_RC_PHY_HT_20_SS, |
58 | WLAN_RC_PHY_HT_20_DS, | 73 | WLAN_RC_PHY_HT_20_DS, |
74 | WLAN_RC_PHY_HT_20_TS, | ||
59 | WLAN_RC_PHY_HT_40_SS, | 75 | WLAN_RC_PHY_HT_40_SS, |
60 | WLAN_RC_PHY_HT_40_DS, | 76 | WLAN_RC_PHY_HT_40_DS, |
77 | WLAN_RC_PHY_HT_40_TS, | ||
61 | WLAN_RC_PHY_HT_20_SS_HGI, | 78 | WLAN_RC_PHY_HT_20_SS_HGI, |
62 | WLAN_RC_PHY_HT_20_DS_HGI, | 79 | WLAN_RC_PHY_HT_20_DS_HGI, |
80 | WLAN_RC_PHY_HT_20_TS_HGI, | ||
63 | WLAN_RC_PHY_HT_40_SS_HGI, | 81 | WLAN_RC_PHY_HT_40_SS_HGI, |
64 | WLAN_RC_PHY_HT_40_DS_HGI, | 82 | WLAN_RC_PHY_HT_40_DS_HGI, |
83 | WLAN_RC_PHY_HT_40_TS_HGI, | ||
65 | WLAN_RC_PHY_MAX | 84 | WLAN_RC_PHY_MAX |
66 | }; | 85 | }; |
67 | 86 | ||
@@ -69,27 +88,36 @@ enum { | |||
69 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ | 88 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ |
70 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ | 89 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
71 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) | 90 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) |
91 | #define WLAN_RC_PHY_TS(_phy) ((_phy == WLAN_RC_PHY_HT_20_TS) \ | ||
92 | || (_phy == WLAN_RC_PHY_HT_40_TS) \ | ||
93 | || (_phy == WLAN_RC_PHY_HT_20_TS_HGI) \ | ||
94 | || (_phy == WLAN_RC_PHY_HT_40_TS_HGI)) | ||
72 | #define WLAN_RC_PHY_20(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS) \ | 95 | #define WLAN_RC_PHY_20(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS) \ |
73 | || (_phy == WLAN_RC_PHY_HT_20_DS) \ | 96 | || (_phy == WLAN_RC_PHY_HT_20_DS) \ |
97 | || (_phy == WLAN_RC_PHY_HT_20_TS) \ | ||
74 | || (_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ | 98 | || (_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ |
75 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI)) | 99 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
100 | || (_phy == WLAN_RC_PHY_HT_20_TS_HGI)) | ||
76 | #define WLAN_RC_PHY_40(_phy) ((_phy == WLAN_RC_PHY_HT_40_SS) \ | 101 | #define WLAN_RC_PHY_40(_phy) ((_phy == WLAN_RC_PHY_HT_40_SS) \ |
77 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ | 102 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ |
103 | || (_phy == WLAN_RC_PHY_HT_40_TS) \ | ||
78 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ | 104 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ |
79 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) | 105 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI) \ |
106 | || (_phy == WLAN_RC_PHY_HT_40_TS_HGI)) | ||
80 | #define WLAN_RC_PHY_SGI(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ | 107 | #define WLAN_RC_PHY_SGI(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ |
81 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ | 108 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
109 | || (_phy == WLAN_RC_PHY_HT_20_TS_HGI) \ | ||
82 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ | 110 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ |
83 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) | 111 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI) \ |
112 | || (_phy == WLAN_RC_PHY_HT_40_TS_HGI)) | ||
84 | 113 | ||
85 | #define WLAN_RC_PHY_HT(_phy) (_phy >= WLAN_RC_PHY_HT_20_SS) | 114 | #define WLAN_RC_PHY_HT(_phy) (_phy >= WLAN_RC_PHY_HT_20_SS) |
86 | 115 | ||
87 | #define WLAN_RC_CAP_MODE(capflag) (((capflag & WLAN_RC_HT_FLAG) ? \ | 116 | #define WLAN_RC_CAP_MODE(capflag) (((capflag & WLAN_RC_HT_FLAG) ? \ |
88 | ((capflag & WLAN_RC_40_FLAG) ? RC_HT_40 : RC_HT_20) : RC_LEGACY)) | 117 | ((capflag & WLAN_RC_40_FLAG) ? RC_HT_40 : RC_HT_20) : RC_LEGACY)) |
89 | 118 | ||
90 | #define WLAN_RC_CAP_STREAM(capflag) \ | 119 | #define WLAN_RC_CAP_STREAM(capflag) (((capflag & WLAN_RC_TS_FLAG) ? \ |
91 | (((capflag) & WLAN_RC_DS_FLAG) ? RC_DS : RC_SS) | 120 | (RC_TS) : ((capflag & WLAN_RC_DS_FLAG) ? RC_DS : RC_SS))) |
92 | |||
93 | 121 | ||
94 | /* Return TRUE if flag supports HT20 && client supports HT20 or | 122 | /* Return TRUE if flag supports HT20 && client supports HT20 or |
95 | * return TRUE if flag supports HT40 && client supports HT40. | 123 | * return TRUE if flag supports HT40 && client supports HT40. |
@@ -100,9 +128,10 @@ enum { | |||
100 | ((flag & RC_HT_40) && (capflag & WLAN_RC_40_FLAG))) | 128 | ((flag & RC_HT_40) && (capflag & WLAN_RC_40_FLAG))) |
101 | 129 | ||
102 | #define WLAN_RC_DS_FLAG (0x01) | 130 | #define WLAN_RC_DS_FLAG (0x01) |
103 | #define WLAN_RC_40_FLAG (0x02) | 131 | #define WLAN_RC_TS_FLAG (0x02) |
104 | #define WLAN_RC_SGI_FLAG (0x04) | 132 | #define WLAN_RC_40_FLAG (0x04) |
105 | #define WLAN_RC_HT_FLAG (0x08) | 133 | #define WLAN_RC_SGI_FLAG (0x08) |
134 | #define WLAN_RC_HT_FLAG (0x10) | ||
106 | 135 | ||
107 | /** | 136 | /** |
108 | * struct ath_rate_table - Rate Control table | 137 | * struct ath_rate_table - Rate Control table |