iPXE
hw.h
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 
20 #ifndef HW_H
21 #define HW_H
22 
23 FILE_LICENCE ( BSD2 );
24 FILE_SECBOOT ( FORBIDDEN );
25 
26 #include <errno.h>
27 
28 #include "mac.h"
29 #include "ani.h"
30 #include "eeprom.h"
31 #include "calib.h"
32 #include "reg.h"
33 #include "phy.h"
34 
35 #include "../regd.h"
36 
37 /* Keep all ath9k files under one errfile ID */
38 #undef ERRFILE
39 #define ERRFILE ERRFILE_ath9k
40 
41 #define ATHEROS_VENDOR_ID 0x168c
42 
43 #define AR5416_DEVID_PCI 0x0023
44 #define AR5416_DEVID_PCIE 0x0024
45 #define AR9160_DEVID_PCI 0x0027
46 #define AR9280_DEVID_PCI 0x0029
47 #define AR9280_DEVID_PCIE 0x002a
48 #define AR9285_DEVID_PCIE 0x002b
49 #define AR2427_DEVID_PCIE 0x002c
50 #define AR9287_DEVID_PCI 0x002d
51 #define AR9287_DEVID_PCIE 0x002e
52 #define AR9300_DEVID_PCIE 0x0030
53 #define AR9300_DEVID_AR9340 0x0031
54 #define AR9300_DEVID_AR9485_PCIE 0x0032
55 
56 #define AR5416_AR9100_DEVID 0x000b
57 
58 #define AR_SUBVENDOR_ID_NOG 0x0e11
59 #define AR_SUBVENDOR_ID_NEW_A 0x7065
60 #define AR5416_MAGIC 0x19641014
61 
62 #define AR9280_COEX2WIRE_SUBSYSID 0x309b
63 #define AT9285_COEX3WIRE_SA_SUBSYSID 0x30aa
64 #define AT9285_COEX3WIRE_DA_SUBSYSID 0x30ab
65 
66 #define AR9300_NUM_BT_WEIGHTS 4
67 #define AR9300_NUM_WLAN_WEIGHTS 4
68 
69 #define ATH_AMPDU_LIMIT_MAX (64 * 1024 - 1)
70 
71 #define ATH_DEFAULT_NOISE_FLOOR -95
72 
73 #define ATH9K_RSSI_BAD -128
74 
75 #define ATH9K_NUM_CHANNELS 38
76 
77 /* Register read/write primitives */
78 #define REG_WRITE(_ah, _reg, _val) \
79  (_ah)->reg_ops.write((_ah), (_val), (_reg))
80 
81 #define REG_READ(_ah, _reg) \
82  (_ah)->reg_ops.read((_ah), (_reg))
83 
84 #define REG_READ_MULTI(_ah, _addr, _val, _cnt) \
85  (_ah)->reg_ops.multi_read((_ah), (_addr), (_val), (_cnt))
86 
87 #define REG_RMW(_ah, _reg, _set, _clr) \
88  (_ah)->reg_ops.rmw((_ah), (_reg), (_set), (_clr))
89 
90 #define ENABLE_REGWRITE_BUFFER(_ah) \
91  do { \
92  if ((_ah)->reg_ops.enable_write_buffer) \
93  (_ah)->reg_ops.enable_write_buffer((_ah)); \
94  } while (0)
95 
96 #define REGWRITE_BUFFER_FLUSH(_ah) \
97  do { \
98  if ((_ah)->reg_ops.write_flush) \
99  (_ah)->reg_ops.write_flush((_ah)); \
100  } while (0)
101 
102 #define SM(_v, _f) (((_v) << _f##_S) & _f)
103 #define MS(_v, _f) (((_v) & _f) >> _f##_S)
104 #define REG_RMW_FIELD(_a, _r, _f, _v) \
105  REG_RMW(_a, _r, (((_v) << _f##_S) & _f), (_f))
106 #define REG_READ_FIELD(_a, _r, _f) \
107  (((REG_READ(_a, _r) & _f) >> _f##_S))
108 #define REG_SET_BIT(_a, _r, _f) \
109  REG_RMW(_a, _r, (_f), 0)
110 #define REG_CLR_BIT(_a, _r, _f) \
111  REG_RMW(_a, _r, 0, (_f))
112 
113 #define DO_DELAY(x) do { \
114  if (((++(x) % 64) == 0) && \
115  (ath9k_hw_common(ah)->bus_ops->ath_bus_type \
116  != ATH_USB)) \
117  udelay(1); \
118  } while (0)
119 
120 #define REG_WRITE_ARRAY(iniarray, column, regWr) \
121  ath9k_hw_write_array(ah, iniarray, column, &(regWr))
122 
123 #define AR_GPIO_OUTPUT_MUX_AS_OUTPUT 0
124 #define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1
125 #define AR_GPIO_OUTPUT_MUX_AS_PCIE_POWER_LED 2
126 #define AR_GPIO_OUTPUT_MUX_AS_TX_FRAME 3
127 #define AR_GPIO_OUTPUT_MUX_AS_RX_CLEAR_EXTERNAL 4
128 #define AR_GPIO_OUTPUT_MUX_AS_MAC_NETWORK_LED 5
129 #define AR_GPIO_OUTPUT_MUX_AS_MAC_POWER_LED 6
130 
131 #define AR_GPIOD_MASK 0x00001FFF
132 #define AR_GPIO_BIT(_gpio) (1 << (_gpio))
133 
134 #define BASE_ACTIVATE_DELAY 100
135 #define RTC_PLL_SETTLE_DELAY (AR_SREV_9340(ah) ? 1000 : 100)
136 #define COEF_SCALE_S 24
137 #define HT40_CHANNEL_CENTER_SHIFT 10
138 
139 #define ATH9K_ANTENNA0_CHAINMASK 0x1
140 #define ATH9K_ANTENNA1_CHAINMASK 0x2
141 
142 #define ATH9K_NUM_DMA_DEBUG_REGS 8
143 #define ATH9K_NUM_QUEUES 10
144 
145 #define MAX_RATE_POWER 63
146 #define AH_WAIT_TIMEOUT 100000 /* (us) */
147 #define AH_TSF_WRITE_TIMEOUT 100 /* (us) */
148 #define AH_TIME_QUANTUM 10
149 #define AR_KEYTABLE_SIZE 128
150 #define POWER_UP_TIME 10000
151 #define SPUR_RSSI_THRESH 40
152 
153 #define CAB_TIMEOUT_VAL 10
154 #define BEACON_TIMEOUT_VAL 10
155 #define MIN_BEACON_TIMEOUT_VAL 1
156 #define SLEEP_SLOP 3
157 
158 #define INIT_CONFIG_STATUS 0x00000000
159 #define INIT_RSSI_THR 0x00000700
160 #define INIT_BCON_CNTRL_REG 0x00000000
161 
162 #define TU_TO_USEC(_tu) ((_tu) << 10)
163 
164 #define ATH9K_HW_RX_HP_QDEPTH 16
165 #define ATH9K_HW_RX_LP_QDEPTH 128
166 
167 #define PAPRD_GAIN_TABLE_ENTRIES 32
168 #define PAPRD_TABLE_SZ 24
169 
172 };
173 
179 };
180 
197 };
198 
200  u32 hw_caps; /* ATH9K_HW_CAP_* from ath9k_hw_caps */
214 };
215 
220  int ack_6mb;
236 #define SPUR_DISABLE 0
237 #define SPUR_ENABLE_IOCTL 1
238 #define SPUR_ENABLE_EEPROM 2
239 #define AR_SPUR_5413_1 1640
240 #define AR_SPUR_5413_2 1200
241 #define AR_NO_SPUR 0x8000
242 #define AR_BASE_FREQ_2GHZ 2300
243 #define AR_BASE_FREQ_5GHZ 4900
244 #define AR_SPUR_FEEQ_BOUND_HT40 19
245 #define AR_SPUR_FEEQ_BOUND_HT20 10
246  int spurmode;
249  u16 ani_poll_interval; /* ANI poll interval in ms */
250 };
251 
252 enum ath9k_int {
253  ATH9K_INT_RX = 0x00000001,
254  ATH9K_INT_RXDESC = 0x00000002,
255  ATH9K_INT_RXHP = 0x00000001,
256  ATH9K_INT_RXLP = 0x00000002,
257  ATH9K_INT_RXNOFRM = 0x00000008,
258  ATH9K_INT_RXEOL = 0x00000010,
259  ATH9K_INT_RXORN = 0x00000020,
260  ATH9K_INT_TX = 0x00000040,
261  ATH9K_INT_TXDESC = 0x00000080,
262  ATH9K_INT_TIM_TIMER = 0x00000100,
263  ATH9K_INT_BB_WATCHDOG = 0x00000400,
264  ATH9K_INT_TXURN = 0x00000800,
265  ATH9K_INT_MIB = 0x00001000,
266  ATH9K_INT_RXPHY = 0x00004000,
267  ATH9K_INT_RXKCM = 0x00008000,
268  ATH9K_INT_SWBA = 0x00010000,
269  ATH9K_INT_BMISS = 0x00040000,
270  ATH9K_INT_BNR = 0x00100000,
271  ATH9K_INT_TIM = 0x00200000,
272  ATH9K_INT_DTIM = 0x00400000,
273  ATH9K_INT_DTIMSYNC = 0x00800000,
274  ATH9K_INT_GPIO = 0x01000000,
275  ATH9K_INT_CABEND = 0x02000000,
276  ATH9K_INT_TSFOOR = 0x04000000,
277  ATH9K_INT_GENTIMER = 0x08000000,
278  ATH9K_INT_CST = 0x10000000,
279  ATH9K_INT_GTT = 0x20000000,
280  ATH9K_INT_FATAL = 0x40000000,
281  ATH9K_INT_GLOBAL = 0x80000000,
293  ATH9K_INT_MIB |
299  ATH9K_INT_NOCARD = 0xffffffff
300 };
301 
302 #define CHANNEL_CW_INT 0x00002
303 #define CHANNEL_CCK 0x00020
304 #define CHANNEL_OFDM 0x00040
305 #define CHANNEL_2GHZ 0x00080
306 #define CHANNEL_5GHZ 0x00100
307 #define CHANNEL_PASSIVE 0x00200
308 #define CHANNEL_DYN 0x00400
309 #define CHANNEL_HALF 0x04000
310 #define CHANNEL_QUARTER 0x08000
311 #define CHANNEL_HT20 0x10000
312 #define CHANNEL_HT40PLUS 0x20000
313 #define CHANNEL_HT40MINUS 0x40000
314 
315 #define CHANNEL_A (CHANNEL_5GHZ|CHANNEL_OFDM)
316 #define CHANNEL_B (CHANNEL_2GHZ|CHANNEL_CCK)
317 #define CHANNEL_G (CHANNEL_2GHZ|CHANNEL_OFDM)
318 #define CHANNEL_G_HT20 (CHANNEL_2GHZ|CHANNEL_HT20)
319 #define CHANNEL_A_HT20 (CHANNEL_5GHZ|CHANNEL_HT20)
320 #define CHANNEL_G_HT40PLUS (CHANNEL_2GHZ|CHANNEL_HT40PLUS)
321 #define CHANNEL_G_HT40MINUS (CHANNEL_2GHZ|CHANNEL_HT40MINUS)
322 #define CHANNEL_A_HT40PLUS (CHANNEL_5GHZ|CHANNEL_HT40PLUS)
323 #define CHANNEL_A_HT40MINUS (CHANNEL_5GHZ|CHANNEL_HT40MINUS)
324 #define CHANNEL_ALL \
325  (CHANNEL_OFDM| \
326  CHANNEL_CCK| \
327  CHANNEL_2GHZ | \
328  CHANNEL_5GHZ | \
329  CHANNEL_HT20 | \
330  CHANNEL_HT40PLUS | \
331  CHANNEL_HT40MINUS)
332 
345 };
346 
354 };
355 
356 #define IS_CHAN_G(_c) ((((_c)->channelFlags & (CHANNEL_G)) == CHANNEL_G) || \
357  (((_c)->channelFlags & CHANNEL_G_HT20) == CHANNEL_G_HT20) || \
358  (((_c)->channelFlags & CHANNEL_G_HT40PLUS) == CHANNEL_G_HT40PLUS) || \
359  (((_c)->channelFlags & CHANNEL_G_HT40MINUS) == CHANNEL_G_HT40MINUS))
360 #define IS_CHAN_OFDM(_c) (((_c)->channelFlags & CHANNEL_OFDM) != 0)
361 #define IS_CHAN_5GHZ(_c) (((_c)->channelFlags & CHANNEL_5GHZ) != 0)
362 #define IS_CHAN_2GHZ(_c) (((_c)->channelFlags & CHANNEL_2GHZ) != 0)
363 #define IS_CHAN_HALF_RATE(_c) (((_c)->channelFlags & CHANNEL_HALF) != 0)
364 #define IS_CHAN_QUARTER_RATE(_c) (((_c)->channelFlags & CHANNEL_QUARTER) != 0)
365 #define IS_CHAN_A_FAST_CLOCK(_ah, _c) \
366  ((((_c)->channelFlags & CHANNEL_5GHZ) != 0) && \
367  ((_ah)->caps.hw_caps & ATH9K_HW_CAP_FASTCLOCK))
368 
369 /* These macros check chanmode and not channelFlags */
370 #define IS_CHAN_B(_c) ((_c)->chanmode == CHANNEL_B)
371 #define IS_CHAN_HT20(_c) (((_c)->chanmode == CHANNEL_A_HT20) || \
372  ((_c)->chanmode == CHANNEL_G_HT20))
373 #define IS_CHAN_HT40(_c) (((_c)->chanmode == CHANNEL_A_HT40PLUS) || \
374  ((_c)->chanmode == CHANNEL_A_HT40MINUS) || \
375  ((_c)->chanmode == CHANNEL_G_HT40PLUS) || \
376  ((_c)->chanmode == CHANNEL_G_HT40MINUS))
377 #define IS_CHAN_HT(_c) (IS_CHAN_HT20((_c)) || IS_CHAN_HT40((_c)))
378 
384 };
385 
392 };
393 
398 };
399 
404 };
405 
410 #define ATH9K_BEACON_PERIOD 0x0000ffff
411 #define ATH9K_TSFOOR_THRESHOLD 0x00004240 /* 16k us */
420 };
421 
422 struct chan_centers {
426 };
427 
428 enum {
432 };
433 
445 };
446 
447 /* Generic TSF timer definitions */
448 
449 #define ATH_MAX_GEN_TIMER 16
450 
451 #define AR_GENTMR_BIT(_index) (1 << (_index))
452 
453 /*
454  * Using de Bruijin sequence to look up 1's index in a 32 bit number
455  * debruijn32 = 0000 0111 0111 1100 1011 0101 0011 0001
456  */
457 #define debruijn32 0x077CB531U
458 
464 };
465 
467  void (*trigger)(void *arg);
468  void (*overflow)(void *arg);
469  void *arg;
471 };
472 
476  union {
477  unsigned long timer_bits;
479  } timer_mask;
480 };
481 
490 };
491 
492 /**
493  * struct ath_hw_radar_conf - radar detection initialization parameters
494  *
495  * @pulse_inband: threshold for checking the ratio of in-band power
496  * to total power for short radar pulses (half dB steps)
497  * @pulse_inband_step: threshold for checking an in-band power to total
498  * power ratio increase for short radar pulses (half dB steps)
499  * @pulse_height: threshold for detecting the beginning of a short
500  * radar pulse (dB step)
501  * @pulse_rssi: threshold for detecting if a short radar pulse is
502  * gone (dB step)
503  * @pulse_maxlen: maximum pulse length (0.8 us steps)
504  *
505  * @radar_rssi: RSSI threshold for starting long radar detection (dB steps)
506  * @radar_inband: threshold for checking the ratio of in-band power
507  * to total power for long radar pulses (half dB steps)
508  * @fir_power: threshold for detecting the end of a long radar pulse (dB)
509  *
510  * @ext_channel: enable extension channel radar detection
511  */
513  unsigned int pulse_inband;
514  unsigned int pulse_inband_step;
515  unsigned int pulse_height;
516  unsigned int pulse_rssi;
517  unsigned int pulse_maxlen;
518 
519  unsigned int radar_rssi;
520  unsigned int radar_inband;
522 
524 };
525 
526 /**
527  * struct ath_hw_private_ops - callbacks used internally by hardware code
528  *
529  * This structure contains private callbacks designed to only be used internally
530  * by the hardware core.
531  *
532  * @init_cal_settings: setup types of calibrations supported
533  * @init_cal: starts actual calibration
534  *
535  * @init_mode_regs: Initializes mode registers
536  * @init_mode_gain_regs: Initialize TX/RX gain registers
537  *
538  * @rf_set_freq: change frequency
539  * @spur_mitigate_freq: spur mitigation
540  * @rf_alloc_ext_banks:
541  * @rf_free_ext_banks:
542  * @set_rf_regs:
543  * @compute_pll_control: compute the PLL control value to use for
544  * AR_RTC_PLL_CONTROL for a given channel
545  * @setup_calibration: set up calibration
546  * @iscal_supported: used to query if a type of calibration is supported
547  *
548  * @ani_cache_ini_regs: cache the values for ANI from the initial
549  * register settings through the register initialization.
550  */
552  /* Calibration ops */
553  void (*init_cal_settings)(struct ath_hw *ah);
554  int (*init_cal)(struct ath_hw *ah, struct ath9k_channel *chan);
555 
556  void (*init_mode_regs)(struct ath_hw *ah);
557  void (*init_mode_gain_regs)(struct ath_hw *ah);
558  void (*setup_calibration)(struct ath_hw *ah,
559  struct ath9k_cal_list *currCal);
560 
561  /* PHY ops */
562  int (*rf_set_freq)(struct ath_hw *ah,
563  struct ath9k_channel *chan);
564  void (*spur_mitigate_freq)(struct ath_hw *ah,
565  struct ath9k_channel *chan);
566  int (*rf_alloc_ext_banks)(struct ath_hw *ah);
567  void (*rf_free_ext_banks)(struct ath_hw *ah);
568  int (*set_rf_regs)(struct ath_hw *ah,
569  struct ath9k_channel *chan,
570  u16 modesIndex);
571  void (*set_channel_regs)(struct ath_hw *ah, struct ath9k_channel *chan);
572  void (*init_bb)(struct ath_hw *ah,
573  struct ath9k_channel *chan);
574  int (*process_ini)(struct ath_hw *ah, struct ath9k_channel *chan);
575  void (*olc_init)(struct ath_hw *ah);
576  void (*set_rfmode)(struct ath_hw *ah, struct ath9k_channel *chan);
577  void (*mark_phy_inactive)(struct ath_hw *ah);
578  void (*set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan);
579  int (*rfbus_req)(struct ath_hw *ah);
580  void (*rfbus_done)(struct ath_hw *ah);
581  void (*restore_chainmask)(struct ath_hw *ah);
582  void (*set_diversity)(struct ath_hw *ah, int value);
584  struct ath9k_channel *chan);
585  int (*ani_control)(struct ath_hw *ah, enum ath9k_ani_cmd cmd,
586  int param);
587  void (*do_getnf)(struct ath_hw *ah, int16_t nfarray[NUM_NF_READINGS]);
588  void (*set_radar_params)(struct ath_hw *ah,
589  struct ath_hw_radar_conf *conf);
590 
591  /* ANI */
592  void (*ani_cache_ini_regs)(struct ath_hw *ah);
593 };
594 
595 /**
596  * struct ath_hw_ops - callbacks used by hardware code and driver code
597  *
598  * This structure contains callbacks designed to to be used internally by
599  * hardware code and also by the lower level driver.
600  *
601  * @config_pci_powersave:
602  * @calibrate: periodic calibration for NF, ANI, IQ, ADC gain, ADC-DC
603  */
604 struct ath_hw_ops {
605  void (*config_pci_powersave)(struct ath_hw *ah,
606  int restore,
607  int power_off);
608  void (*rx_enable)(struct ath_hw *ah);
609  void (*set_desc_link)(void *ds, u32 link);
610  void (*get_desc_link)(void *ds, u32 **link);
611  int (*calibrate)(struct ath_hw *ah,
612  struct ath9k_channel *chan,
613  u8 rxchainmask,
614  int longcal);
615  int (*get_isr)(struct ath_hw *ah, enum ath9k_int *masked);
616  void (*fill_txdesc)(struct ath_hw *ah, void *ds, u32 seglen,
617  int is_firstseg, int is_is_lastseg,
618  const void *ds0, u32 buf_addr,
619  unsigned int qcu);
620  int (*proc_txdesc)(struct ath_hw *ah, void *ds,
621  struct ath_tx_status *ts);
622  void (*set11n_txdesc)(struct ath_hw *ah, void *ds,
623  u32 pktLen, enum ath9k_pkt_type type,
624  u32 txPower, u32 keyIx,
625  enum ath9k_key_type keyType,
626  u32 flags);
627  void (*set11n_ratescenario)(struct ath_hw *ah, void *ds,
628  void *lastds,
629  u32 durUpdateEn, u32 rtsctsRate,
630  u32 rtsctsDuration,
631  struct ath9k_11n_rate_series series[],
632  u32 nseries, u32 flags);
633  void (*set11n_aggr_first)(struct ath_hw *ah, void *ds,
634  u32 aggrLen);
635  void (*set11n_aggr_middle)(struct ath_hw *ah, void *ds,
636  u32 numDelims);
637  void (*set11n_aggr_last)(struct ath_hw *ah, void *ds);
638  void (*clr11n_aggr)(struct ath_hw *ah, void *ds);
639  void (*set_clrdmask)(struct ath_hw *ah, void *ds, int val);
640  void (*antdiv_comb_conf_get)(struct ath_hw *ah,
641  struct ath_hw_antcomb_conf *antconf);
642  void (*antdiv_comb_conf_set)(struct ath_hw *ah,
643  struct ath_hw_antcomb_conf *antconf);
644 
645 };
646 
651 };
652 
653 /* ah_flags */
654 #define AH_USE_EEPROM 0x1
655 #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */
656 
657 struct ath_hw {
658  struct ath_ops reg_ops;
659 
667 
668  union {
673  } eeprom;
674  const struct eeprom_ops *eep_ops;
675 
681 
689 
691 
693 
698 
700  int ah_ier;
710 
711  /* Calibration */
720 #define totalPowerMeasI meas0.unsign
721 #define totalPowerMeasQ meas1.unsign
722 #define totalIqCorrMeas meas2.sign
723 #define totalAdcIOddPhase meas0.unsign
724 #define totalAdcIEvenPhase meas1.unsign
725 #define totalAdcQOddPhase meas2.unsign
726 #define totalAdcQEvenPhase meas3.unsign
727 #define totalAdcDcOffsetIOddPhase meas0.sign
728 #define totalAdcDcOffsetIEvenPhase meas1.sign
729 #define totalAdcDcOffsetQOddPhase meas2.sign
730 #define totalAdcDcOffsetQEvenPhase meas3.sign
731  union {
734  } meas0;
735  union {
738  } meas1;
739  union {
742  } meas2;
743  union {
746  } meas3;
748 
751  enum {
756 
757  /* Private to hardware code */
759  /* Accessed by the lower level driver */
760  struct ath_hw_ops ops;
761 
762  /* Used to program the radio on non single-chip devices */
772 
777 
778  /* ANI */
782  int coarse_high[5];
783  int coarse_low[5];
784  int firpwr[5];
786 
790 
792 
796  int led_pin;
799 
825 
830 
834 
836  void *ts_start;
841 
842  unsigned int paprd_target_power;
843  unsigned int paprd_training_power;
844  unsigned int paprd_ratemask;
845  unsigned int paprd_ratemask_ht40;
849  /*
850  * Store the permanent value of Reg 0x4004in WARegVal
851  * so we dont have to R/M/W. We should not be reading
852  * this register when in sleep states.
853  */
855 
856  /* Enterprise mode cap */
858 
860 };
861 
862 struct ath_bus_ops {
864  void (*read_cachesize)(struct ath_common *common, int *csz);
865  int (*eeprom_read)(struct ath_common *common, u32 off, u16 *data);
866  void (*bt_coex_prep)(struct ath_common *common);
867  void (*extn_synch_en)(struct ath_common *common);
868 };
869 
870 static inline struct ath_common *ath9k_hw_common(struct ath_hw *ah)
871 {
872  return &ah->common;
873 }
874 
875 static inline struct ath_regulatory *ath9k_hw_regulatory(struct ath_hw *ah)
876 {
877  return &(ath9k_hw_common(ah)->regulatory);
878 }
879 
880 static inline struct ath_hw_private_ops *ath9k_hw_private_ops(struct ath_hw *ah)
881 {
882  return &ah->private_ops;
883 }
884 
885 static inline struct ath_hw_ops *ath9k_hw_ops(struct ath_hw *ah)
886 {
887  return &ah->ops;
888 }
889 
890 static inline u8 get_streams(int mask)
891 {
892  return !!(mask & BIT(0)) + !!(mask & BIT(1)) + !!(mask & BIT(2));
893 }
894 
895 /* Initialization, Detach, Reset */
896 const char *ath9k_hw_probe(u16 vendorid, u16 devid);
897 void ath9k_hw_deinit(struct ath_hw *ah);
898 int ath9k_hw_init(struct ath_hw *ah);
899 int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
900  struct ath9k_hw_cal_data *caldata, int bChannelChange);
901 int ath9k_hw_fill_cap_info(struct ath_hw *ah);
902 u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan);
903 
904 /* GPIO / RFKILL / Antennae */
905 void ath9k_hw_cfg_gpio_input(struct ath_hw *ah, u32 gpio);
907 void ath9k_hw_cfg_output(struct ath_hw *ah, u32 gpio,
908  u32 ah_signal_type);
909 void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val);
911 void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna);
912 
913 /* General Operation */
914 int ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout);
915 void ath9k_hw_write_array(struct ath_hw *ah, struct ar5416IniArray *array,
916  int column, unsigned int *writecnt);
919  u8 phy, int kbps,
920  u32 frameLen, u16 rateix, int shortPreamble);
922  struct ath9k_channel *chan,
923  struct chan_centers *centers);
925 void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits);
926 int ath9k_hw_phy_disable(struct ath_hw *ah);
927 int ath9k_hw_disable(struct ath_hw *ah);
928 void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, int test);
929 void ath9k_hw_setopmode(struct ath_hw *ah);
930 void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1);
931 void ath9k_hw_setbssidmask(struct ath_hw *ah);
932 void ath9k_hw_write_associd(struct ath_hw *ah);
935 void ath9k_hw_set11nmac2040(struct ath_hw *ah);
936 int ath9k_hw_check_alive(struct ath_hw *ah);
937 
938 int ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode);
939 
940 void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len);
941 
942 /* HTC */
943 void ath9k_hw_htc_resetinit(struct ath_hw *ah);
944 
945 /* PHY */
946 void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled,
947  u32 *coef_mantissa, u32 *coef_exponent);
948 
949 /*
950  * Code Specific to AR5008, AR9001 or AR9002,
951  * we stuff these here to avoid callbacks for AR9003.
952  */
954 int ar9002_hw_rf_claim(struct ath_hw *ah);
958 
959 /*
960  * Code specific to AR9003, we stuff these here to avoid callbacks
961  * for older families
962  */
964 
965 /* Hardware family op attach helpers */
966 void ar5008_hw_attach_phy_ops(struct ath_hw *ah);
967 void ar9002_hw_attach_phy_ops(struct ath_hw *ah);
968 void ar9003_hw_attach_phy_ops(struct ath_hw *ah);
969 
970 void ar9002_hw_attach_calib_ops(struct ath_hw *ah);
971 void ar9003_hw_attach_calib_ops(struct ath_hw *ah);
972 
973 void ar9002_hw_attach_ops(struct ath_hw *ah);
974 void ar9003_hw_attach_ops(struct ath_hw *ah);
975 
976 void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan);
977 /*
978  * ANI work can be shared between all families but a next
979  * generation implementation of ANI will be used only for AR9003 only
980  * for now as the other families still need to be tested with the same
981  * next generation ANI. Feel free to start testing it though for the
982  * older families (AR5008, AR9001, AR9002) by using modparam_force_new_ani.
983  */
984 extern int modparam_force_new_ani;
985 void ath9k_ani_reset(struct ath_hw *ah, int is_scanning);
986 void ath9k_hw_proc_mib_event(struct ath_hw *ah);
987 void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan);
988 
989 #define ATH_PCIE_CAP_LINK_CTRL 0x70
990 #define ATH_PCIE_CAP_LINK_L0S 1
991 #define ATH_PCIE_CAP_LINK_L1 2
992 
993 #define ATH9K_CLOCK_RATE_CCK 22
994 #define ATH9K_CLOCK_RATE_5GHZ_OFDM 40
995 #define ATH9K_CLOCK_RATE_2GHZ_OFDM 44
996 #define ATH9K_CLOCK_FAST_RATE_5GHZ_OFDM 44
997 
998 #endif
void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1)
Definition: ath9k_hw.c:1960
#define AR9300_MAX_CHAINS
Definition: ar9003_eeprom.h:50
struct ar5416IniArray iniBank0
Definition: hw.h:802
u32 bs_intval
Definition: hw.h:409
u8 index
Definition: hw.h:470
int pcieSerDesWrite
Definition: hw.h:223
uint16_t u16
Definition: stdint.h:22
u32 rfkill_polarity
Definition: hw.h:687
void(* set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:578
u32 ent_mode
Definition: hw.h:857
u32 proc_phyerr
Definition: hw.h:779
u32 * analogBank7Data
Definition: hw.h:769
u32 txurn_interrupt_mask
Definition: hw.h:707
u8 fast_div_bias
Definition: hw.h:485
int PDADCdelta
Definition: hw.h:795
u16 channel
Definition: hw.h:334
FILE_LICENCE(BSD2)
struct ar5416IniArray iniModes_normal_power_tx_gain_9271
Definition: hw.h:824
u16 channel
Definition: hw.h:350
u32 chanmode
Definition: hw.h:352
u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES]
Definition: hw.h:848
Definition: hw.h:657
struct ath_hw_private_ops private_ops
Definition: hw.h:758
void ath9k_hw_setbssidmask(struct ath_hw *ah)
u16 synth_center
Definition: hw.h:423
u32 intr_txqs
Definition: hw.h:787
int16_t s16
Definition: stdint.h:21
void(* overflow)(void *arg)
Definition: hw.h:468
struct ath_regulatory regulatory
Definition: ath.h:224
int coarse_low[5]
Definition: hw.h:783
void(* read_cachesize)(struct ath_common *common, int *csz)
Definition: hw.h:864
int ar9002_hw_rf_claim(struct ath_hw *ah)
u8 ts_size
Definition: hw.h:840
u16 ts_tail
Definition: hw.h:839
void ath9k_hw_set_gpio(struct ath_hw *ah, u32 gpio, u32 val)
Definition: ath9k_hw.c:1852
u32 enable_ani
Definition: hw.h:232
int spurmode
Definition: hw.h:246
int ath9k_hw_disable(struct ath_hw *ah)
Definition: ath9k_hw.c:1927
struct ath9k_channel * curchan
Definition: hw.h:666
static unsigned int unsigned int reg
Definition: myson.h:162
u32 gpio_mask
Definition: hw.h:797
unsigned int paprd_ratemask_ht40
Definition: hw.h:845
u32 globaltxtimeout
Definition: hw.h:776
void(* init_bb)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:572
void ath9k_hw_cfg_output(struct ath_hw *ah, u32 gpio, u32 ah_signal_type)
Definition: ath9k_hw.c:1831
void __asmcall int val
Definition: setjmp.h:12
int serialize_regmode
Definition: hw.h:233
struct ar5416IniArray iniRadio[ATH_INI_NUM_SPLIT]
Definition: hw.h:828
u32 pcie_waen
Definition: hw.h:225
void ath9k_hw_write_array(struct ath_hw *ah, struct ar5416IniArray *array, int column, unsigned int *writecnt)
Definition: ath9k_hw.c:113
s16 nominal
Definition: hw.h:650
u32 * analogBank0Data
Definition: hw.h:763
enum ath9k_int imask
Definition: hw.h:701
ath_bus_type
Definition: ath.h:126
u32 misc_mode
Definition: hw.h:750
u16 analog5GhzRev
Definition: hw.h:441
Error codes.
void ath9k_hw_setopmode(struct ath_hw *ah)
Definition: ath9k_hw.c:1955
void(* rx_enable)(struct ath_hw *ah)
Definition: hw.h:608
struct ar5416IniArray iniBB[ATH_INI_NUM_SPLIT]
Definition: hw.h:827
void(* rf_free_ext_banks)(struct ath_hw *ah)
Definition: hw.h:567
int sw_beacon_response_time
Definition: hw.h:218
u8 txpower_limit
Definition: hw.h:773
u16 rts_aggr_limit
Definition: hw.h:201
int(* eeprom_read)(struct ath_common *common, u32 off, u16 *data)
Definition: hw.h:865
#define ATH_MAX_GEN_TIMER
Definition: hw.h:449
#define AR_EEPROM_MODAL_SPURS
Definition: eeprom.h:26
uint16_t mode
Acceleration mode.
Definition: ena.h:26
void ar5008_hw_attach_phy_ops(struct ath_hw *ah)
struct ath9k_hw_version hw_version
Definition: hw.h:662
uint32_t type
Operating system type.
Definition: ena.h:12
union ath_hw::@31 meas2
struct ar5416IniArray iniBank1
Definition: hw.h:804
void(* init_cal_settings)(struct ath_hw *ah)
Definition: hw.h:553
void(* spur_mitigate_freq)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:564
int sw_mgmt_crypto
Definition: hw.h:676
u16 ext_center
Definition: hw.h:425
struct ar5416IniArray iniCommon
Definition: hw.h:801
void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
u8 pcie_powersave_enable
Definition: hw.h:222
struct ar5416IniArray iniModesAdditional_40M
Definition: hw.h:814
u16 tx_trig_level
Definition: hw.h:680
int ah_ier
Definition: hw.h:700
ath9k_int
Definition: hw.h:252
enum ath9k_power_mode power_mode
Definition: hw.h:692
u32 * analogBank6Data
Definition: hw.h:767
u32 ath9k_hw_reverse_bits(u32 val, u32 n)
Definition: ath9k_hw.c:127
int(* rf_alloc_ext_banks)(struct ath_hw *ah)
Definition: hw.h:566
int32_t CalValid
Definition: hw.h:336
struct ath_gen_timer_table hw_gen_timers
Definition: hw.h:833
void(* olc_init)(struct ath_hw *ah)
Definition: hw.h:575
struct ath_hw_ops ops
Definition: hw.h:760
u32 cck_trig_low
Definition: hw.h:231
void ath9k_hw_htc_resetinit(struct ath_hw *ah)
u16 bs_bmissthreshold
Definition: hw.h:417
struct ar5416IniArray iniModes_9271_ANI_reg
Definition: hw.h:822
void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits)
Definition: ath9k_hw.c:1895
u32 bs_tsfoor_threshold
Definition: hw.h:419
void(* rfbus_done)(struct ath_hw *ah)
Definition: hw.h:580
struct ar5416IniArray iniSOC[ATH_INI_NUM_SPLIT]
Definition: hw.h:829
unsigned int paprd_training_power
Definition: hw.h:843
#define ATH9K_NUM_CHANNELS
Definition: hw.h:75
struct ar5416IniArray iniCommon_normal_cck_fir_coeff_9271
Definition: hw.h:820
struct ar5416_eeprom_4k map4k
Definition: hw.h:670
struct ath_hw_private_ops - callbacks used internally by hardware code
Definition: hw.h:551
int is_monitoring
Definition: hw.h:678
struct ar5416IniArray iniModesTxGain
Definition: hw.h:816
void * arg
Definition: hw.h:469
void(* clr11n_aggr)(struct ath_hw *ah, void *ds)
Definition: hw.h:638
u32 txok_interrupt_mask
Definition: hw.h:703
#define PAPRD_TABLE_SZ
Definition: hw.h:168
struct ar5416IniArray iniBank6
Definition: hw.h:807
void(* setup_calibration)(struct ath_hw *ah, struct ath9k_cal_list *currCal)
Definition: hw.h:558
struct ath_ops - Register read/write operations
Definition: ath.h:184
u32 ofdm_trig_high
Definition: hw.h:229
int ath9k_hw_check_alive(struct ath_hw *ah)
Definition: ath9k_hw.c:1191
int pcie_lcr_extsync_en
Definition: hw.h:213
struct net80211_channel * chan
Definition: hw.h:348
u32 channelFlags
Definition: hw.h:351
void ath9k_hw_deinit(struct ath_hw *ah)
Definition: ath9k_hw.c:852
u16 subsysid
Definition: hw.h:443
ath9k_tp_scale
Definition: hw.h:386
void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len)
Definition: ath9k_hw.c:2047
int firpwr[5]
Definition: hw.h:784
int ath9k_hw_fill_cap_info(struct ath_hw *ah)
Definition: ath9k_hw.c:1571
struct ar5416IniArray iniCckfirJapan2484
Definition: hw.h:819
struct ath9k_cal_list adcgain_caldata
Definition: hw.h:714
u32 gen_timer_index[32]
Definition: hw.h:474
union ath_gen_timer_table::@27 timer_mask
struct ar5416IniArray iniBank7
Definition: hw.h:809
void(* extn_synch_en)(struct ath_common *common)
Definition: hw.h:867
struct ar5416IniArray iniBank6TPC
Definition: hw.h:808
u32 bs_nexttbtt
Definition: hw.h:407
void(* antdiv_comb_conf_set)(struct ath_hw *ah, struct ath_hw_antcomb_conf *antconf)
Definition: hw.h:642
void(* mark_phy_inactive)(struct ath_hw *ah)
Definition: hw.h:577
u32 aniperiod
Definition: hw.h:780
void(* set11n_aggr_last)(struct ath_hw *ah, void *ds)
Definition: hw.h:637
void ath9k_hw_write_associd(struct ath_hw *ah)
Definition: ath9k_hw.c:1966
const struct eeprom_ops * eep_ops
Definition: hw.h:674
int ath9k_hw_phy_disable(struct ath_hw *ah)
Definition: ath9k_hw.c:1918
int(* get_isr)(struct ath_hw *ah, enum ath9k_int *masked)
Definition: hw.h:615
unsigned int pulse_maxlen
Definition: hw.h:517
void ar9003_hw_attach_ops(struct ath_hw *ah)
int htc_reset_init
Definition: hw.h:690
void ar9002_hw_attach_phy_ops(struct ath_hw *ah)
#define PAPRD_GAIN_TABLE_ENTRIES
Definition: hw.h:167
u32 txdesc_interrupt_mask
Definition: hw.h:705
int ext_channel
Definition: hw.h:523
struct ath9k_cal_list iq_caldata
Definition: hw.h:713
ath_usb_dev
Definition: reg.h:886
void ar9002_hw_cck_chan14_spread(struct ath_hw *ah)
u8 max_txtrig_level
Definition: hw.h:248
int nfcal_pending
Definition: hw.h:340
u16 analog2GhzRev
Definition: hw.h:442
uint32_t array
Array number.
Definition: edd.h:31
int(* process_ini)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:574
struct ar5416Stats stats
Definition: hw.h:696
struct ar9287_eeprom map9287
Definition: hw.h:671
struct ath9k_cal_list adcdc_caldata
Definition: hw.h:715
ath9k_key_type
Definition: mac.h:665
struct ath9k_pacal_info pacal_info
Definition: hw.h:695
u32 txerr_interrupt_mask
Definition: hw.h:704
u32 imrs2_reg
Definition: hw.h:702
void(* bt_coex_prep)(struct ath_common *common)
Definition: hw.h:866
ath9k_power_mode
Definition: hw.h:379
u32 * bank6Temp
Definition: hw.h:771
struct ar5416IniArray iniModes
Definition: hw.h:800
pseudo_bit_t value[0x00020]
Definition: arbel.h:13
void ar9003_hw_attach_calib_ops(struct ath_hw *ah)
void ar9002_hw_enable_wep_aggregation(struct ath_hw *ah)
unsigned int pulse_inband_step
Definition: hw.h:514
unsigned int pulse_height
Definition: hw.h:515
ring len
Length.
Definition: dwmac.h:231
struct ar5416IniArray iniModes_9271_1_0_only
Definition: hw.h:817
ath_hw_txq_subtype
Definition: hw.h:170
static struct ath_regulatory * ath9k_hw_regulatory(struct ath_hw *ah)
Definition: hw.h:875
#define u32
Definition: vga.h:21
int(* set_rf_regs)(struct ath_hw *ah, struct ath9k_channel *chan, u16 modesIndex)
Definition: hw.h:568
struct ath9k_tx_queue_info txq[ATH9K_NUM_TX_QUEUES]
Definition: hw.h:697
unsigned int radar_rssi
Definition: hw.h:519
u32 WARegVal
Definition: hw.h:854
ser_reg_mode
Definition: hw.h:394
u32 link
Link to next descriptor.
Definition: ar9003_mac.h:25
void(* ani_cache_ini_regs)(struct ath_hw *ah)
Definition: hw.h:592
void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, int test)
Definition: ath9k_hw.c:1939
signed char int8_t
Definition: stdint.h:15
void(* trigger)(void *arg)
Definition: hw.h:467
u32 pa_table[AR9300_MAX_CHAINS][PAPRD_TABLE_SZ]
Definition: hw.h:343
int8_t iCoff
Definition: hw.h:337
struct ath9k_ops_config config
Definition: hw.h:663
int need_an_top2_fixup
Definition: hw.h:679
struct ar5416IniArray iniCommon_japan_2484_cck_fir_coeff_9271
Definition: hw.h:821
int totalSizeDesired[5]
Definition: hw.h:781
u32 intr_gen_timer_trigger
Definition: hw.h:831
int fir_power
Definition: hw.h:521
int paprd_table_write_done
Definition: hw.h:846
void ath9k_hw_get_channel_centers(struct ath_hw *ah, struct ath9k_channel *chan, struct chan_centers *centers)
u32 * analogBank1Data
Definition: hw.h:764
int rx_intr_mitigation
Definition: hw.h:234
struct ath_ops reg_ops
Definition: hw.h:658
struct ar5416IniArray iniBank2
Definition: hw.h:805
u16 ani_poll_interval
Definition: hw.h:249
void(* set11n_ratescenario)(struct ath_hw *ah, void *ds, void *lastds, u32 durUpdateEn, u32 rtsctsRate, u32 rtsctsDuration, struct ath9k_11n_rate_series series[], u32 nseries, u32 flags)
Definition: hw.h:627
int ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
Definition: ath9k_hw.c:1534
struct ath_gen_timer * timers[ATH_MAX_GEN_TIMER]
Definition: hw.h:475
u32 * analogBank6TPCData
Definition: hw.h:768
uint8_t flags
Flags.
Definition: ena.h:18
uint16_t limit
Limit.
Definition: librm.h:136
struct ar5416IniArray iniPcieSerdesLowPower
Definition: hw.h:812
struct ar5416IniArray iniBB_RfGain
Definition: hw.h:803
void(* init_mode_regs)(struct ath_hw *ah)
Definition: hw.h:556
unsigned long timer_bits
Definition: hw.h:477
unsigned int paprd_ratemask
Definition: hw.h:844
u32 nf_regs[6]
Definition: hw.h:682
struct ath_hw_radar_conf - radar detection initialization parameters
Definition: hw.h:512
u32 bs_sleepduration
Definition: hw.h:418
u32 originalGain[22]
Definition: hw.h:793
struct hv_monitor_parameter param[4][32]
Parameters.
Definition: hyperv.h:24
union ath_hw::@32 meas3
Structure encapsulating the complete state of an 802.11 device.
Definition: net80211.h:786
u32 ath9k_hw_gpio_get(struct ath_hw *ah, u32 gpio)
Definition: ath9k_hw.c:1804
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan, struct ath9k_hw_cal_data *caldata, int bChannelChange)
Definition: ath9k_hw.c:1218
An 802.11 RF channel.
Definition: net80211.h:385
struct ath_hw_ops - callbacks used by hardware code and driver code
Definition: hw.h:604
void(* set11n_txdesc)(struct ath_hw *ah, void *ds, u32 pktLen, enum ath9k_pkt_type type, u32 txPower, u32 keyIx, enum ath9k_key_type keyType, u32 flags)
Definition: hw.h:622
int(* calibrate)(struct ath_hw *ah, struct ath9k_channel *chan, u8 rxchainmask, int longcal)
Definition: hw.h:611
u32 macVersion
Definition: hw.h:438
u32 gpio_val
Definition: hw.h:798
void ath9k_hw_init_global_settings(struct ath_hw *ah)
Definition: ath9k_hw.c:814
#define ATH9K_NUM_TX_QUEUES
Definition: mac.h:581
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
Definition: hw.h:870
void ar9002_hw_load_ani_reg(struct ath_hw *ah, struct ath9k_channel *chan)
struct ar5416IniArray iniCckfirNormal
Definition: hw.h:818
void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled, u32 *coef_mantissa, u32 *coef_exponent)
void(* config_pci_powersave)(struct ath_hw *ah, int restore, int power_off)
Definition: hw.h:605
struct ar5416IniArray iniModes_high_power_tx_gain_9271
Definition: hw.h:823
void(* init_mode_gain_regs)(struct ath_hw *ah)
Definition: hw.h:557
void ath9k_hw_setantenna(struct ath_hw *ah, u32 antenna)
Definition: ath9k_hw.c:1873
u32 supp_cals
Definition: hw.h:712
int nfcal_interference
Definition: hw.h:341
unsigned int radar_inband
Definition: hw.h:520
struct ath9k_cal_list * cal_list_last
Definition: hw.h:718
u32 atim_window
Definition: hw.h:709
u8 analog_shiftreg
Definition: hw.h:226
void(* set_clrdmask)(struct ath_hw *ah, void *ds, int val)
Definition: hw.h:639
enum ath9k_ani_cmd ani_function
Definition: hw.h:785
unsigned int pulse_rssi
Definition: hw.h:516
u8 rxchainmask
Definition: hw.h:789
u16 spurchans[AR_EEPROM_MODAL_SPURS][2]
Definition: hw.h:247
int coarse_high[5]
Definition: hw.h:782
struct ib_cm_common common
Definition: ib_mad.h:12
void ath9k_hw_set11nmac2040(struct ath_hw *ah)
Definition: ath9k_hw.c:1975
uint32_t ds
Definition: librm.h:140
s16 min
Definition: hw.h:649
void(* set_rfmode)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:576
int ath9k_hw_init(struct ath_hw *ah)
Definition: ath9k_hw.c:571
struct net80211_device * dev
Definition: hw.h:660
int modparam_force_new_ani
u32 * analogBank3Data
Definition: hw.h:766
int16_t curchan_rad_index
Definition: hw.h:699
void(* set_diversity)(struct ath_hw *ah, int value)
Definition: hw.h:582
enum ath_bus_type ath_bus_type
Definition: hw.h:863
union ath_hw::@30 meas1
#define AR5416_MAX_CHAINS
Definition: eeprom.h:160
unsigned int paprd_target_power
Definition: hw.h:842
u16 devid
Definition: hw.h:436
int ack_6mb
Definition: hw.h:220
void ar9002_hw_attach_calib_ops(struct ath_hw *ah)
u32 ah_flags
Definition: hw.h:688
s16 noisefloor
Definition: hw.h:353
struct ar9300_eeprom ar9300_eep
Definition: hw.h:672
u16 subvendorid
Definition: hw.h:437
static struct ath_hw_ops * ath9k_hw_ops(struct ath_hw *ah)
Definition: hw.h:885
struct ath9k_cal_list tempCompCalData
Definition: hw.h:716
void ath9k_hw_proc_mib_event(struct ath_hw *ah)
int(* proc_txdesc)(struct ath_hw *ah, void *ds, struct ath_tx_status *ts)
Definition: hw.h:620
void ar9002_hw_attach_ops(struct ath_hw *ah)
ath9k_ani_cmd
Definition: ani.h:81
int(* rfbus_req)(struct ath_hw *ah)
Definition: hw.h:579
struct ath_nf_limits nf_2g
Definition: hw.h:683
#define BIT(nr)
Definition: ath.h:34
struct ath_nf_limits nf_5g
Definition: hw.h:684
signed int int32_t
Definition: stdint.h:17
void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
int chip_fullsleep
Definition: hw.h:708
void(* set11n_aggr_middle)(struct ath_hw *ah, void *ds, u32 numDelims)
Definition: hw.h:635
u32 ts_paddr_start
Definition: hw.h:837
struct ar5416IniArray iniModesAdditional
Definition: hw.h:813
void ar9003_hw_disable_phy_restart(struct ath_hw *ah)
u32 * analogBank2Data
Definition: hw.h:765
static volatile void * bits
Definition: bitops.h:28
int initPDADC
Definition: hw.h:794
struct ar9003_txs * ts_ring
Definition: hw.h:835
struct ar5416AniState ani
Definition: hw.h:349
int lna1_lna2_delta
Definition: hw.h:488
struct ath9k_hw_capabilities caps
Definition: hw.h:664
u8 paprd_disable
Definition: hw.h:227
u32 txeol_interrupt_mask
Definition: hw.h:706
union ath_hw::@28 eeprom
int8_t qCoff
Definition: hw.h:338
u32 cwm_ignore_extcca
Definition: hw.h:221
u16 pcie_lcr_offset
Definition: hw.h:212
struct ar5416IniArray iniAddac
Definition: hw.h:810
void ath9k_hw_cfg_gpio_input(struct ath_hw *ah, u32 gpio)
Definition: ath9k_hw.c:1785
int is_pciexpress
Definition: hw.h:677
u16 rfsilent
Definition: hw.h:685
#define NUM_NF_READINGS
Definition: calib.h:31
void ar9002_hw_update_async_fifo(struct ath_hw *ah)
struct ar5416IniArray iniMac[ATH_INI_NUM_SPLIT]
Definition: hw.h:826
u32 channelFlags
Definition: hw.h:335
u16 phyRev
Definition: hw.h:440
int(* ani_control)(struct ath_hw *ah, enum ath9k_ani_cmd cmd, int param)
Definition: hw.h:585
u32 ath9k_hw_getdefantenna(struct ath_hw *ah)
Definition: ath9k_hw.c:1868
uint8_t data[48]
Additional event data.
Definition: ena.h:22
int paprd_done
Definition: hw.h:339
int led_pin
Definition: hw.h:796
u32 magic
Definition: hw.h:435
int additional_swba_backoff
Definition: hw.h:219
void(* antdiv_comb_conf_get)(struct ath_hw *ah, struct ath_hw_antcomb_conf *antconf)
Definition: hw.h:640
const char * ath9k_hw_probe(u16 vendorid, u16 devid)
int(* rf_set_freq)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:562
u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan)
Definition: ath9k_hw.c:869
void(* set11n_aggr_first)(struct ath_hw *ah, void *ds, u32 aggrLen)
Definition: hw.h:633
u32 intr_gen_timer_thresh
Definition: hw.h:832
void(* set_channel_regs)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:571
u16 ath9k_hw_computetxtime(struct ath_hw *ah, u8 phy, int kbps, u32 frameLen, u16 rateix, int shortPreamble)
Definition: ath9k_hw.c:139
struct ath_common common
Definition: hw.h:661
unsigned int pulse_inband
Definition: hw.h:513
struct ath9k_cal_list * cal_list
Definition: hw.h:717
s16 max
Definition: hw.h:648
u8 main_lna_conf
Definition: hw.h:483
union ath_hw::@29 meas0
uint8_t ah
Definition: registers.h:85
A GPIO pin.
Definition: gpio.h:18
ath_ini_subsys
Definition: hw.h:174
void timeout(int)
u32 sta_id1_defaults
Definition: hw.h:749
u32(* compute_pll_control)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:583
void * ts_start
Definition: hw.h:836
void(* set_radar_params)(struct ath_hw *ah, struct ath_hw_radar_conf *conf)
Definition: hw.h:588
u16 bs_cfpperiod
Definition: hw.h:413
int is_clk_25mhz
Definition: hw.h:859
struct ath9k_channel channels[ATH9K_NUM_CHANNELS]
Definition: hw.h:665
signed short int16_t
Definition: stdint.h:16
FILE_SECBOOT(FORBIDDEN)
static struct ath_hw_private_ops * ath9k_hw_private_ops(struct ath_hw *ah)
Definition: hw.h:880
u16 macRev
Definition: hw.h:439
struct ath_hw_radar_conf radar_conf
Definition: hw.h:791
void(* do_getnf)(struct ath_hw *ah, int16_t nfarray[NUM_NF_READINGS])
Definition: hw.h:587
struct ar5416_eeprom_def def
Definition: hw.h:669
u8 txchainmask
Definition: hw.h:788
int coverage_class
Definition: hw.h:774
u32 * addac5416_21
Definition: hw.h:770
void(* restore_chainmask)(struct ath_hw *ah)
Definition: hw.h:581
ath9k_pkt_type
Definition: mac.h:605
struct ath9k_hw_cal_data * caldata
Definition: hw.h:694
u32 bs_cfpnext
Definition: hw.h:415
void ath9k_ani_reset(struct ath_hw *ah, int is_scanning)
Definition: ath9k_ani.c:468
u32 ofdm_trig_low
Definition: hw.h:228
void(* fill_txdesc)(struct ath_hw *ah, void *ds, u32 seglen, int is_firstseg, int is_is_lastseg, const void *ds0, u32 buf_addr, unsigned int qcu)
Definition: hw.h:616
struct ar5416IniArray iniPcieSerdes
Definition: hw.h:811
enum ath_hw::@33 enable_32kHz_clock
u32 ts_paddr_end
Definition: hw.h:838
u16 small_signal_gain[AR9300_MAX_CHAINS]
Definition: hw.h:342
u32 cck_trig_high
Definition: hw.h:230
enum ath_usb_dev usbdev
Definition: hw.h:444
u32 ar9003_get_pll_sqsum_dvc(struct ath_hw *ah)
Definition: ath9k_hw.c:611
ath9k_hw_caps
Definition: hw.h:181
struct golan_eqe_cmd cmd
Definition: CIB_PRM.h:29
u16 bs_cfpmaxduration
Definition: hw.h:414
ath9k_rx_qtype
Definition: hw.h:400
u32 unsign[AR5416_MAX_CHAINS]
Definition: hw.h:732
struct ar5416IniArray iniBank3
Definition: hw.h:806
u8 pcie_clock_req
Definition: hw.h:224
void(* get_desc_link)(void *ds, u32 **link)
Definition: hw.h:610
static u8 get_streams(int mask)
Definition: hw.h:890
struct ath9k_cal_list * cal_list_curr
Definition: hw.h:719
u32 rfkill_gpio
Definition: hw.h:686
uint8_t u8
Definition: stdint.h:20
static int test
Definition: epic100.c:73
u32 bs_nextdtim
Definition: hw.h:408
int tx_intr_mitigation
Definition: hw.h:235
uint32_t u32
Definition: stdint.h:24
struct ar5416IniArray iniModesRxGain
Definition: hw.h:815
u32 ath9k_hw_getrxfilter(struct ath_hw *ah)
Definition: ath9k_hw.c:1882
int(* init_cal)(struct ath_hw *ah, struct ath9k_channel *chan)
Definition: hw.h:554
u32 bs_dtimperiod
Definition: hw.h:412
u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES]
Definition: hw.h:847
void ar9002_hw_enable_async_fifo(struct ath_hw *ah)
u16 bs_timoffset
Definition: hw.h:416
struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS]
Definition: hw.h:344
int32_t sign[AR5416_MAX_CHAINS]
Definition: hw.h:733
u16 cal_samples
Definition: hw.h:747
int ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout)
Definition: ath9k_hw.c:95
int dma_beacon_response_time
Definition: hw.h:217
void(* set_desc_link)(void *ds, u32 link)
Definition: hw.h:609
u32 slottime
Definition: hw.h:775
u16 ctl_center
Definition: hw.h:424