mac80211: update to wireless-testing 2010-04-21
[openwrt.git] / package / mac80211 / patches / 550-ath9k_pending_work.patch
1 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
3 @@ -852,7 +852,8 @@ static int ar5008_hw_process_ini(struct
4
5 REG_WRITE_ARRAY(&ah->iniBB_RfGain, freqIndex, regWrites);
6
7 - if (AR_SREV_9280_20(ah) && IS_CHAN_A_5MHZ_SPACED(chan)) {
8 + if (AR_SREV_9280_20(ah) &&
9 + (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK)) {
10 REG_WRITE_ARRAY(&ah->iniModesAdditional, modesIndex,
11 regWrites);
12 }
13 @@ -895,7 +896,7 @@ static void ar5008_hw_set_rfmode(struct
14 AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ;
15
16 if ((AR_SREV_9280_20(ah) || AR_SREV_9300_20_OR_LATER(ah))
17 - && IS_CHAN_A_5MHZ_SPACED(chan))
18 + && (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK))
19 rfMode |= (AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE);
20
21 REG_WRITE(ah, AR_PHY_MODE, rfMode);
22 --- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
23 +++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
24 @@ -755,7 +755,8 @@ static bool ar9003_hw_init_cal(struct at
25 }
26
27 /* Do Tx IQ Calibration */
28 - ar9003_hw_tx_iq_cal(ah);
29 + if (ah->config.tx_iq_calibration)
30 + ar9003_hw_tx_iq_cal(ah);
31
32 /* Revert chainmasks to their original values before NF cal */
33 ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
34 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
35 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
36 @@ -265,7 +265,7 @@ struct cal_ctl_edge_pwr {
37 } __packed;
38
39 struct cal_ctl_data_2g {
40 - struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_5G];
41 + struct cal_ctl_edge_pwr ctlEdges[AR9300_NUM_BAND_EDGES_2G];
42 } __packed;
43
44 struct cal_ctl_data_5g {
45 --- a/drivers/net/wireless/ath/ath9k/ar9003_initvals.h
46 +++ b/drivers/net/wireless/ath/ath9k/ar9003_initvals.h
47 @@ -31,7 +31,7 @@ static const u32 ar9300_2p0_radio_postam
48
49 static const u32 ar9300Modes_lowest_ob_db_tx_gain_table_2p0[][5] = {
50 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
51 - {0x0000a410, 0x000050da, 0x000050da, 0x000050da, 0x000050da},
52 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
53 {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
54 {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
55 {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
56 @@ -545,7 +545,7 @@ static const u32 ar9300_2p0_soc_postambl
57 };
58
59 static const u32 ar9200_merlin_2p0_radio_core[][2] = {
60 - /* Addr common */
61 + /* Addr allmodes */
62 {0x00007800, 0x00040000},
63 {0x00007804, 0xdb005012},
64 {0x00007808, 0x04924914},
65 @@ -835,71 +835,71 @@ static const u32 ar9300_2p0_baseband_cor
66
67 static const u32 ar9300Modes_high_power_tx_gain_table_2p0[][5] = {
68 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
69 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050da, 0x000050da},
70 + {0x0000a410, 0x000050db, 0x000050db, 0x000050d9, 0x000050d9},
71 {0x0000a500, 0x00020220, 0x00020220, 0x00000000, 0x00000000},
72 {0x0000a504, 0x06020223, 0x06020223, 0x04000002, 0x04000002},
73 - {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004},
74 - {0x0000a50c, 0x10022223, 0x10022223, 0x0b000200, 0x0b000200},
75 - {0x0000a510, 0x17022620, 0x17022620, 0x0f000202, 0x0f000202},
76 - {0x0000a514, 0x1b022622, 0x1b022622, 0x11000400, 0x11000400},
77 - {0x0000a518, 0x1f022822, 0x1f022822, 0x15000402, 0x15000402},
78 - {0x0000a51c, 0x24022842, 0x24022842, 0x19000404, 0x19000404},
79 - {0x0000a520, 0x28042840, 0x28042840, 0x1b000603, 0x1b000603},
80 - {0x0000a524, 0x2c042842, 0x2c042842, 0x1f000a02, 0x1f000a02},
81 - {0x0000a528, 0x30042844, 0x30042844, 0x23000a04, 0x23000a04},
82 - {0x0000a52c, 0x34042846, 0x34042846, 0x26000a20, 0x26000a20},
83 - {0x0000a530, 0x39042869, 0x39042869, 0x2a000e20, 0x2a000e20},
84 - {0x0000a534, 0x3d062869, 0x3d062869, 0x2e000e22, 0x2e000e22},
85 - {0x0000a538, 0x44062c69, 0x44062c69, 0x31000e24, 0x31000e24},
86 - {0x0000a53c, 0x48063069, 0x48063069, 0x34001640, 0x34001640},
87 - {0x0000a540, 0x4c0a3065, 0x4c0a3065, 0x38001660, 0x38001660},
88 - {0x0000a544, 0x500a3069, 0x500a3069, 0x3b001861, 0x3b001861},
89 - {0x0000a548, 0x530a3469, 0x530a3469, 0x3e001a81, 0x3e001a81},
90 - {0x0000a54c, 0x590a7464, 0x590a7464, 0x42001a83, 0x42001a83},
91 - {0x0000a550, 0x5e0a7865, 0x5e0a7865, 0x44001c84, 0x44001c84},
92 - {0x0000a554, 0x630a7e66, 0x630a7e66, 0x48001ce3, 0x48001ce3},
93 - {0x0000a558, 0x680a7e89, 0x680a7e89, 0x4c001ce5, 0x4c001ce5},
94 - {0x0000a55c, 0x6e0a7e8c, 0x6e0a7e8c, 0x50001ce9, 0x50001ce9},
95 - {0x0000a560, 0x730e7e8c, 0x730e7e8c, 0x54001ceb, 0x54001ceb},
96 - {0x0000a564, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
97 - {0x0000a568, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
98 - {0x0000a56c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
99 - {0x0000a570, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
100 - {0x0000a574, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
101 - {0x0000a578, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
102 - {0x0000a57c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
103 + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
104 + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
105 + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
106 + {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
107 + {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
108 + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
109 + {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
110 + {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
111 + {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
112 + {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
113 + {0x0000a530, 0x34043643, 0x34043643, 0x2a000e20, 0x2a000e20},
114 + {0x0000a534, 0x38043a44, 0x38043a44, 0x2e000e22, 0x2e000e22},
115 + {0x0000a538, 0x3b043e45, 0x3b043e45, 0x31000e24, 0x31000e24},
116 + {0x0000a53c, 0x40063e46, 0x40063e46, 0x34001640, 0x34001640},
117 + {0x0000a540, 0x44083e46, 0x44083e46, 0x38001660, 0x38001660},
118 + {0x0000a544, 0x46083e66, 0x46083e66, 0x3b001861, 0x3b001861},
119 + {0x0000a548, 0x4b0a3e69, 0x4b0a3e69, 0x3e001a81, 0x3e001a81},
120 + {0x0000a54c, 0x4f0a5e66, 0x4f0a5e66, 0x42001a83, 0x42001a83},
121 + {0x0000a550, 0x540a7e66, 0x540a7e66, 0x44001c84, 0x44001c84},
122 + {0x0000a554, 0x570a7e89, 0x570a7e89, 0x48001ce3, 0x48001ce3},
123 + {0x0000a558, 0x5c0e7e8a, 0x5c0e7e8a, 0x4c001ce5, 0x4c001ce5},
124 + {0x0000a55c, 0x60127e8b, 0x60127e8b, 0x50001ce9, 0x50001ce9},
125 + {0x0000a560, 0x65127ecc, 0x65127ecc, 0x54001ceb, 0x54001ceb},
126 + {0x0000a564, 0x6b169ecd, 0x6b169ecd, 0x56001eec, 0x56001eec},
127 + {0x0000a568, 0x70169f0e, 0x70169f0e, 0x56001eec, 0x56001eec},
128 + {0x0000a56c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
129 + {0x0000a570, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
130 + {0x0000a574, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
131 + {0x0000a578, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
132 + {0x0000a57c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
133 {0x0000a580, 0x00820220, 0x00820220, 0x00800000, 0x00800000},
134 {0x0000a584, 0x06820223, 0x06820223, 0x04800002, 0x04800002},
135 - {0x0000a588, 0x0b822220, 0x0b822220, 0x08800004, 0x08800004},
136 - {0x0000a58c, 0x10822223, 0x10822223, 0x0b800200, 0x0b800200},
137 - {0x0000a590, 0x17822620, 0x17822620, 0x0f800202, 0x0f800202},
138 - {0x0000a594, 0x1b822622, 0x1b822622, 0x11800400, 0x11800400},
139 - {0x0000a598, 0x1f822822, 0x1f822822, 0x15800402, 0x15800402},
140 - {0x0000a59c, 0x24822842, 0x24822842, 0x19800404, 0x19800404},
141 - {0x0000a5a0, 0x28842840, 0x28842840, 0x1b800603, 0x1b800603},
142 - {0x0000a5a4, 0x2c842842, 0x2c842842, 0x1f800a02, 0x1f800a02},
143 - {0x0000a5a8, 0x30842844, 0x30842844, 0x23800a04, 0x23800a04},
144 - {0x0000a5ac, 0x34842846, 0x34842846, 0x26800a20, 0x26800a20},
145 - {0x0000a5b0, 0x39842869, 0x39842869, 0x2a800e20, 0x2a800e20},
146 - {0x0000a5b4, 0x3d862869, 0x3d862869, 0x2e800e22, 0x2e800e22},
147 - {0x0000a5b8, 0x44862c69, 0x44862c69, 0x31800e24, 0x31800e24},
148 - {0x0000a5bc, 0x48863069, 0x48863069, 0x34801640, 0x34801640},
149 - {0x0000a5c0, 0x4c8a3065, 0x4c8a3065, 0x38801660, 0x38801660},
150 - {0x0000a5c4, 0x508a3069, 0x508a3069, 0x3b801861, 0x3b801861},
151 - {0x0000a5c8, 0x538a3469, 0x538a3469, 0x3e801a81, 0x3e801a81},
152 - {0x0000a5cc, 0x598a7464, 0x598a7464, 0x42801a83, 0x42801a83},
153 - {0x0000a5d0, 0x5e8a7865, 0x5e8a7865, 0x44801c84, 0x44801c84},
154 - {0x0000a5d4, 0x638a7e66, 0x638a7e66, 0x48801ce3, 0x48801ce3},
155 - {0x0000a5d8, 0x688a7e89, 0x688a7e89, 0x4c801ce5, 0x4c801ce5},
156 - {0x0000a5dc, 0x6e8a7e8c, 0x6e8a7e8c, 0x50801ce9, 0x50801ce9},
157 - {0x0000a5e0, 0x738e7e8c, 0x738e7e8c, 0x54801ceb, 0x54801ceb},
158 - {0x0000a5e4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
159 - {0x0000a5e8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
160 - {0x0000a5ec, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
161 - {0x0000a5f0, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
162 - {0x0000a5f4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
163 - {0x0000a5f8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
164 - {0x0000a5fc, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
165 + {0x0000a588, 0x0a822220, 0x0a822220, 0x08800004, 0x08800004},
166 + {0x0000a58c, 0x0f822223, 0x0f822223, 0x0b800200, 0x0b800200},
167 + {0x0000a590, 0x14822620, 0x14822620, 0x0f800202, 0x0f800202},
168 + {0x0000a594, 0x18822622, 0x18822622, 0x11800400, 0x11800400},
169 + {0x0000a598, 0x1b822822, 0x1b822822, 0x15800402, 0x15800402},
170 + {0x0000a59c, 0x20822842, 0x20822842, 0x19800404, 0x19800404},
171 + {0x0000a5a0, 0x22822c41, 0x22822c41, 0x1b800603, 0x1b800603},
172 + {0x0000a5a4, 0x28823042, 0x28823042, 0x1f800a02, 0x1f800a02},
173 + {0x0000a5a8, 0x2c823044, 0x2c823044, 0x23800a04, 0x23800a04},
174 + {0x0000a5ac, 0x2f823644, 0x2f823644, 0x26800a20, 0x26800a20},
175 + {0x0000a5b0, 0x34843643, 0x34843643, 0x2a800e20, 0x2a800e20},
176 + {0x0000a5b4, 0x38843a44, 0x38843a44, 0x2e800e22, 0x2e800e22},
177 + {0x0000a5b8, 0x3b843e45, 0x3b843e45, 0x31800e24, 0x31800e24},
178 + {0x0000a5bc, 0x40863e46, 0x40863e46, 0x34801640, 0x34801640},
179 + {0x0000a5c0, 0x4c8a3065, 0x44883e46, 0x44883e46, 0x38801660},
180 + {0x0000a5c4, 0x46883e66, 0x46883e66, 0x3b801861, 0x3b801861},
181 + {0x0000a5c8, 0x4b8a3e69, 0x4b8a3e69, 0x3e801a81, 0x3e801a81},
182 + {0x0000a5cc, 0x4f8a5e66, 0x4f8a5e66, 0x42801a83, 0x42801a83},
183 + {0x0000a5d0, 0x548a7e66, 0x548a7e66, 0x44801c84, 0x44801c84},
184 + {0x0000a5d4, 0x578a7e89, 0x578a7e89, 0x48801ce3, 0x48801ce3},
185 + {0x0000a5d8, 0x5c8e7e8a, 0x5c8e7e8a, 0x4c801ce5, 0x4c801ce5},
186 + {0x0000a5dc, 0x60927e8b, 0x60927e8b, 0x50801ce9, 0x50801ce9},
187 + {0x0000a5e0, 0x65927ecc, 0x65927ecc, 0x54801ceb, 0x54801ceb},
188 + {0x0000a5e4, 0x6b969ecd, 0x6b969ecd, 0x56801eec, 0x56801eec},
189 + {0x0000a5e8, 0x70969f0e, 0x70969f0e, 0x56801eec, 0x56801eec},
190 + {0x0000a5ec, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
191 + {0x0000a5f0, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
192 + {0x0000a5f4, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
193 + {0x0000a5f8, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
194 + {0x0000a5fc, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
195 {0x00016044, 0x056db2e6, 0x056db2e6, 0x056db2e6, 0x056db2e6},
196 {0x00016048, 0xad241a61, 0xad241a61, 0xad241a61, 0xad241a61},
197 {0x00016068, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c, 0x6eb6db6c},
198 @@ -913,71 +913,71 @@ static const u32 ar9300Modes_high_power_
199
200 static const u32 ar9300Modes_high_ob_db_tx_gain_table_2p0[][5] = {
201 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
202 - {0x0000a410, 0x000050d9, 0x000050d9, 0x000050da, 0x000050da},
203 + {0x0000a410, 0x000050db, 0x000050db, 0x000050d9, 0x000050d9},
204 {0x0000a500, 0x00020220, 0x00020220, 0x00000000, 0x00000000},
205 {0x0000a504, 0x06020223, 0x06020223, 0x04000002, 0x04000002},
206 - {0x0000a508, 0x0b022220, 0x0b022220, 0x08000004, 0x08000004},
207 - {0x0000a50c, 0x10022223, 0x10022223, 0x0b000200, 0x0b000200},
208 - {0x0000a510, 0x17022620, 0x17022620, 0x0f000202, 0x0f000202},
209 - {0x0000a514, 0x1b022622, 0x1b022622, 0x11000400, 0x11000400},
210 - {0x0000a518, 0x1f022822, 0x1f022822, 0x15000402, 0x15000402},
211 - {0x0000a51c, 0x24022842, 0x24022842, 0x19000404, 0x19000404},
212 - {0x0000a520, 0x28042840, 0x28042840, 0x1b000603, 0x1b000603},
213 - {0x0000a524, 0x2c042842, 0x2c042842, 0x1f000a02, 0x1f000a02},
214 - {0x0000a528, 0x30042844, 0x30042844, 0x23000a04, 0x23000a04},
215 - {0x0000a52c, 0x34042846, 0x34042846, 0x26000a20, 0x26000a20},
216 - {0x0000a530, 0x39042869, 0x39042869, 0x2a000e20, 0x2a000e20},
217 - {0x0000a534, 0x3d062869, 0x3d062869, 0x2e000e22, 0x2e000e22},
218 - {0x0000a538, 0x44062c69, 0x44062c69, 0x31000e24, 0x31000e24},
219 - {0x0000a53c, 0x48063069, 0x48063069, 0x34001640, 0x34001640},
220 - {0x0000a540, 0x4c0a3065, 0x4c0a3065, 0x38001660, 0x38001660},
221 - {0x0000a544, 0x500a3069, 0x500a3069, 0x3b001861, 0x3b001861},
222 - {0x0000a548, 0x530a3469, 0x530a3469, 0x3e001a81, 0x3e001a81},
223 - {0x0000a54c, 0x590a7464, 0x590a7464, 0x42001a83, 0x42001a83},
224 - {0x0000a550, 0x5e0a7865, 0x5e0a7865, 0x44001c84, 0x44001c84},
225 - {0x0000a554, 0x630a7e66, 0x630a7e66, 0x48001ce3, 0x48001ce3},
226 - {0x0000a558, 0x680a7e89, 0x680a7e89, 0x4c001ce5, 0x4c001ce5},
227 - {0x0000a55c, 0x6e0a7e8c, 0x6e0a7e8c, 0x50001ce9, 0x50001ce9},
228 - {0x0000a560, 0x730e7e8c, 0x730e7e8c, 0x54001ceb, 0x54001ceb},
229 - {0x0000a564, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
230 - {0x0000a568, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
231 - {0x0000a56c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
232 - {0x0000a570, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
233 - {0x0000a574, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
234 - {0x0000a578, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
235 - {0x0000a57c, 0x730e7e8c, 0x730e7e8c, 0x56001eec, 0x56001eec},
236 + {0x0000a508, 0x0a022220, 0x0a022220, 0x08000004, 0x08000004},
237 + {0x0000a50c, 0x0f022223, 0x0f022223, 0x0b000200, 0x0b000200},
238 + {0x0000a510, 0x14022620, 0x14022620, 0x0f000202, 0x0f000202},
239 + {0x0000a514, 0x18022622, 0x18022622, 0x11000400, 0x11000400},
240 + {0x0000a518, 0x1b022822, 0x1b022822, 0x15000402, 0x15000402},
241 + {0x0000a51c, 0x20022842, 0x20022842, 0x19000404, 0x19000404},
242 + {0x0000a520, 0x22022c41, 0x22022c41, 0x1b000603, 0x1b000603},
243 + {0x0000a524, 0x28023042, 0x28023042, 0x1f000a02, 0x1f000a02},
244 + {0x0000a528, 0x2c023044, 0x2c023044, 0x23000a04, 0x23000a04},
245 + {0x0000a52c, 0x2f023644, 0x2f023644, 0x26000a20, 0x26000a20},
246 + {0x0000a530, 0x34043643, 0x34043643, 0x2a000e20, 0x2a000e20},
247 + {0x0000a534, 0x38043a44, 0x38043a44, 0x2e000e22, 0x2e000e22},
248 + {0x0000a538, 0x3b043e45, 0x3b043e45, 0x31000e24, 0x31000e24},
249 + {0x0000a53c, 0x40063e46, 0x40063e46, 0x34001640, 0x34001640},
250 + {0x0000a540, 0x44083e46, 0x44083e46, 0x38001660, 0x38001660},
251 + {0x0000a544, 0x46083e66, 0x46083e66, 0x3b001861, 0x3b001861},
252 + {0x0000a548, 0x4b0a3e69, 0x4b0a3e69, 0x3e001a81, 0x3e001a81},
253 + {0x0000a54c, 0x4f0a5e66, 0x4f0a5e66, 0x42001a83, 0x42001a83},
254 + {0x0000a550, 0x540a7e66, 0x540a7e66, 0x44001c84, 0x44001c84},
255 + {0x0000a554, 0x570a7e89, 0x570a7e89, 0x48001ce3, 0x48001ce3},
256 + {0x0000a558, 0x5c0e7e8a, 0x5c0e7e8a, 0x4c001ce5, 0x4c001ce5},
257 + {0x0000a55c, 0x60127e8b, 0x60127e8b, 0x50001ce9, 0x50001ce9},
258 + {0x0000a560, 0x65127ecc, 0x65127ecc, 0x54001ceb, 0x54001ceb},
259 + {0x0000a564, 0x6b169ecd, 0x6b169ecd, 0x56001eec, 0x56001eec},
260 + {0x0000a568, 0x70169f0e, 0x70169f0e, 0x56001eec, 0x56001eec},
261 + {0x0000a56c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
262 + {0x0000a570, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
263 + {0x0000a574, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
264 + {0x0000a578, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
265 + {0x0000a57c, 0x75169f4f, 0x75169f4f, 0x56001eec, 0x56001eec},
266 {0x0000a580, 0x00820220, 0x00820220, 0x00800000, 0x00800000},
267 {0x0000a584, 0x06820223, 0x06820223, 0x04800002, 0x04800002},
268 - {0x0000a588, 0x0b822220, 0x0b822220, 0x08800004, 0x08800004},
269 - {0x0000a58c, 0x10822223, 0x10822223, 0x0b800200, 0x0b800200},
270 - {0x0000a590, 0x17822620, 0x17822620, 0x0f800202, 0x0f800202},
271 - {0x0000a594, 0x1b822622, 0x1b822622, 0x11800400, 0x11800400},
272 - {0x0000a598, 0x1f822822, 0x1f822822, 0x15800402, 0x15800402},
273 - {0x0000a59c, 0x24822842, 0x24822842, 0x19800404, 0x19800404},
274 - {0x0000a5a0, 0x28842840, 0x28842840, 0x1b800603, 0x1b800603},
275 - {0x0000a5a4, 0x2c842842, 0x2c842842, 0x1f800a02, 0x1f800a02},
276 - {0x0000a5a8, 0x30842844, 0x30842844, 0x23800a04, 0x23800a04},
277 - {0x0000a5ac, 0x34842846, 0x34842846, 0x26800a20, 0x26800a20},
278 - {0x0000a5b0, 0x39842869, 0x39842869, 0x2a800e20, 0x2a800e20},
279 - {0x0000a5b4, 0x3d862869, 0x3d862869, 0x2e800e22, 0x2e800e22},
280 - {0x0000a5b8, 0x44862c69, 0x44862c69, 0x31800e24, 0x31800e24},
281 - {0x0000a5bc, 0x48863069, 0x48863069, 0x34801640, 0x34801640},
282 - {0x0000a5c0, 0x4c8a3065, 0x4c8a3065, 0x38801660, 0x38801660},
283 - {0x0000a5c4, 0x508a3069, 0x508a3069, 0x3b801861, 0x3b801861},
284 - {0x0000a5c8, 0x538a3469, 0x538a3469, 0x3e801a81, 0x3e801a81},
285 - {0x0000a5cc, 0x598a7464, 0x598a7464, 0x42801a83, 0x42801a83},
286 - {0x0000a5d0, 0x5e8a7865, 0x5e8a7865, 0x44801c84, 0x44801c84},
287 - {0x0000a5d4, 0x638a7e66, 0x638a7e66, 0x48801ce3, 0x48801ce3},
288 - {0x0000a5d8, 0x688a7e89, 0x688a7e89, 0x4c801ce5, 0x4c801ce5},
289 - {0x0000a5dc, 0x6e8a7e8c, 0x6e8a7e8c, 0x50801ce9, 0x50801ce9},
290 - {0x0000a5e0, 0x738e7e8c, 0x738e7e8c, 0x54801ceb, 0x54801ceb},
291 - {0x0000a5e4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
292 - {0x0000a5e8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
293 - {0x0000a5ec, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
294 - {0x0000a5f0, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
295 - {0x0000a5f4, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
296 - {0x0000a5f8, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
297 - {0x0000a5fc, 0x738e7e8c, 0x738e7e8c, 0x56801eec, 0x56801eec},
298 + {0x0000a588, 0x0a822220, 0x0a822220, 0x08800004, 0x08800004},
299 + {0x0000a58c, 0x0f822223, 0x0f822223, 0x0b800200, 0x0b800200},
300 + {0x0000a590, 0x14822620, 0x14822620, 0x0f800202, 0x0f800202},
301 + {0x0000a594, 0x18822622, 0x18822622, 0x11800400, 0x11800400},
302 + {0x0000a598, 0x1b822822, 0x1b822822, 0x15800402, 0x15800402},
303 + {0x0000a59c, 0x20822842, 0x20822842, 0x19800404, 0x19800404},
304 + {0x0000a5a0, 0x22822c41, 0x22822c41, 0x1b800603, 0x1b800603},
305 + {0x0000a5a4, 0x28823042, 0x28823042, 0x1f800a02, 0x1f800a02},
306 + {0x0000a5a8, 0x2c823044, 0x2c823044, 0x23800a04, 0x23800a04},
307 + {0x0000a5ac, 0x2f823644, 0x2f823644, 0x26800a20, 0x26800a20},
308 + {0x0000a5b0, 0x34843643, 0x34843643, 0x2a800e20, 0x2a800e20},
309 + {0x0000a5b4, 0x38843a44, 0x38843a44, 0x2e800e22, 0x2e800e22},
310 + {0x0000a5b8, 0x3b843e45, 0x3b843e45, 0x31800e24, 0x31800e24},
311 + {0x0000a5bc, 0x40863e46, 0x40863e46, 0x34801640, 0x34801640},
312 + {0x0000a5c0, 0x44883e46, 0x44883e46, 0x38801660, 0x38801660},
313 + {0x0000a5c4, 0x46883e66, 0x46883e66, 0x3b801861, 0x3b801861},
314 + {0x0000a5c8, 0x4b8a3e69, 0x4b8a3e69, 0x3e801a81, 0x3e801a81},
315 + {0x0000a5cc, 0x4f8a5e66, 0x4f8a5e66, 0x42801a83, 0x42801a83},
316 + {0x0000a5d0, 0x548a7e66, 0x548a7e66, 0x44801c84, 0x44801c84},
317 + {0x0000a5d4, 0x578a7e89, 0x578a7e89, 0x48801ce3, 0x48801ce3},
318 + {0x0000a5d8, 0x5c8e7e8a, 0x5c8e7e8a, 0x4c801ce5, 0x4c801ce5},
319 + {0x0000a5dc, 0x60927e8b, 0x60927e8b, 0x50801ce9, 0x50801ce9},
320 + {0x0000a5e0, 0x65927ecc, 0x65927ecc, 0x54801ceb, 0x54801ceb},
321 + {0x0000a5e4, 0x6b969ecd, 0x6b969ecd, 0x56801eec, 0x56801eec},
322 + {0x0000a5e8, 0x70969f0e, 0x70969f0e, 0x56801eec, 0x56801eec},
323 + {0x0000a5ec, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
324 + {0x0000a5f0, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
325 + {0x0000a5f4, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
326 + {0x0000a5f8, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
327 + {0x0000a5fc, 0x75969f4f, 0x75969f4f, 0x56801eec, 0x56801eec},
328 {0x00016044, 0x056db2e4, 0x056db2e4, 0x056db2e4, 0x056db2e4},
329 {0x00016048, 0x8c001a61, 0x8c001a61, 0x8c001a61, 0x8c001a61},
330 {0x00016068, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c, 0x6db6db6c},
331 @@ -1251,7 +1251,7 @@ static const u32 ar9300Common_rx_gain_ta
332
333 static const u32 ar9300Modes_low_ob_db_tx_gain_table_2p0[][5] = {
334 /* Addr 5G_HT20 5G_HT40 2G_HT40 2G_HT20 */
335 - {0x0000a410, 0x000050da, 0x000050da, 0x000050da, 0x000050da},
336 + {0x0000a410, 0x000050d9, 0x000050d9, 0x000050d9, 0x000050d9},
337 {0x0000a500, 0x00000000, 0x00000000, 0x00000000, 0x00000000},
338 {0x0000a504, 0x06000003, 0x06000003, 0x04000002, 0x04000002},
339 {0x0000a508, 0x0a000020, 0x0a000020, 0x08000004, 0x08000004},
340 @@ -1760,31 +1760,22 @@ static const u32 ar9300_2p0_soc_preamble
341 {0x00007038, 0x000004c2},
342 };
343
344 -/*
345 - * PCIE-PHY programming array, to be used prior to entering
346 - * full sleep (holding RTC in reset, PLL is ON in L1 mode)
347 - */
348 static const u32 ar9300PciePhy_pll_on_clkreq_disable_L1_2p0[][2] = {
349 + /* Addr allmodes */
350 {0x00004040, 0x08212e5e},
351 {0x00004040, 0x0008003b},
352 {0x00004044, 0x00000000},
353 };
354
355 -/*
356 - * PCIE-PHY programming array, to be used when not in
357 - * full sleep (holding RTC in reset)
358 - */
359 static const u32 ar9300PciePhy_clkreq_enable_L1_2p0[][2] = {
360 + /* Addr allmodes */
361 {0x00004040, 0x08253e5e},
362 {0x00004040, 0x0008003b},
363 {0x00004044, 0x00000000},
364 };
365
366 -/*
367 - * PCIE-PHY programming array, to be used prior to entering
368 - * full sleep (holding RTC in reset)
369 - */
370 static const u32 ar9300PciePhy_clkreq_disable_L1_2p0[][2] = {
371 + /* Addr allmodes */
372 {0x00004040, 0x08213e5e},
373 {0x00004040, 0x0008003b},
374 {0x00004044, 0x00000000},
375 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
376 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
377 @@ -375,16 +375,7 @@ static u32 ar9003_hw_compute_pll_control
378 else if (chan && IS_CHAN_QUARTER_RATE(chan))
379 pll |= SM(0x2, AR_RTC_9300_PLL_CLKSEL);
380
381 - if (chan && IS_CHAN_5GHZ(chan)) {
382 - pll |= SM(0x28, AR_RTC_9300_PLL_DIV);
383 -
384 - /*
385 - * When doing fast clock, set PLL to 0x142c
386 - */
387 - if (IS_CHAN_A_5MHZ_SPACED(chan))
388 - pll = 0x142c;
389 - } else
390 - pll |= SM(0x2c, AR_RTC_9300_PLL_DIV);
391 + pll |= SM(0x2c, AR_RTC_9300_PLL_DIV);
392
393 return pll;
394 }
395 @@ -592,7 +583,7 @@ static int ar9003_hw_process_ini(struct
396 * For 5GHz channels requiring Fast Clock, apply
397 * different modal values.
398 */
399 - if (IS_CHAN_A_5MHZ_SPACED(chan))
400 + if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK)
401 REG_WRITE_ARRAY(&ah->iniModesAdditional,
402 modesIndex, regWrites);
403
404 @@ -622,7 +613,7 @@ static void ar9003_hw_set_rfmode(struct
405 rfMode |= (IS_CHAN_B(chan) || IS_CHAN_G(chan))
406 ? AR_PHY_MODE_DYNAMIC : AR_PHY_MODE_OFDM;
407
408 - if (IS_CHAN_A_5MHZ_SPACED(chan))
409 + if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK)
410 rfMode |= (AR_PHY_MODE_DYNAMIC | AR_PHY_MODE_DYN_CCK_DISABLE);
411
412 REG_WRITE(ah, AR_PHY_MODE, rfMode);
413 --- a/drivers/net/wireless/ath/ath9k/hw.c
414 +++ b/drivers/net/wireless/ath/ath9k/hw.c
415 @@ -29,6 +29,7 @@
416 #define ATH9K_CLOCK_RATE_CCK 22
417 #define ATH9K_CLOCK_RATE_5GHZ_OFDM 40
418 #define ATH9K_CLOCK_RATE_2GHZ_OFDM 44
419 +#define ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM 44
420
421 static bool ath9k_hw_set_reset_reg(struct ath_hw *ah, u32 type);
422
423 @@ -94,7 +95,11 @@ static u32 ath9k_hw_mac_clks(struct ath_
424 return usecs *ATH9K_CLOCK_RATE_CCK;
425 if (conf->channel->band == IEEE80211_BAND_2GHZ)
426 return usecs *ATH9K_CLOCK_RATE_2GHZ_OFDM;
427 - return usecs *ATH9K_CLOCK_RATE_5GHZ_OFDM;
428 +
429 + if (ah->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK)
430 + return usecs * ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM;
431 + else
432 + return usecs * ATH9K_CLOCK_RATE_5GHZ_OFDM;
433 }
434
435 static u32 ath9k_hw_mac_to_clks(struct ath_hw *ah, u32 usecs)
436 @@ -390,6 +395,12 @@ static void ath9k_hw_init_config(struct
437 ah->config.rx_intr_mitigation = true;
438
439 /*
440 + * Tx IQ Calibration (ah->config.tx_iq_calibration) is only
441 + * used by AR9003 but it is busted right now, it will take a
442 + * while to fix so this is currently disabled.
443 + */
444 +
445 + /*
446 * We need this for PCI devices only (Cardbus, PCI, miniPCI)
447 * _and_ if on non-uniprocessor systems (Multiprocessor/HT).
448 * This means we use it for all AR5416 devices, and the few
449 @@ -2198,7 +2209,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw
450 }
451
452 if (AR_SREV_9300_20_OR_LATER(ah)) {
453 - pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_LDPC;
454 + pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_LDPC |
455 + ATH9K_HW_CAP_FASTCLOCK;
456 pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH;
457 pCap->rx_lp_qdepth = ATH9K_HW_RX_LP_QDEPTH;
458 pCap->rx_status_len = sizeof(struct ar9003_rxs);
459 --- a/drivers/net/wireless/ath/ath9k/hw.h
460 +++ b/drivers/net/wireless/ath/ath9k/hw.h
461 @@ -198,6 +198,7 @@ enum ath9k_hw_caps {
462 ATH9K_HW_CAP_EDMA = BIT(17),
463 ATH9K_HW_CAP_RAC_SUPPORTED = BIT(18),
464 ATH9K_HW_CAP_LDPC = BIT(19),
465 + ATH9K_HW_CAP_FASTCLOCK = BIT(20),
466 };
467
468 enum ath9k_capability_type {
469 @@ -261,6 +262,7 @@ struct ath9k_ops_config {
470 #define AR_BASE_FREQ_5GHZ 4900
471 #define AR_SPUR_FEEQ_BOUND_HT40 19
472 #define AR_SPUR_FEEQ_BOUND_HT20 10
473 + bool tx_iq_calibration; /* Only available for >= AR9003 */
474 int spurmode;
475 u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
476 u8 max_txtrig_level;
This page took 0.06998 seconds and 5 git commands to generate.