iPXE
ath9k_ar9002_hw.c
Go to the documentation of this file.
1/*
2 * Copyright (c) 2008-2011 Atheros Communications Inc.
3 *
4 * Modified for iPXE by Scott K Logan <logans@cottsay.net> July 2011
5 * Original from Linux kernel 3.0.1
6 *
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.
10 *
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.
18 */
19
20FILE_LICENCE ( BSD2 );
21FILE_SECBOOT ( FORBIDDEN );
22
23#include "hw.h"
24#include "ar5008_initvals.h"
25#include "ar9001_initvals.h"
26#include "ar9002_initvals.h"
27#include "ar9002_phy.h"
28
30
31/* General hardware code for the A5008/AR9001/AR9002 hadware families */
32
34{
35 if (AR_SREV_9271(ah)) {
40 INIT_INI_ARRAY(&ah->iniCommon_normal_cck_fir_coeff_9271,
43 INIT_INI_ARRAY(&ah->iniCommon_japan_2484_cck_fir_coeff_9271,
46 INIT_INI_ARRAY(&ah->iniModes_9271_1_0_only,
49 INIT_INI_ARRAY(&ah->iniModes_9271_ANI_reg, ar9271Modes_9271_ANI_reg,
51 INIT_INI_ARRAY(&ah->iniModes_high_power_tx_gain_9271,
54 INIT_INI_ARRAY(&ah->iniModes_normal_power_tx_gain_9271,
57 return;
58 }
59
65 if (ah->config.pcie_clock_req)
66 INIT_INI_ARRAY(&ah->iniPcieSerdes,
69 else
70 INIT_INI_ARRAY(&ah->iniPcieSerdes,
73 2);
74 } else if (AR_SREV_9285_12_OR_LATER(ah)) {
75
76
81
82 if (ah->config.pcie_clock_req) {
83 INIT_INI_ARRAY(&ah->iniPcieSerdes,
86 } else {
87 INIT_INI_ARRAY(&ah->iniPcieSerdes,
90 2);
91 }
92 } else if (AR_SREV_9280_20_OR_LATER(ah)) {
97
98 if (ah->config.pcie_clock_req) {
99 INIT_INI_ARRAY(&ah->iniPcieSerdes,
102 } else {
103 INIT_INI_ARRAY(&ah->iniPcieSerdes,
106 }
107 INIT_INI_ARRAY(&ah->iniModesAdditional,
110 } else if (AR_SREV_9160_10_OR_LATER(ah)) {
117 INIT_INI_ARRAY(&ah->iniBB_RfGain, ar5416BB_RfGain_9160,
131 if (AR_SREV_9160_11(ah)) {
132 INIT_INI_ARRAY(&ah->iniAddac,
135 } else {
138 }
139 } else if (AR_SREV_9100_OR_LATER(ah)) {
146 INIT_INI_ARRAY(&ah->iniBB_RfGain, ar5416BB_RfGain_9100,
162 } else {
163 INIT_INI_ARRAY(&ah->iniModes, ar5416Modes,
165 INIT_INI_ARRAY(&ah->iniCommon, ar5416Common,
167 INIT_INI_ARRAY(&ah->iniBank0, ar5416Bank0,
169 INIT_INI_ARRAY(&ah->iniBB_RfGain, ar5416BB_RfGain,
171 INIT_INI_ARRAY(&ah->iniBank1, ar5416Bank1,
173 INIT_INI_ARRAY(&ah->iniBank2, ar5416Bank2,
175 INIT_INI_ARRAY(&ah->iniBank3, ar5416Bank3,
177 INIT_INI_ARRAY(&ah->iniBank6, ar5416Bank6,
179 INIT_INI_ARRAY(&ah->iniBank6TPC, ar5416Bank6TPC,
181 INIT_INI_ARRAY(&ah->iniBank7, ar5416Bank7,
183 INIT_INI_ARRAY(&ah->iniAddac, ar5416Addac,
185 }
186}
187
188/* Support for Japan ch.14 (2484) spread */
202
204{
205 u32 rxgain_type;
206
207 if (ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) >=
209 rxgain_type = ah->eep_ops->get_eeprom(ah, EEP_RXGAIN_TYPE);
210
211 if (rxgain_type == AR5416_EEP_RXGAIN_13DB_BACKOFF)
212 INIT_INI_ARRAY(&ah->iniModesRxGain,
215 else if (rxgain_type == AR5416_EEP_RXGAIN_23DB_BACKOFF)
216 INIT_INI_ARRAY(&ah->iniModesRxGain,
219 else
220 INIT_INI_ARRAY(&ah->iniModesRxGain,
223 } else {
224 INIT_INI_ARRAY(&ah->iniModesRxGain,
227 }
228}
229
231{
232 u32 txgain_type;
233
234 if (ah->eep_ops->get_eeprom(ah, EEP_MINOR_REV) >=
236 txgain_type = ah->eep_ops->get_eeprom(ah, EEP_TXGAIN_TYPE);
237
238 if (txgain_type == AR5416_EEP_TXGAIN_HIGH_POWER)
239 INIT_INI_ARRAY(&ah->iniModesTxGain,
242 else
243 INIT_INI_ARRAY(&ah->iniModesTxGain,
246 } else {
247 INIT_INI_ARRAY(&ah->iniModesTxGain,
250 }
251}
252
254{
256 INIT_INI_ARRAY(&ah->iniModesRxGain,
259 else if (AR_SREV_9280_20(ah))
261
263 INIT_INI_ARRAY(&ah->iniModesTxGain,
266 } else if (AR_SREV_9280_20(ah)) {
268 } else if (AR_SREV_9285_12_OR_LATER(ah)) {
269 u32 txgain_type = ah->eep_ops->get_eeprom(ah, EEP_TXGAIN_TYPE);
270
271 /* txgain table */
272 if (txgain_type == AR5416_EEP_TXGAIN_HIGH_POWER) {
273 if (AR_SREV_9285E_20(ah)) {
274 INIT_INI_ARRAY(&ah->iniModesTxGain,
278 } else {
279 INIT_INI_ARRAY(&ah->iniModesTxGain,
283 }
284 } else {
285 if (AR_SREV_9285E_20(ah)) {
286 INIT_INI_ARRAY(&ah->iniModesTxGain,
290 } else {
291 INIT_INI_ARRAY(&ah->iniModesTxGain,
295 }
296 }
297 }
298}
299
300/*
301 * Helper for ASPM support.
302 *
303 * Disable PLL when in L0s as well as receiver clock when in L1.
304 * This power saving option must be enabled through the SerDes.
305 *
306 * Programming the SerDes must go through the same 288 bit serial shift
307 * register as the other analog registers. Hence the 9 writes.
308 */
310 int restore,
311 int power_off)
312{
313 u8 i;
314 u32 val;
315
316 if (ah->is_pciexpress != 1)
317 return;
318
319 /* Do not touch SerDes registers */
320 if (ah->config.pcie_powersave_enable == 2)
321 return;
322
323 /* Nothing to do on restore for 11N */
324 if (!restore) {
326 /*
327 * AR9280 2.0 or later chips use SerDes values from the
328 * initvals.h initialized depending on chipset during
329 * __ath9k_hw_init()
330 */
331 for (i = 0; i < ah->iniPcieSerdes.ia_rows; i++) {
332 REG_WRITE(ah, INI_RA(&ah->iniPcieSerdes, i, 0),
333 INI_RA(&ah->iniPcieSerdes, i, 1));
334 }
335 } else {
337
338 REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
339 REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
340
341 /* RX shut off when elecidle is asserted */
342 REG_WRITE(ah, AR_PCIE_SERDES, 0x28000039);
343 REG_WRITE(ah, AR_PCIE_SERDES, 0x53160824);
344 REG_WRITE(ah, AR_PCIE_SERDES, 0xe5980579);
345
346 /*
347 * Ignore ah->ah_config.pcie_clock_req setting for
348 * pre-AR9280 11n
349 */
350 REG_WRITE(ah, AR_PCIE_SERDES, 0x001defff);
351
352 REG_WRITE(ah, AR_PCIE_SERDES, 0x1aaabe40);
353 REG_WRITE(ah, AR_PCIE_SERDES, 0xbe105554);
354 REG_WRITE(ah, AR_PCIE_SERDES, 0x000e3007);
355
356 /* Load the new settings */
357 REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
358
360 }
361
362 udelay(1000);
363 }
364
365 if (power_off) {
366 /* clear bit 19 to disable L1 */
368
369 val = REG_READ(ah, AR_WA);
370
371 /*
372 * Set PCIe workaround bits
373 * In AR9280 and AR9285, bit 14 in WA register (disable L1)
374 * should only be set when device enters D3 and be
375 * cleared when device comes back to D0.
376 */
377 if (ah->config.pcie_waen) {
378 if (ah->config.pcie_waen & AR_WA_D3_L1_DISABLE)
380 } else {
381 if (((AR_SREV_9285(ah) ||
382 AR_SREV_9271(ah) ||
383 AR_SREV_9287(ah)) &&
385 (AR_SREV_9280(ah) &&
388 }
389 }
390
392 /*
393 * Disable bit 6 and 7 before entering D3 to
394 * prevent system hang.
395 */
396 val &= ~(AR_WA_BIT6 | AR_WA_BIT7);
397 }
398
399 if (AR_SREV_9280(ah))
400 val |= AR_WA_BIT22;
401
402 if (AR_SREV_9285E_20(ah))
403 val |= AR_WA_BIT23;
404
406 } else {
407 if (ah->config.pcie_waen) {
408 val = ah->config.pcie_waen;
409 if (!power_off)
411 } else {
412 if (AR_SREV_9285(ah) ||
413 AR_SREV_9271(ah) ||
414 AR_SREV_9287(ah)) {
416 if (!power_off)
418 }
419 else if (AR_SREV_9280(ah)) {
420 /*
421 * For AR9280 chips, bit 22 of 0x4004
422 * needs to be set.
423 */
425 if (!power_off)
427 } else {
429 }
430 }
431
432 /* WAR for ASPM system hang */
435
436 if (AR_SREV_9285E_20(ah))
437 val |= AR_WA_BIT23;
438
440
441 /* set bit 19 to allow forcing of pcie core into L1 state */
443 }
444}
445
447{
448 u32 val;
449 int i;
450
452
453 REG_WRITE(ah, AR_PHY(0x36), 0x00007058);
454 for (i = 0; i < 8; i++)
455 REG_WRITE(ah, AR_PHY(0x20), 0x00010000);
456
458
459 val = (REG_READ(ah, AR_PHY(256)) >> 24) & 0xff;
460 val = ((val & 0xf0) >> 4) | ((val & 0x0f) << 4);
461
462 return ath9k_hw_reverse_bits(val, 8);
463}
464
466{
467 u32 val;
468
469 REG_WRITE(ah, AR_PHY(0), 0x00000007);
470
472 switch (val & AR_RADIO_SREV_MAJOR) {
473 case 0:
475 break;
480 break;
481 default:
482 DBG("ath9k: "
483 "Radio Chip Rev 0x%02X not supported\n",
485 return -EOPNOTSUPP;
486 }
487
488 ah->hw_version.analog5GhzRev = val;
489
490 return 0;
491}
492
505
506/*
507 * If Async FIFO is enabled, the following counters change as MAC now runs
508 * at 117 Mhz instead of 88/44MHz when async FIFO is disabled.
509 *
510 * The values below tested for ht40 2 chain.
511 * Overwrite the delay/timeouts initialized in process ini.
512 */
532
533/*
534 * We don't enable WEP aggregation on mac80211 but we keep this
535 * around for HAL unification purposes.
536 */
544
545/* Sets up the AR5008/AR9001/AR9002 hardware familiy callbacks */
563
565{
566 u32 modesIndex;
567 unsigned int i;
568
569 switch (chan->chanmode) {
570 case CHANNEL_A:
571 case CHANNEL_A_HT20:
572 modesIndex = 1;
573 break;
576 modesIndex = 2;
577 break;
578 case CHANNEL_G:
579 case CHANNEL_G_HT20:
580 case CHANNEL_B:
581 modesIndex = 4;
582 break;
585 modesIndex = 3;
586 break;
587
588 default:
589 return;
590 }
591
593
594 for (i = 0; i < ah->iniModes_9271_ANI_reg.ia_rows; i++) {
595 u32 reg = INI_RA(&ah->iniModes_9271_ANI_reg, i, 0);
596 u32 val = INI_RA(&ah->iniModes_9271_ANI_reg, i, modesIndex);
597 u32 val_orig;
598
599 if (reg == AR_PHY_CCK_DETECT) {
600 val_orig = REG_READ(ah, reg);
603
604 REG_WRITE(ah, reg, val|val_orig);
605 } else
606 REG_WRITE(ah, reg, val);
607 }
608
610}
static const u32 ar5416Bank1[][2]
static const u32 ar5416BB_RfGain[][3]
static const u32 ar5416Bank6[][3]
static const u32 ar5416Addac[][2]
static const u32 ar5416Common[][2]
static const u32 ar5416Bank7[][2]
static const u32 ar5416Bank2[][2]
static const u32 ar5416Modes[][6]
static const u32 ar5416Bank3[][3]
static const u32 ar5416Bank6TPC[][3]
static const u32 ar5416Bank0[][2]
static const u32 ar5416Bank7_9160[][2]
static const u32 ar5416Bank0_9100[][2]
static const u32 ar5416Common_9100[][2]
static const u32 ar5416Bank6TPC_9100[][3]
static const u32 ar5416Bank3_9160[][3]
static const u32 ar5416BB_RfGain_9100[][3]
static const u32 ar5416Bank3_9100[][3]
static const u32 ar5416Bank6_9160[][3]
static const u32 ar5416Addac_9100[][2]
static const u32 ar5416Bank6TPC_9160[][3]
static const u32 ar5416Bank6_9100[][3]
static const u32 ar5416Bank7_9100[][2]
static const u32 ar5416Bank2_9160[][2]
static const u32 ar5416Addac_9160[][2]
static const u32 ar5416Bank1_9100[][2]
static const u32 ar5416Addac_9160_1_1[][2]
static const u32 ar5416Common_9160[][2]
static const u32 ar5416Modes_9100[][6]
static const u32 ar5416Bank0_9160[][2]
static const u32 ar5416Bank2_9100[][2]
static const u32 ar5416Modes_9160[][6]
static const u32 ar5416BB_RfGain_9160[][3]
static const u32 ar5416Bank1_9160[][2]
static __unused const u32 ar9287Modes_tx_gain_9287_1_1[][6]
static __unused const u32 ar9285PciePhy_clkreq_off_L1_9285_1_2[][2]
static __unused const u32 ar9285Modes_high_power_tx_gain_9285_1_2[][6]
static __unused const u32 ar9285Modes_original_tx_gain_9285_1_2[][6]
static __unused const u32 ar9280Modes_fast_clock_9280_2[][3]
static __unused const u32 ar9287Common_japan_2484_cck_fir_coeff_9287_1_1[][2]
static __unused const u32 ar9285Modes_XE2_0_normal_power[][6]
static __unused const u32 ar9285Modes_XE2_0_high_power[][6]
static __unused const u32 ar9271Modes_9271_ANI_reg[][6]
static __unused const u32 ar9287Common_9287_1_1[][2]
static __unused const u32 ar9280PciePhy_clkreq_off_L1_9280[][2]
static __unused const u32 ar9285PciePhy_clkreq_always_on_L1_9285_1_2[][2]
static __unused const u32 ar9271Common_9271[][2]
static __unused const u32 ar9280Modes_backoff_23db_rxgain_9280_2[][6]
static __unused const u32 ar9271Modes_normal_power_tx_gain_9271[][6]
static __unused const u32 ar9285Common_9285_1_2[][2]
static __unused const u32 ar9287Common_normal_cck_fir_coeff_9287_1_1[][2]
static __unused const u32 ar9271Modes_high_power_tx_gain_9271[][6]
static __unused const u32 ar9280PciePhy_clkreq_always_on_L1_9280[][2]
static __unused const u32 ar9280Modes_high_power_tx_gain_9280_2[][6]
static __unused const u32 ar9280Common_9280_2[][2]
static __unused const u32 ar9280Modes_original_tx_gain_9280_2[][6]
static __unused const u32 ar9280Modes_backoff_13db_rxgain_9280_2[][6]
static __unused const u32 ar9287PciePhy_clkreq_always_on_L1_9287_1_1[][2]
static __unused const u32 ar9280Modes_original_rxgain_9280_2[][6]
static __unused const u32 ar9271Common_normal_cck_fir_coeff_9271[][2]
static __unused const u32 ar9287Modes_9287_1_1[][6]
static __unused const u32 ar9287Modes_rx_gain_9287_1_1[][6]
static __unused const u32 ar9271Modes_9271_1_0_only[][6]
static __unused const u32 ar9280Modes_9280_2[][6]
static __unused const u32 ar9271Modes_9271[][6]
static __unused const u32 ar9271Common_japan_2484_cck_fir_coeff_9271[][2]
static __unused const u32 ar9285Modes_9285_1_2[][6]
static __unused const u32 ar9287PciePhy_clkreq_off_L1_9287_1_1[][2]
#define AR_PHY_MODE_ASYNCFIFO
Definition ar9002_phy.h:398
#define AR_PHY_CCK_DETECT
Definition ar9002_phy.h:414
#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK
Definition ar9002_phy.h:415
#define AR_PHY_MODE
Definition ar9002_phy.h:397
#define CHANNEL_B
Definition ath5k.h:641
#define CHANNEL_G
Definition ath5k.h:642
#define CHANNEL_A
Definition ath5k.h:640
#define AR5416_EEP_MINOR_VER_17
Definition eeprom.h:139
#define AR5416_EEP_RXGAIN_23DB_BACKOFF
Definition eeprom.h:165
#define AR5416_EEP_RXGAIN_13DB_BACKOFF
Definition eeprom.h:166
@ EEP_RXGAIN_TYPE
Definition eeprom.h:245
@ EEP_TXGAIN_TYPE
Definition eeprom.h:247
@ EEP_MINOR_REV
Definition eeprom.h:241
#define AR5416_EEP_MINOR_VER_19
Definition eeprom.h:140
#define AR5416_EEP_TXGAIN_HIGH_POWER
Definition eeprom.h:171
#define AR_AHB_MODE
Definition reg.h:902
#define AR_RAD5122_SREV_MAJOR
Definition reg.h:899
#define AR_SREV_9287(_ah)
Definition reg.h:835
#define AR_TIME_OUT
Definition reg.h:1462
#define AR_D_GBL_IFS_SIFS_ASYNC_FIFO_DUR
Definition reg.h:606
#define AR_SREV_9285_12_OR_LATER(_ah)
Definition reg.h:832
#define AR_MAC_PCU_LOGIC_ANALYZER_DISBUG20768
Definition reg.h:1815
#define AR_WA_BIT6
Definition reg.h:700
#define AR9280_WA_DEFAULT
Definition reg.h:711
#define AR_MAC_PCU_ASYNC_FIFO_REG3
Definition reg.h:1846
#define AR_SREV_9287_11_OR_LATER(_ah)
Definition reg.h:837
#define AR_PCIE_SERDES2
Definition reg.h:983
#define AR_WA_BIT7
Definition reg.h:701
#define AR_RAD5133_SREV_MAJOR
Definition reg.h:897
#define AR_PCIE_SERDES
Definition reg.h:982
#define AR_SREV_9280(_ah)
Definition reg.h:823
#define AR_SREV_9285(_ah)
Definition reg.h:830
#define AR_SREV_9280_20(_ah)
Definition reg.h:827
#define AR_SREV_9285E_20(_ah)
Definition reg.h:882
#define AR_SREV_9280_20_OR_LATER(_ah)
Definition reg.h:825
#define AR_WA_DEFAULT
Definition reg.h:712
#define AR_SREV_9100_OR_LATER(_ah)
Definition reg.h:813
#define AR_D_GBL_IFS_SLOT
Definition reg.h:619
#define AR_SREV_9287_13_OR_LATER(_ah)
Definition reg.h:849
#define AR_PCIE_PM_CTRL_ENA
Definition reg.h:985
#define AR_RAD2122_SREV_MAJOR
Definition reg.h:900
#define AR_MAC_PCU_ASYNC_FIFO_REG3_DATAPATH_SEL
Definition reg.h:1847
#define AR9285_WA_DEFAULT
Definition reg.h:710
#define AR_MAC_PCU_ASYNC_FIFO_REG3_SOFT_RESET
Definition reg.h:1848
#define AR_RAD2133_SREV_MAJOR
Definition reg.h:898
#define AR_AHB_CUSTOM_BURST_ASYNC_FIFO_VAL
Definition reg.h:913
#define AR_D_GBL_IFS_EIFS_ASYNC_FIFO_DUR
Definition reg.h:627
#define AR_PCIE_PM_CTRL
Definition reg.h:984
#define AR_TIME_OUT_ACK_CTS_ASYNC_FIFO_DUR
Definition reg.h:1467
#define AR_D_GBL_IFS_SLOT_ASYNC_FIFO_DUR
Definition reg.h:622
#define AR_SREV_9271(_ah)
Definition reg.h:854
#define AR_WA
Definition reg.h:699
#define AR_WA_BIT23
Definition reg.h:702
#define AR_PCU_MISC_MODE2
Definition reg.h:1831
#define AR_WA_BIT22
Definition reg.h:709
#define AR_SREV_9160_10_OR_LATER(_ah)
Definition reg.h:818
#define AR_RADIO_SREV_MAJOR
Definition reg.h:896
#define AR_MAC_PCU_LOGIC_ANALYZER
Definition reg.h:1814
#define AR_D_GBL_IFS_SIFS
Definition reg.h:604
#define AR_AHB_CUSTOM_BURST_EN
Definition reg.h:911
#define AR_SREV_9160_11(_ah)
Definition reg.h:820
#define AR_WA_D3_L1_DISABLE
Definition reg.h:703
#define AR_USEC_ASYNC_FIFO_DUR
Definition reg.h:1483
#define AR_USEC
Definition reg.h:1477
#define AR_PCU_MISC_MODE2_ENABLE_AGGWEP
Definition reg.h:1841
#define AR_D_GBL_IFS_EIFS
Definition reg.h:624
void ar5008_hw_attach_phy_ops(struct ath_hw *ah)
void ar9002_hw_attach_calib_ops(struct ath_hw *ah)
void ar9002_hw_enable_wep_aggregation(struct ath_hw *ah)
static void ar9002_hw_configpcipowersave(struct ath_hw *ah, int restore, int power_off)
static void ar9280_20_hw_init_txgain_ini(struct ath_hw *ah)
int ar9002_hw_rf_claim(struct ath_hw *ah)
static void ar9280_20_hw_init_rxgain_ini(struct ath_hw *ah)
void ar9002_hw_update_async_fifo(struct ath_hw *ah)
void ar9002_hw_attach_ops(struct ath_hw *ah)
int modparam_force_new_ani
void ar9002_hw_cck_chan14_spread(struct ath_hw *ah)
static void ar9002_hw_init_mode_gain_regs(struct ath_hw *ah)
static void ar9002_hw_init_mode_regs(struct ath_hw *ah)
void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan)
void ar9002_hw_enable_async_fifo(struct ath_hw *ah)
static int ar9002_hw_get_radiorev(struct ath_hw *ah)
void ar9002_hw_attach_mac_ops(struct ath_hw *ah)
void ar9002_hw_attach_phy_ops(struct ath_hw *ah)
u32 ath9k_hw_reverse_bits(u32 val, u32 n)
Definition ath9k_hw.c:127
#define INI_RA(iniarray, row, column)
Definition calib.h:46
#define INIT_INI_ARRAY(iniarray, array, rows, columns)
Definition calib.h:40
#define ARRAY_SIZE(x)
Definition efx_common.h:43
#define DBG(...)
Print a debugging message.
Definition compiler.h:498
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
Definition compiler.h:896
#define EOPNOTSUPP
Operation not supported on socket.
Definition errno.h:605
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Definition compiler.h:926
#define REGWRITE_BUFFER_FLUSH(_ah)
Definition hw.h:96
#define CHANNEL_A_HT20
Definition hw.h:319
#define REG_WRITE(_ah, _reg, _val)
Definition hw.h:78
#define REG_READ(_ah, _reg)
Definition hw.h:81
static struct ath_hw_private_ops * ath9k_hw_private_ops(struct ath_hw *ah)
Definition hw.h:880
static struct ath_hw_ops * ath9k_hw_ops(struct ath_hw *ah)
Definition hw.h:885
#define REG_RMW_FIELD(_a, _r, _f, _v)
Definition hw.h:104
#define CHANNEL_G_HT40MINUS
Definition hw.h:321
#define CHANNEL_A_HT40MINUS
Definition hw.h:323
#define CHANNEL_G_HT20
Definition hw.h:318
#define ENABLE_REGWRITE_BUFFER(_ah)
Definition hw.h:90
#define CHANNEL_G_HT40PLUS
Definition hw.h:320
#define REG_CLR_BIT(_a, _r, _f)
Definition hw.h:110
#define CHANNEL_A_HT40PLUS
Definition hw.h:322
#define REG_SET_BIT(_a, _r, _f)
Definition hw.h:108
#define u8
Definition igbvf_osdep.h:40
void __asmcall int val
Definition setjmp.h:12
static unsigned int unsigned int reg
Definition myson.h:162
#define AR_PHY(_n)
Definition phy.h:28
uint8_t ah
Definition registers.h:1
u32 chanmode
Definition hw.h:352
struct ath_hw_ops - callbacks used by hardware code and driver code
Definition hw.h:604
void(* config_pci_powersave)(struct ath_hw *ah, int restore, int power_off)
Definition hw.h:605
struct ath_hw_private_ops - callbacks used internally by hardware code
Definition hw.h:551
void(* init_mode_regs)(struct ath_hw *ah)
Definition hw.h:556
void(* init_mode_gain_regs)(struct ath_hw *ah)
Definition hw.h:557
Definition hw.h:657
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition timer.c:61
#define u32
Definition vga.h:21