2 * Copyright (c) 2008-2011 Atheros Communications Inc.
4 * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
5 * Original from Linux kernel 3.0.1
7 * Permission to use, copy, modify, and/or distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above
9 * copyright notice and this permission notice appear in all copies.
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 * DOC: Programming Atheros 802.11n analog front end radios
23 * AR5416 MAC based PCI devices and AR518 MAC based PCI-Express
24 * devices have either an external AR2133 analog front end radio for single
25 * band 2.4 GHz communication or an AR5133 analog front end radio for dual
26 * band 2.4 GHz / 5 GHz communication.
28 * All devices after the AR5416 and AR5418 family starting with the AR9280
29 * have their analog front radios, MAC/BB and host PCIe/USB interface embedded
30 * into a single-chip and require less programming.
32 * The following single-chips exist with a respective embedded radio:
34 * AR9280 - 11n dual-band 2x2 MIMO for PCIe
35 * AR9281 - 11n single-band 1x2 MIMO for PCIe
36 * AR9285 - 11n single-band 1x1 for PCIe
37 * AR9287 - 11n single-band 2x2 MIMO for PCIe
39 * AR9220 - 11n dual-band 2x2 MIMO for PCI
40 * AR9223 - 11n single-band 2x2 MIMO for PCI
42 * AR9287 - 11n single-band 1x1 MIMO for USB
48 #include "ar9002_phy.h"
51 * ar9002_hw_set_channel - set channel on single-chip device
52 * @ah: atheros hardware structure
55 * This is the function to change channel on single-chip devices, that is
56 * all devices after ar9280.
58 * This function takes the channel value in MHz and sets
59 * hardware channel value. Assumes writes have been enabled to analog bus.
64 * Channel Frequency = (3/4) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^17)
68 * Channel Frequency = (3/2) * freq_ref * (chansel[8:0] + chanfrac[16:0]/2^10)
69 * (freq_ref = 40MHz/(24>>amodeRefSel))
71 static int ar9002_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
73 u16 bMode, fracMode, aModeRefSel = 0;
74 u32 freq, ndiv, channelSel = 0, channelFrac = 0, reg32 = 0;
75 struct chan_centers centers;
78 ath9k_hw_get_channel_centers(ah, chan, ¢ers);
79 freq = centers.synth_center;
81 reg32 = REG_READ(ah, AR_PHY_SYNTH_CONTROL);
84 if (freq < 4800) { /* 2 GHz, fractional mode */
86 unsigned int regWrites = 0;
91 channelSel = CHANSEL_2G(freq);
93 if (AR_SREV_9287_11_OR_LATER(ah)) {
95 /* Enable channel spreading for channel 14 */
96 REG_WRITE_ARRAY(&ah->iniCckfirJapan2484,
99 REG_WRITE_ARRAY(&ah->iniCckfirNormal,
103 txctl = REG_READ(ah, AR_PHY_CCK_TX_CTRL);
105 /* Enable channel spreading for channel 14 */
106 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
107 txctl | AR_PHY_CCK_TX_CTRL_JAPAN);
109 REG_WRITE(ah, AR_PHY_CCK_TX_CTRL,
110 txctl & ~AR_PHY_CCK_TX_CTRL_JAPAN);
117 switch (ah->eep_ops->get_eeprom(ah, EEP_FRAC_N_5G)) {
119 if ((freq % 20) == 0)
121 else if ((freq % 10) == 0)
129 * Enable 2G (fractional) mode for channels
130 * which are 5MHz spaced.
134 channelSel = CHANSEL_5G(freq);
136 /* RefDivA setting */
137 REG_RMW_FIELD(ah, AR_AN_SYNTH9,
138 AR_AN_SYNTH9_REFDIVA, refDivA);
143 ndiv = (freq * (refDivA >> aModeRefSel)) / 60;
144 channelSel = ndiv & 0x1ff;
145 channelFrac = (ndiv & 0xfffffe00) * 2;
146 channelSel = (channelSel << 17) | channelFrac;
152 (fracMode << 28) | (aModeRefSel << 26) | (channelSel);
154 REG_WRITE(ah, AR_PHY_SYNTH_CONTROL, reg32);
157 ah->curchan_rad_index = -1;
163 * ar9002_hw_spur_mitigate - convert baseband spur frequency
164 * @ah: atheros hardware structure
167 * For single-chip solutions. Converts to baseband spur frequency given the
168 * input channel frequency and compute register settings below.
170 static void ar9002_hw_spur_mitigate(struct ath_hw *ah,
171 struct ath9k_channel *chan)
173 int bb_spur = AR_NO_SPUR;
176 int bb_spur_off, spur_subchannel_sd;
178 int spur_delta_phase;
180 int upper, lower, cur_vit_mask;
183 static const int pilot_mask_reg[4] = {
184 AR_PHY_TIMING7, AR_PHY_TIMING8,
185 AR_PHY_PILOT_MASK_01_30, AR_PHY_PILOT_MASK_31_60
187 static const int chan_mask_reg[4] = {
188 AR_PHY_TIMING9, AR_PHY_TIMING10,
189 AR_PHY_CHANNEL_MASK_01_30, AR_PHY_CHANNEL_MASK_31_60
191 static const int inc[4] = { 0, 100, 0, 0 };
192 struct chan_centers centers;
199 int is2GHz = IS_CHAN_2GHZ(chan);
201 memset(&mask_m, 0, sizeof(int8_t) * 123);
202 memset(&mask_p, 0, sizeof(int8_t) * 123);
204 ath9k_hw_get_channel_centers(ah, chan, ¢ers);
205 freq = centers.synth_center;
207 ah->config.spurmode = SPUR_ENABLE_EEPROM;
208 for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
209 cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz);
211 if (AR_NO_SPUR == cur_bb_spur)
215 cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_2GHZ;
217 cur_bb_spur = (cur_bb_spur / 10) + AR_BASE_FREQ_5GHZ;
219 cur_bb_spur = cur_bb_spur - freq;
221 if (IS_CHAN_HT40(chan)) {
222 if ((cur_bb_spur > -AR_SPUR_FEEQ_BOUND_HT40) &&
223 (cur_bb_spur < AR_SPUR_FEEQ_BOUND_HT40)) {
224 bb_spur = cur_bb_spur;
227 } else if ((cur_bb_spur > -AR_SPUR_FEEQ_BOUND_HT20) &&
228 (cur_bb_spur < AR_SPUR_FEEQ_BOUND_HT20)) {
229 bb_spur = cur_bb_spur;
234 if (AR_NO_SPUR == bb_spur) {
235 REG_CLR_BIT(ah, AR_PHY_FORCE_CLKEN_CCK,
236 AR_PHY_FORCE_CLKEN_CCK_MRC_MUX);
239 REG_CLR_BIT(ah, AR_PHY_FORCE_CLKEN_CCK,
240 AR_PHY_FORCE_CLKEN_CCK_MRC_MUX);
245 tmp = REG_READ(ah, AR_PHY_TIMING_CTRL4(0));
247 ENABLE_REGWRITE_BUFFER(ah);
249 newVal = tmp | (AR_PHY_TIMING_CTRL4_ENABLE_SPUR_RSSI |
250 AR_PHY_TIMING_CTRL4_ENABLE_SPUR_FILTER |
251 AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK |
252 AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK);
253 REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0), newVal);
255 newVal = (AR_PHY_SPUR_REG_MASK_RATE_CNTL |
256 AR_PHY_SPUR_REG_ENABLE_MASK_PPM |
257 AR_PHY_SPUR_REG_MASK_RATE_SELECT |
258 AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI |
259 SM(SPUR_RSSI_THRESH, AR_PHY_SPUR_REG_SPUR_RSSI_THRESH));
260 REG_WRITE(ah, AR_PHY_SPUR_REG, newVal);
262 if (IS_CHAN_HT40(chan)) {
264 spur_subchannel_sd = 1;
265 bb_spur_off = bb_spur + 10;
267 spur_subchannel_sd = 0;
268 bb_spur_off = bb_spur - 10;
271 spur_subchannel_sd = 0;
272 bb_spur_off = bb_spur;
275 if (IS_CHAN_HT40(chan))
277 ((bb_spur * 262144) /
278 10) & AR_PHY_TIMING11_SPUR_DELTA_PHASE;
281 ((bb_spur * 524288) /
282 10) & AR_PHY_TIMING11_SPUR_DELTA_PHASE;
284 denominator = IS_CHAN_2GHZ(chan) ? 44 : 40;
285 spur_freq_sd = ((bb_spur_off * 2048) / denominator) & 0x3ff;
287 newVal = (AR_PHY_TIMING11_USE_SPUR_IN_AGC |
288 SM(spur_freq_sd, AR_PHY_TIMING11_SPUR_FREQ_SD) |
289 SM(spur_delta_phase, AR_PHY_TIMING11_SPUR_DELTA_PHASE));
290 REG_WRITE(ah, AR_PHY_TIMING11, newVal);
292 newVal = spur_subchannel_sd << AR_PHY_SFCORR_SPUR_SUBCHNL_SD_S;
293 REG_WRITE(ah, AR_PHY_SFCORR_EXT, newVal);
299 for (i = 0; i < 4; i++) {
303 for (bp = 0; bp < 30; bp++) {
304 if ((cur_bin > lower) && (cur_bin < upper)) {
305 pilot_mask = pilot_mask | 0x1 << bp;
306 chan_mask = chan_mask | 0x1 << bp;
311 REG_WRITE(ah, pilot_mask_reg[i], pilot_mask);
312 REG_WRITE(ah, chan_mask_reg[i], chan_mask);
319 for (i = 0; i < 123; i++) {
320 if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) {
322 /* workaround for gcc bug #37014 */
323 volatile int tmp_v = abs(cur_vit_mask - bin);
329 if (cur_vit_mask < 0)
330 mask_m[abs(cur_vit_mask / 100)] = mask_amt;
332 mask_p[cur_vit_mask / 100] = mask_amt;
337 tmp_mask = (mask_m[46] << 30) | (mask_m[47] << 28)
338 | (mask_m[48] << 26) | (mask_m[49] << 24)
339 | (mask_m[50] << 22) | (mask_m[51] << 20)
340 | (mask_m[52] << 18) | (mask_m[53] << 16)
341 | (mask_m[54] << 14) | (mask_m[55] << 12)
342 | (mask_m[56] << 10) | (mask_m[57] << 8)
343 | (mask_m[58] << 6) | (mask_m[59] << 4)
344 | (mask_m[60] << 2) | (mask_m[61] << 0);
345 REG_WRITE(ah, AR_PHY_BIN_MASK_1, tmp_mask);
346 REG_WRITE(ah, AR_PHY_VIT_MASK2_M_46_61, tmp_mask);
348 tmp_mask = (mask_m[31] << 28)
349 | (mask_m[32] << 26) | (mask_m[33] << 24)
350 | (mask_m[34] << 22) | (mask_m[35] << 20)
351 | (mask_m[36] << 18) | (mask_m[37] << 16)
352 | (mask_m[48] << 14) | (mask_m[39] << 12)
353 | (mask_m[40] << 10) | (mask_m[41] << 8)
354 | (mask_m[42] << 6) | (mask_m[43] << 4)
355 | (mask_m[44] << 2) | (mask_m[45] << 0);
356 REG_WRITE(ah, AR_PHY_BIN_MASK_2, tmp_mask);
357 REG_WRITE(ah, AR_PHY_MASK2_M_31_45, tmp_mask);
359 tmp_mask = (mask_m[16] << 30) | (mask_m[16] << 28)
360 | (mask_m[18] << 26) | (mask_m[18] << 24)
361 | (mask_m[20] << 22) | (mask_m[20] << 20)
362 | (mask_m[22] << 18) | (mask_m[22] << 16)
363 | (mask_m[24] << 14) | (mask_m[24] << 12)
364 | (mask_m[25] << 10) | (mask_m[26] << 8)
365 | (mask_m[27] << 6) | (mask_m[28] << 4)
366 | (mask_m[29] << 2) | (mask_m[30] << 0);
367 REG_WRITE(ah, AR_PHY_BIN_MASK_3, tmp_mask);
368 REG_WRITE(ah, AR_PHY_MASK2_M_16_30, tmp_mask);
370 tmp_mask = (mask_m[0] << 30) | (mask_m[1] << 28)
371 | (mask_m[2] << 26) | (mask_m[3] << 24)
372 | (mask_m[4] << 22) | (mask_m[5] << 20)
373 | (mask_m[6] << 18) | (mask_m[7] << 16)
374 | (mask_m[8] << 14) | (mask_m[9] << 12)
375 | (mask_m[10] << 10) | (mask_m[11] << 8)
376 | (mask_m[12] << 6) | (mask_m[13] << 4)
377 | (mask_m[14] << 2) | (mask_m[15] << 0);
378 REG_WRITE(ah, AR_PHY_MASK_CTL, tmp_mask);
379 REG_WRITE(ah, AR_PHY_MASK2_M_00_15, tmp_mask);
381 tmp_mask = (mask_p[15] << 28)
382 | (mask_p[14] << 26) | (mask_p[13] << 24)
383 | (mask_p[12] << 22) | (mask_p[11] << 20)
384 | (mask_p[10] << 18) | (mask_p[9] << 16)
385 | (mask_p[8] << 14) | (mask_p[7] << 12)
386 | (mask_p[6] << 10) | (mask_p[5] << 8)
387 | (mask_p[4] << 6) | (mask_p[3] << 4)
388 | (mask_p[2] << 2) | (mask_p[1] << 0);
389 REG_WRITE(ah, AR_PHY_BIN_MASK2_1, tmp_mask);
390 REG_WRITE(ah, AR_PHY_MASK2_P_15_01, tmp_mask);
392 tmp_mask = (mask_p[30] << 28)
393 | (mask_p[29] << 26) | (mask_p[28] << 24)
394 | (mask_p[27] << 22) | (mask_p[26] << 20)
395 | (mask_p[25] << 18) | (mask_p[24] << 16)
396 | (mask_p[23] << 14) | (mask_p[22] << 12)
397 | (mask_p[21] << 10) | (mask_p[20] << 8)
398 | (mask_p[19] << 6) | (mask_p[18] << 4)
399 | (mask_p[17] << 2) | (mask_p[16] << 0);
400 REG_WRITE(ah, AR_PHY_BIN_MASK2_2, tmp_mask);
401 REG_WRITE(ah, AR_PHY_MASK2_P_30_16, tmp_mask);
403 tmp_mask = (mask_p[45] << 28)
404 | (mask_p[44] << 26) | (mask_p[43] << 24)
405 | (mask_p[42] << 22) | (mask_p[41] << 20)
406 | (mask_p[40] << 18) | (mask_p[39] << 16)
407 | (mask_p[38] << 14) | (mask_p[37] << 12)
408 | (mask_p[36] << 10) | (mask_p[35] << 8)
409 | (mask_p[34] << 6) | (mask_p[33] << 4)
410 | (mask_p[32] << 2) | (mask_p[31] << 0);
411 REG_WRITE(ah, AR_PHY_BIN_MASK2_3, tmp_mask);
412 REG_WRITE(ah, AR_PHY_MASK2_P_45_31, tmp_mask);
414 tmp_mask = (mask_p[61] << 30) | (mask_p[60] << 28)
415 | (mask_p[59] << 26) | (mask_p[58] << 24)
416 | (mask_p[57] << 22) | (mask_p[56] << 20)
417 | (mask_p[55] << 18) | (mask_p[54] << 16)
418 | (mask_p[53] << 14) | (mask_p[52] << 12)
419 | (mask_p[51] << 10) | (mask_p[50] << 8)
420 | (mask_p[49] << 6) | (mask_p[48] << 4)
421 | (mask_p[47] << 2) | (mask_p[46] << 0);
422 REG_WRITE(ah, AR_PHY_BIN_MASK2_4, tmp_mask);
423 REG_WRITE(ah, AR_PHY_MASK2_P_61_45, tmp_mask);
425 REGWRITE_BUFFER_FLUSH(ah);
428 static void ar9002_olc_init(struct ath_hw *ah)
432 if (!OLC_FOR_AR9280_20_LATER)
435 if (OLC_FOR_AR9287_10_LATER) {
436 REG_SET_BIT(ah, AR_PHY_TX_PWRCTRL9,
437 AR_PHY_TX_PWRCTRL9_RES_DC_REMOVAL);
438 ath9k_hw_analog_shift_rmw(ah, AR9287_AN_TXPC0,
439 AR9287_AN_TXPC0_TXPCMODE,
440 AR9287_AN_TXPC0_TXPCMODE_S,
441 AR9287_AN_TXPC0_TXPCMODE_TEMPSENSE);
444 for (i = 0; i < AR9280_TX_GAIN_TABLE_SIZE; i++)
445 ah->originalGain[i] =
446 MS(REG_READ(ah, AR_PHY_TX_GAIN_TBL1 + i * 4),
452 static u32 ar9002_hw_compute_pll_control(struct ath_hw *ah,
453 struct ath9k_channel *chan)
457 pll = SM(0x5, AR_RTC_9160_PLL_REFDIV);
459 if (chan && IS_CHAN_HALF_RATE(chan))
460 pll |= SM(0x1, AR_RTC_9160_PLL_CLKSEL);
461 else if (chan && IS_CHAN_QUARTER_RATE(chan))
462 pll |= SM(0x2, AR_RTC_9160_PLL_CLKSEL);
464 if (chan && IS_CHAN_5GHZ(chan)) {
465 if (IS_CHAN_A_FAST_CLOCK(ah, chan))
467 else if (AR_SREV_9280_20(ah))
470 pll |= SM(0x28, AR_RTC_9160_PLL_DIV);
472 pll |= SM(0x2c, AR_RTC_9160_PLL_DIV);
478 static void ar9002_hw_do_getnf(struct ath_hw *ah,
479 int16_t nfarray[NUM_NF_READINGS])
483 nf = MS(REG_READ(ah, AR_PHY_CCA), AR9280_PHY_MINCCA_PWR);
484 nfarray[0] = sign_extend32(nf, 8);
486 nf = MS(REG_READ(ah, AR_PHY_EXT_CCA), AR9280_PHY_EXT_MINCCA_PWR);
487 if (IS_CHAN_HT40(ah->curchan))
488 nfarray[3] = sign_extend32(nf, 8);
490 if (AR_SREV_9285(ah) || AR_SREV_9271(ah))
493 nf = MS(REG_READ(ah, AR_PHY_CH1_CCA), AR9280_PHY_CH1_MINCCA_PWR);
494 nfarray[1] = sign_extend32(nf, 8);
496 nf = MS(REG_READ(ah, AR_PHY_CH1_EXT_CCA), AR9280_PHY_CH1_EXT_MINCCA_PWR);
497 if (IS_CHAN_HT40(ah->curchan))
498 nfarray[4] = sign_extend32(nf, 8);
501 static void ar9002_hw_set_nf_limits(struct ath_hw *ah)
503 if (AR_SREV_9285(ah)) {
504 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9285_2GHZ;
505 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9285_2GHZ;
506 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9285_2GHZ;
507 } else if (AR_SREV_9287(ah)) {
508 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9287_2GHZ;
509 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9287_2GHZ;
510 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9287_2GHZ;
511 } else if (AR_SREV_9271(ah)) {
512 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9271_2GHZ;
513 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9271_2GHZ;
514 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9271_2GHZ;
516 ah->nf_2g.max = AR_PHY_CCA_MAX_GOOD_VAL_9280_2GHZ;
517 ah->nf_2g.min = AR_PHY_CCA_MIN_GOOD_VAL_9280_2GHZ;
518 ah->nf_2g.nominal = AR_PHY_CCA_NOM_VAL_9280_2GHZ;
519 ah->nf_5g.max = AR_PHY_CCA_MAX_GOOD_VAL_9280_5GHZ;
520 ah->nf_5g.min = AR_PHY_CCA_MIN_GOOD_VAL_9280_5GHZ;
521 ah->nf_5g.nominal = AR_PHY_CCA_NOM_VAL_9280_5GHZ;
525 static void ar9002_hw_antdiv_comb_conf_get(struct ath_hw *ah,
526 struct ath_hw_antcomb_conf *antconf)
530 regval = REG_READ(ah, AR_PHY_MULTICHAIN_GAIN_CTL);
531 antconf->main_lna_conf = (regval & AR_PHY_9285_ANT_DIV_MAIN_LNACONF) >>
532 AR_PHY_9285_ANT_DIV_MAIN_LNACONF_S;
533 antconf->alt_lna_conf = (regval & AR_PHY_9285_ANT_DIV_ALT_LNACONF) >>
534 AR_PHY_9285_ANT_DIV_ALT_LNACONF_S;
535 antconf->fast_div_bias = (regval & AR_PHY_9285_FAST_DIV_BIAS) >>
536 AR_PHY_9285_FAST_DIV_BIAS_S;
537 antconf->lna1_lna2_delta = -3;
538 antconf->div_group = 0;
541 static void ar9002_hw_antdiv_comb_conf_set(struct ath_hw *ah,
542 struct ath_hw_antcomb_conf *antconf)
546 regval = REG_READ(ah, AR_PHY_MULTICHAIN_GAIN_CTL);
547 regval &= ~(AR_PHY_9285_ANT_DIV_MAIN_LNACONF |
548 AR_PHY_9285_ANT_DIV_ALT_LNACONF |
549 AR_PHY_9285_FAST_DIV_BIAS);
550 regval |= ((antconf->main_lna_conf << AR_PHY_9285_ANT_DIV_MAIN_LNACONF_S)
551 & AR_PHY_9285_ANT_DIV_MAIN_LNACONF);
552 regval |= ((antconf->alt_lna_conf << AR_PHY_9285_ANT_DIV_ALT_LNACONF_S)
553 & AR_PHY_9285_ANT_DIV_ALT_LNACONF);
554 regval |= ((antconf->fast_div_bias << AR_PHY_9285_FAST_DIV_BIAS_S)
555 & AR_PHY_9285_FAST_DIV_BIAS);
557 REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regval);
560 void ar9002_hw_attach_phy_ops(struct ath_hw *ah)
562 struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah);
563 struct ath_hw_ops *ops = ath9k_hw_ops(ah);
565 priv_ops->set_rf_regs = NULL;
566 priv_ops->rf_alloc_ext_banks = NULL;
567 priv_ops->rf_free_ext_banks = NULL;
568 priv_ops->rf_set_freq = ar9002_hw_set_channel;
569 priv_ops->spur_mitigate_freq = ar9002_hw_spur_mitigate;
570 priv_ops->olc_init = ar9002_olc_init;
571 priv_ops->compute_pll_control = ar9002_hw_compute_pll_control;
572 priv_ops->do_getnf = ar9002_hw_do_getnf;
574 ops->antdiv_comb_conf_get = ar9002_hw_antdiv_comb_conf_get;
575 ops->antdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set;
577 ar9002_hw_set_nf_limits(ah);