iPXE
ath9k_eeprom_def.c File Reference
#include <ipxe/io.h>
#include "hw.h"
#include "ar9002_phy.h"

Go to the source code of this file.

Macros

#define SIZE_EEPROM_DEF   (sizeof(struct ar5416_eeprom_def) / sizeof(u16))
#define XPA_LVL_FREQ(cnt)
#define NUM_PDADC(diff)
#define SM_PD_GAIN(x)
#define SM_PDGAIN_B(x, y)
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN   6 /* 10*log10(2)*2 */
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN   9 /* 10*log10(3)*2 */
#define RT_AR_DELTA(x)
#define EEP_DEF_SPURCHAN    (ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan)

Functions

 FILE_SECBOOT (FORBIDDEN)
static void ath9k_get_txgain_index (struct ath_hw *ah, struct ath9k_channel *chan, struct calDataPerFreqOpLoop *rawDatasetOpLoop, u8 *calChans, u16 availPiers, u8 *pwr, u8 *pcdacIdx)
static void ath9k_olc_get_pdadcs (struct ath_hw *ah, u32 initTxGain, int txPower, u8 *pPDADCValues)
static int ath9k_hw_def_get_eeprom_ver (struct ath_hw *ah)
static int ath9k_hw_def_get_eeprom_rev (struct ath_hw *ah)
static int __ath9k_hw_def_fill_eeprom (struct ath_hw *ah)
static int __ath9k_hw_usb_def_fill_eeprom (struct ath_hw *ah)
static int ath9k_hw_def_fill_eeprom (struct ath_hw *ah)
static int ath9k_hw_def_check_eeprom (struct ath_hw *ah)
static u32 ath9k_hw_def_get_eeprom (struct ath_hw *ah, enum eeprom_param param)
static void ath9k_hw_def_set_gain (struct ath_hw *ah, struct modal_eep_header *pModal, struct ar5416_eeprom_def *eep, u8 txRxAttenLocal, int regChainOffset, int i)
static void ath9k_hw_def_set_board_values (struct ath_hw *ah, struct ath9k_channel *chan)
static void ath9k_hw_def_set_addac (struct ath_hw *ah, struct ath9k_channel *chan)
static int16_t ath9k_change_gain_boundary_setting (struct ath_hw *ah, u16 *gb, u16 numXpdGain, u16 pdGainOverlap_t2, int8_t pwr_table_offset, int16_t *diff)
static void ath9k_adjust_pdadc_values (struct ath_hw *ah, int8_t pwr_table_offset, int16_t diff, u8 *pdadcValues)
static void ath9k_hw_set_def_power_cal_table (struct ath_hw *ah, struct ath9k_channel *chan, int16_t *pTxPowerIndexOffset)
static void ath9k_hw_set_def_power_per_rate_table (struct ath_hw *ah, struct ath9k_channel *chan, int16_t *ratesArray, u16 cfgCtl, u16 AntennaReduction, u16 twiceMaxRegulatoryPower, u16 powerLimit)
static void ath9k_hw_def_set_txpower (struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test)
static u16 ath9k_hw_def_get_spur_channel (struct ath_hw *ah, u16 i, int is2GHz)

Variables

const struct eeprom_ops eep_def_ops

Macro Definition Documentation

◆ SIZE_EEPROM_DEF

#define SIZE_EEPROM_DEF   (sizeof(struct ar5416_eeprom_def) / sizeof(u16))

◆ XPA_LVL_FREQ

#define XPA_LVL_FREQ ( cnt)
Value:
(pModal->xpaBiasLvlFreq[cnt])

Referenced by ath9k_hw_def_set_addac().

◆ NUM_PDADC

#define NUM_PDADC ( diff)
Value:
#define AR5416_NUM_PDADC_VALUES
Definition eeprom.h:157

Referenced by ath9k_adjust_pdadc_values().

◆ SM_PD_GAIN

#define SM_PD_GAIN ( x)
Value:
SM(0x38, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##x)
#define SM(_v, _f)
Definition hw.h:102
static unsigned int x
Definition pixbuf.h:63

Referenced by ath9k_hw_set_def_power_cal_table().

◆ SM_PDGAIN_B

#define SM_PDGAIN_B ( x,
y )
Value:
SM((gainBoundaries[x]), AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##y)
static unsigned int unsigned int y
Definition pixbuf.h:63

Referenced by ath9k_hw_set_def_power_cal_table().

◆ REDUCE_SCALED_POWER_BY_TWO_CHAIN

#define REDUCE_SCALED_POWER_BY_TWO_CHAIN   6 /* 10*log10(2)*2 */

◆ REDUCE_SCALED_POWER_BY_THREE_CHAIN

#define REDUCE_SCALED_POWER_BY_THREE_CHAIN   9 /* 10*log10(3)*2 */

◆ RT_AR_DELTA

#define RT_AR_DELTA ( x)
Value:
(ratesArray[x] - cck_ofdm_delta)

Referenced by ath9k_hw_def_set_txpower().

◆ EEP_DEF_SPURCHAN

#define EEP_DEF_SPURCHAN    (ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan)

Function Documentation

◆ FILE_SECBOOT()

FILE_SECBOOT ( FORBIDDEN )

◆ ath9k_get_txgain_index()

void ath9k_get_txgain_index ( struct ath_hw * ah,
struct ath9k_channel * chan,
struct calDataPerFreqOpLoop * rawDatasetOpLoop,
u8 * calChans,
u16 availPiers,
u8 * pwr,
u8 * pcdacIdx )
static

Definition at line 27 of file ath9k_eeprom_def.c.

31{
32 u8 pcdac, i = 0;
33 u16 idxL = 0, idxR = 0, numPiers;
34 int match;
35 struct chan_centers centers;
36
37 ath9k_hw_get_channel_centers(ah, chan, &centers);
38
39 for (numPiers = 0; numPiers < availPiers; numPiers++)
40 if (calChans[numPiers] == AR5416_BCHAN_UNUSED)
41 break;
42
44 (u8)FREQ2FBIN(centers.synth_center, IS_CHAN_2GHZ(chan)),
45 calChans, numPiers, &idxL, &idxR);
46 if (match) {
47 pcdac = rawDatasetOpLoop[idxL].pcdac[0][0];
48 *pwr = rawDatasetOpLoop[idxL].pwrPdg[0][0];
49 } else {
50 pcdac = rawDatasetOpLoop[idxR].pcdac[0][0];
51 *pwr = (rawDatasetOpLoop[idxL].pwrPdg[0][0] +
52 rawDatasetOpLoop[idxR].pwrPdg[0][0])/2;
53 }
54
55 while (pcdac > ah->originalGain[i] &&
57 i++;
58
59 *pcdacIdx = i;
60}
#define AR9280_TX_GAIN_TABLE_SIZE
Definition eeprom.h:183
#define FREQ2FBIN(x, y)
Definition eeprom.h:103
#define AR5416_BCHAN_UNUSED
Definition eeprom.h:158
int ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize, u16 *indexL, u16 *indexR)
void ath9k_hw_get_channel_centers(struct ath_hw *ah __unused, struct ath9k_channel *chan, struct chan_centers *centers)
Definition ath9k_hw.c:191
#define IS_CHAN_2GHZ(_c)
Definition hw.h:362
#define u8
Definition igbvf_osdep.h:40
uint8_t ah
Definition registers.h:1
#define u16
Definition vga.h:20

References ah, AR5416_BCHAN_UNUSED, AR9280_TX_GAIN_TABLE_SIZE, ath9k_hw_get_channel_centers(), ath9k_hw_get_lower_upper_index(), FREQ2FBIN, IS_CHAN_2GHZ, calDataPerFreqOpLoop::pcdac, calDataPerFreqOpLoop::pwrPdg, chan_centers::synth_center, u16, and u8.

Referenced by ath9k_hw_set_def_power_cal_table().

◆ ath9k_olc_get_pdadcs()

void ath9k_olc_get_pdadcs ( struct ath_hw * ah,
u32 initTxGain,
int txPower,
u8 * pPDADCValues )
static

Definition at line 62 of file ath9k_eeprom_def.c.

66{
67 u32 i;
68 u32 offset;
69
74
77
78 offset = txPower;
79 for (i = 0; i < AR5416_NUM_PDADC_VALUES; i++)
80 if (i < offset)
81 pPDADCValues[i] = 0x0;
82 else
83 pPDADCValues[i] = 0xFF;
84}
#define AR_PHY_TX_PWRCTRL6_1
Definition ar9002_phy.h:481
#define AR_PHY_TX_PWRCTRL7
Definition ar9002_phy.h:485
#define AR_PHY_TX_PWRCTRL_ERR_EST_MODE
Definition ar9002_phy.h:482
#define AR_PHY_TX_PWRCTRL6_0
Definition ar9002_phy.h:480
#define AR_PHY_TX_PWRCTRL_INIT_TX_GAIN
Definition ar9002_phy.h:486
uint16_t offset
Offset to command line.
Definition bzimage.h:3
#define REG_RMW_FIELD(_a, _r, _f, _v)
Definition hw.h:104
#define u32
Definition vga.h:21

References ah, AR5416_NUM_PDADC_VALUES, AR_PHY_TX_PWRCTRL6_0, AR_PHY_TX_PWRCTRL6_1, AR_PHY_TX_PWRCTRL7, AR_PHY_TX_PWRCTRL_ERR_EST_MODE, AR_PHY_TX_PWRCTRL_INIT_TX_GAIN, offset, REG_RMW_FIELD, u32, and u8.

Referenced by ath9k_hw_set_def_power_cal_table().

◆ ath9k_hw_def_get_eeprom_ver()

int ath9k_hw_def_get_eeprom_ver ( struct ath_hw * ah)
static

Definition at line 86 of file ath9k_eeprom_def.c.

87{
88 return ((ah->eeprom.def.baseEepHeader.version >> 12) & 0xF);
89}

References ah.

◆ ath9k_hw_def_get_eeprom_rev()

int ath9k_hw_def_get_eeprom_rev ( struct ath_hw * ah)
static

Definition at line 91 of file ath9k_eeprom_def.c.

92{
93 return ((ah->eeprom.def.baseEepHeader.version) & 0xFFF);
94}

References ah.

◆ __ath9k_hw_def_fill_eeprom()

int __ath9k_hw_def_fill_eeprom ( struct ath_hw * ah)
static

Definition at line 98 of file ath9k_eeprom_def.c.

99{
101 u16 *eep_data = (u16 *)&ah->eeprom.def;
102 unsigned int addr;
103 int ar5416_eep_start_loc = 0x100;
104
105 for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) {
106 if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc,
107 eep_data)) {
108 DBG("ath9k: "
109 "Unable to read eeprom region\n");
110 return 0;
111 }
112 eep_data++;
113 }
114 return 1;
115}
int ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
#define SIZE_EEPROM_DEF
uint32_t addr
Buffer address.
Definition dwmac.h:9
#define DBG(...)
Print a debugging message.
Definition compiler.h:498
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
Definition hw.h:870
struct ib_cm_common common
Definition ib_mad.h:0

References addr, ah, ath9k_hw_common(), ath9k_hw_nvram_read(), common, DBG, SIZE_EEPROM_DEF, and u16.

Referenced by ath9k_hw_def_fill_eeprom().

◆ __ath9k_hw_usb_def_fill_eeprom()

int __ath9k_hw_usb_def_fill_eeprom ( struct ath_hw * ah)
static

Definition at line 117 of file ath9k_eeprom_def.c.

118{
119 u16 *eep_data = (u16 *)&ah->eeprom.def;
120
122 0x100, SIZE_EEPROM_DEF);
123 return 1;
124}
void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data, int eep_start_loc, int size)

References ah, ath9k_hw_usb_gen_fill_eeprom(), SIZE_EEPROM_DEF, and u16.

Referenced by ath9k_hw_def_fill_eeprom().

◆ ath9k_hw_def_fill_eeprom()

int ath9k_hw_def_fill_eeprom ( struct ath_hw * ah)
static

Definition at line 126 of file ath9k_eeprom_def.c.

127{
129
130 if (!ath9k_hw_use_flash(ah)) {
131 DBG2("ath9k: "
132 "Reading from EEPROM, not flash\n");
133 }
134
135 if (common->bus_ops->ath_bus_type == ATH_USB)
137 else
139}
#define ath9k_hw_use_flash(_ah)
Definition eeprom.h:104
static int __ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
static int __ath9k_hw_usb_def_fill_eeprom(struct ath_hw *ah)
@ ATH_USB
Definition ath.h:129
#define DBG2(...)
Definition compiler.h:515

References __ath9k_hw_def_fill_eeprom(), __ath9k_hw_usb_def_fill_eeprom(), ah, ath9k_hw_common(), ath9k_hw_use_flash, ATH_USB, common, and DBG2.

◆ ath9k_hw_def_check_eeprom()

int ath9k_hw_def_check_eeprom ( struct ath_hw * ah)
static

Definition at line 143 of file ath9k_eeprom_def.c.

144{
145 struct ar5416_eeprom_def *eep =
146 (struct ar5416_eeprom_def *) &ah->eeprom.def;
148 u16 *eepdata, temp, magic, magic2;
149 u32 sum = 0, el;
150 int need_swap = 0;
151 unsigned int i, addr, size;
152
154 DBG("ath9k: Reading Magic # failed\n");
155 return 0;
156 }
157
158 if (!ath9k_hw_use_flash(ah)) {
159 DBG2("ath9k: "
160 "Read Magic = 0x%04X\n", magic);
161
162 if (magic != AR5416_EEPROM_MAGIC) {
163 magic2 = swab16(magic);
164
165 if (magic2 == AR5416_EEPROM_MAGIC) {
166 size = sizeof(struct ar5416_eeprom_def);
167 need_swap = 1;
168 eepdata = (u16 *) (&ah->eeprom);
169
170 for (addr = 0; addr < size / sizeof(u16); addr++) {
171 temp = swab16(*eepdata);
172 *eepdata = temp;
173 eepdata++;
174 }
175 } else {
176 DBG("ath9k: "
177 "Invalid EEPROM Magic. Endianness mismatch.\n");
178 return -EINVAL;
179 }
180 }
181 }
182
183 DBG2("ath9k: need_swap = %s.\n",
184 need_swap ? "True" : "False");
185
186 if (need_swap)
187 el = swab16(ah->eeprom.def.baseEepHeader.length);
188 else
189 el = ah->eeprom.def.baseEepHeader.length;
190
191 if (el > sizeof(struct ar5416_eeprom_def))
192 el = sizeof(struct ar5416_eeprom_def) / sizeof(u16);
193 else
194 el = el / sizeof(u16);
195
196 eepdata = (u16 *)(&ah->eeprom);
197
198 for (i = 0; i < el; i++)
199 sum ^= *eepdata++;
200
201 if (need_swap) {
202 u32 integer, j;
203 u16 word;
204
205 DBG("ath9k: "
206 "EEPROM Endianness is not native.. Changing.\n");
207
208 word = swab16(eep->baseEepHeader.length);
209 eep->baseEepHeader.length = word;
210
211 word = swab16(eep->baseEepHeader.checksum);
212 eep->baseEepHeader.checksum = word;
213
214 word = swab16(eep->baseEepHeader.version);
215 eep->baseEepHeader.version = word;
216
217 word = swab16(eep->baseEepHeader.regDmn[0]);
218 eep->baseEepHeader.regDmn[0] = word;
219
220 word = swab16(eep->baseEepHeader.regDmn[1]);
221 eep->baseEepHeader.regDmn[1] = word;
222
223 word = swab16(eep->baseEepHeader.rfSilent);
224 eep->baseEepHeader.rfSilent = word;
225
226 word = swab16(eep->baseEepHeader.blueToothOptions);
227 eep->baseEepHeader.blueToothOptions = word;
228
229 word = swab16(eep->baseEepHeader.deviceCap);
230 eep->baseEepHeader.deviceCap = word;
231
232 for (j = 0; j < ARRAY_SIZE(eep->modalHeader); j++) {
233 struct modal_eep_header *pModal =
234 &eep->modalHeader[j];
235 integer = swab32(pModal->antCtrlCommon);
236 pModal->antCtrlCommon = integer;
237
238 for (i = 0; i < AR5416_MAX_CHAINS; i++) {
239 integer = swab32(pModal->antCtrlChain[i]);
240 pModal->antCtrlChain[i] = integer;
241 }
242 for (i = 0; i < 3; i++) {
243 word = swab16(pModal->xpaBiasLvlFreq[i]);
244 pModal->xpaBiasLvlFreq[i] = word;
245 }
246
247 for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
248 word = swab16(pModal->spurChans[i].spurChan);
249 pModal->spurChans[i].spurChan = word;
250 }
251 }
252 }
253
254 if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR5416_EEP_VER ||
255 ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) {
256 DBG("ath9k: Bad EEPROM checksum 0x%x or revision 0x%04x\n",
257 sum, ah->eep_ops->get_eeprom_ver(ah));
258 return -EINVAL;
259 }
260
261 /* Enable fixup for AR_AN_TOP2 if necessary */
262 if ((ah->hw_version.devid == AR9280_DEVID_PCI) &&
263 ((eep->baseEepHeader.version & 0xff) > 0x0a) &&
264 (eep->baseEepHeader.pwdclkind == 0))
265 ah->need_an_top2_fixup = 1;
266
267 if ((common->bus_ops->ath_bus_type == ATH_USB) &&
268 (AR_SREV_9280(ah)))
269 eep->modalHeader[0].xpaBiasLvl = 0;
270
271 return 0;
272}
#define AR5416_EEP_NO_BACK_VER
Definition eeprom.h:131
#define AR5416_EEP_VER
Definition eeprom.h:132
#define AR5416_EEPROM_MAGIC
Definition eeprom.h:32
#define AR_EEPROM_MODAL_SPURS
Definition eeprom.h:26
#define AR5416_EEPROM_MAGIC_OFFSET
Definition eeprom.h:60
#define AR5416_MAX_CHAINS
Definition eeprom.h:160
#define AR_SREV_9280(_ah)
Definition reg.h:823
#define swab32
Definition ath.h:69
#define swab16
Definition ath.h:68
uint16_t magic
Magic signature.
Definition bzimage.h:1
#define ARRAY_SIZE(x)
Definition efx_common.h:43
uint16_t size
Buffer size.
Definition dwmac.h:3
#define EINVAL
Invalid argument.
Definition errno.h:429
#define AR9280_DEVID_PCI
Definition hw.h:46
if(natsemi->flags &NATSEMI_64BIT) return 1
unsigned short word
Definition smc9000.h:39
u32 antCtrlChain[AR5416_MAX_CHAINS]
Definition eeprom.h:338
u16 xpaBiasLvlFreq[3]
Definition eeprom.h:374
struct spur_chan spurChans[AR_EEPROM_MODAL_SPURS]
Definition eeprom.h:377
u16 spurChan
Definition eeprom.h:332

References addr, ah, modal_eep_header::antCtrlChain, modal_eep_header::antCtrlCommon, AR5416_EEP_NO_BACK_VER, AR5416_EEP_VER, AR5416_EEPROM_MAGIC, AR5416_EEPROM_MAGIC_OFFSET, AR5416_MAX_CHAINS, AR9280_DEVID_PCI, AR_EEPROM_MODAL_SPURS, AR_SREV_9280, ARRAY_SIZE, ath9k_hw_common(), ath9k_hw_nvram_read(), ath9k_hw_use_flash, ATH_USB, ar5416_eeprom_def::baseEepHeader, base_eep_header::blueToothOptions, base_eep_header::checksum, common, DBG, DBG2, base_eep_header::deviceCap, EINVAL, if(), base_eep_header::length, magic, ar5416_eeprom_def::modalHeader, base_eep_header::pwdclkind, base_eep_header::regDmn, base_eep_header::rfSilent, size, spur_chan::spurChan, modal_eep_header::spurChans, swab16, swab32, u16, u32, base_eep_header::version, modal_eep_header::xpaBiasLvl, and modal_eep_header::xpaBiasLvlFreq.

◆ ath9k_hw_def_get_eeprom()

u32 ath9k_hw_def_get_eeprom ( struct ath_hw * ah,
enum eeprom_param param )
static

Definition at line 274 of file ath9k_eeprom_def.c.

276{
277 struct ar5416_eeprom_def *eep = &ah->eeprom.def;
278 struct modal_eep_header *pModal = eep->modalHeader;
279 struct base_eep_header *pBase = &eep->baseEepHeader;
280
281 switch (param) {
282 case EEP_NFTHRESH_5:
283 return pModal[0].noiseFloorThreshCh[0];
284 case EEP_NFTHRESH_2:
285 return pModal[1].noiseFloorThreshCh[0];
286 case EEP_MAC_LSW:
287 return pBase->macAddr[0] << 8 | pBase->macAddr[1];
288 case EEP_MAC_MID:
289 return pBase->macAddr[2] << 8 | pBase->macAddr[3];
290 case EEP_MAC_MSW:
291 return pBase->macAddr[4] << 8 | pBase->macAddr[5];
292 case EEP_REG_0:
293 return pBase->regDmn[0];
294 case EEP_REG_1:
295 return pBase->regDmn[1];
296 case EEP_OP_CAP:
297 return pBase->deviceCap;
298 case EEP_OP_MODE:
299 return pBase->opCapFlags;
300 case EEP_RF_SILENT:
301 return pBase->rfSilent;
302 case EEP_OB_5:
303 return pModal[0].ob;
304 case EEP_DB_5:
305 return pModal[0].db;
306 case EEP_OB_2:
307 return pModal[1].ob;
308 case EEP_DB_2:
309 return pModal[1].db;
310 case EEP_MINOR_REV:
311 return AR5416_VER_MASK;
312 case EEP_TX_MASK:
313 return pBase->txMask;
314 case EEP_RX_MASK:
315 return pBase->rxMask;
316 case EEP_FSTCLK_5G:
317 return pBase->fastClk5g;
318 case EEP_RXGAIN_TYPE:
319 return pBase->rxGainType;
320 case EEP_TXGAIN_TYPE:
321 return pBase->txGainType;
322 case EEP_OL_PWRCTRL:
324 return pBase->openLoopPwrCntl ? 1 : 0;
325 else
326 return 0;
329 return pBase->rcChainMask;
330 else
331 return 0;
332 case EEP_DAC_HPWR_5G:
334 return pBase->dacHiPwrMode_5G;
335 else
336 return 0;
337 case EEP_FRAC_N_5G:
339 return pBase->frac_n_5g;
340 else
341 return 0;
344 return pBase->pwr_table_offset;
345 else
347 default:
348 return 0;
349 }
350}
#define AR5416_EEP_MINOR_VER_20
Definition eeprom.h:141
#define AR5416_EEP_MINOR_VER_22
Definition eeprom.h:143
@ EEP_RXGAIN_TYPE
Definition eeprom.h:245
@ EEP_TXGAIN_TYPE
Definition eeprom.h:247
@ EEP_RC_CHAIN_MASK
Definition eeprom.h:248
@ EEP_PWR_TABLE_OFFSET
Definition eeprom.h:254
@ EEP_RF_SILENT
Definition eeprom.h:236
@ EEP_REG_0
Definition eeprom.h:232
@ EEP_MINOR_REV
Definition eeprom.h:241
@ EEP_OL_PWRCTRL
Definition eeprom.h:246
@ EEP_OP_CAP
Definition eeprom.h:234
@ EEP_OB_2
Definition eeprom.h:239
@ EEP_MAC_MSW
Definition eeprom.h:229
@ EEP_FRAC_N_5G
Definition eeprom.h:250
@ EEP_NFTHRESH_5
Definition eeprom.h:227
@ EEP_OB_5
Definition eeprom.h:237
@ EEP_DB_2
Definition eeprom.h:240
@ EEP_DAC_HPWR_5G
Definition eeprom.h:249
@ EEP_RX_MASK
Definition eeprom.h:243
@ EEP_MAC_LSW
Definition eeprom.h:231
@ EEP_MAC_MID
Definition eeprom.h:230
@ EEP_FSTCLK_5G
Definition eeprom.h:244
@ EEP_OP_MODE
Definition eeprom.h:235
@ EEP_NFTHRESH_2
Definition eeprom.h:228
@ EEP_TX_MASK
Definition eeprom.h:242
@ EEP_REG_1
Definition eeprom.h:233
@ EEP_DB_5
Definition eeprom.h:238
#define AR5416_VER_MASK
Definition eeprom.h:106
#define AR5416_EEP_MINOR_VER_19
Definition eeprom.h:140
#define AR5416_PWR_TABLE_OFFSET_DB
Definition eeprom.h:162
#define AR5416_EEP_MINOR_VER_21
Definition eeprom.h:142
struct hv_monitor_parameter param[4][32]
Parameters.
Definition hyperv.h:13
struct modal_eep_header modalHeader[2]
Definition eeprom.h:570
struct base_eep_header baseEepHeader
Definition eeprom.h:568
u8 pwr_table_offset
Definition eeprom.h:307
u16 regDmn[2]
Definition eeprom.h:288
u8 macAddr[6]
Definition eeprom.h:289
u8 noiseFloorThreshCh[AR5416_MAX_CHAINS]
Definition eeprom.h:351

References ah, AR5416_EEP_MINOR_VER_19, AR5416_EEP_MINOR_VER_20, AR5416_EEP_MINOR_VER_21, AR5416_EEP_MINOR_VER_22, AR5416_PWR_TABLE_OFFSET_DB, AR5416_VER_MASK, ar5416_eeprom_def::baseEepHeader, base_eep_header::dacHiPwrMode_5G, modal_eep_header::db, base_eep_header::deviceCap, EEP_DAC_HPWR_5G, EEP_DB_2, EEP_DB_5, EEP_FRAC_N_5G, EEP_FSTCLK_5G, EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW, EEP_MINOR_REV, EEP_NFTHRESH_2, EEP_NFTHRESH_5, EEP_OB_2, EEP_OB_5, EEP_OL_PWRCTRL, EEP_OP_CAP, EEP_OP_MODE, EEP_PWR_TABLE_OFFSET, EEP_RC_CHAIN_MASK, EEP_REG_0, EEP_REG_1, EEP_RF_SILENT, EEP_RX_MASK, EEP_RXGAIN_TYPE, EEP_TX_MASK, EEP_TXGAIN_TYPE, base_eep_header::fastClk5g, base_eep_header::frac_n_5g, base_eep_header::macAddr, ar5416_eeprom_def::modalHeader, modal_eep_header::noiseFloorThreshCh, modal_eep_header::ob, base_eep_header::opCapFlags, base_eep_header::openLoopPwrCntl, param, base_eep_header::pwr_table_offset, base_eep_header::rcChainMask, base_eep_header::regDmn, base_eep_header::rfSilent, base_eep_header::rxGainType, base_eep_header::rxMask, base_eep_header::txGainType, base_eep_header::txMask, and u32.

◆ ath9k_hw_def_set_gain()

void ath9k_hw_def_set_gain ( struct ath_hw * ah,
struct modal_eep_header * pModal,
struct ar5416_eeprom_def * eep,
u8 txRxAttenLocal,
int regChainOffset,
int i )
static

Definition at line 352 of file ath9k_eeprom_def.c.

356{
358 txRxAttenLocal = pModal->txRxAttenCh[i];
359
361 REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
363 pModal->bswMargin[i]);
364 REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
366 pModal->bswAtten[i]);
367 REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
369 pModal->xatten2Margin[i]);
370 REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
372 pModal->xatten2Db[i]);
373 } else {
374 REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
375 (REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) &
377 | SM(pModal-> bswMargin[i],
379 REG_WRITE(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
380 (REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) &
382 | SM(pModal->bswAtten[i],
384 }
385 }
386
389 AR_PHY_RXGAIN + regChainOffset,
390 AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal);
392 AR_PHY_RXGAIN + regChainOffset,
394 } else {
396 AR_PHY_RXGAIN + regChainOffset,
397 (REG_READ(ah, AR_PHY_RXGAIN + regChainOffset) &
399 | SM(txRxAttenLocal, AR_PHY_RXGAIN_TXRX_ATTEN));
401 AR_PHY_GAIN_2GHZ + regChainOffset,
402 (REG_READ(ah, AR_PHY_GAIN_2GHZ + regChainOffset) &
405 }
406}
#define AR_PHY_GAIN_2GHZ
Definition ar9002_phy.h:423
#define AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN
Definition ar9002_phy.h:433
#define AR_PHY_GAIN_2GHZ_XATTEN1_DB
Definition ar9002_phy.h:437
#define AR_PHY_GAIN_2GHZ_BSW_ATTEN
Definition ar9002_phy.h:428
#define AR9280_PHY_RXGAIN_TXRX_MARGIN
Definition ar9002_phy.h:103
#define AR_PHY_RXGAIN_TXRX_ATTEN
Definition ar9002_phy.h:97
#define AR_PHY_GAIN_2GHZ_XATTEN2_DB
Definition ar9002_phy.h:435
#define AR9280_PHY_RXGAIN_TXRX_ATTEN
Definition ar9002_phy.h:101
#define AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN
Definition ar9002_phy.h:431
#define AR_PHY_RXGAIN
Definition ar9002_phy.h:96
#define AR_PHY_GAIN_2GHZ_RXTX_MARGIN
Definition ar9002_phy.h:424
#define AR_PHY_GAIN_2GHZ_BSW_MARGIN
Definition ar9002_phy.h:426
#define AR5416_EEP_MINOR_VER_3
Definition eeprom.h:135
#define AR_SREV_9280_20_OR_LATER(_ah)
Definition reg.h:825
#define REG_WRITE(_ah, _reg, _val)
Definition hw.h:78
#define REG_READ(_ah, _reg)
Definition hw.h:81
u8 txRxAttenCh[AR5416_MAX_CHAINS]
Definition eeprom.h:342
u8 xatten2Margin[AR5416_MAX_CHAINS]
Definition eeprom.h:369
u8 bswAtten[AR5416_MAX_CHAINS]
Definition eeprom.h:365
u8 xatten2Db[AR5416_MAX_CHAINS]
Definition eeprom.h:368
u8 bswMargin[AR5416_MAX_CHAINS]
Definition eeprom.h:366
u8 rxTxMarginCh[AR5416_MAX_CHAINS]
Definition eeprom.h:343

References ah, AR5416_EEP_MINOR_VER_3, AR5416_VER_MASK, AR9280_PHY_RXGAIN_TXRX_ATTEN, AR9280_PHY_RXGAIN_TXRX_MARGIN, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_BSW_ATTEN, AR_PHY_GAIN_2GHZ_BSW_MARGIN, AR_PHY_GAIN_2GHZ_RXTX_MARGIN, AR_PHY_GAIN_2GHZ_XATTEN1_DB, AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, AR_PHY_GAIN_2GHZ_XATTEN2_DB, AR_PHY_GAIN_2GHZ_XATTEN2_MARGIN, AR_PHY_RXGAIN, AR_PHY_RXGAIN_TXRX_ATTEN, AR_SREV_9280_20_OR_LATER, modal_eep_header::bswAtten, modal_eep_header::bswMargin, REG_READ, REG_RMW_FIELD, REG_WRITE, modal_eep_header::rxTxMarginCh, SM, modal_eep_header::txRxAttenCh, u8, modal_eep_header::xatten2Db, and modal_eep_header::xatten2Margin.

Referenced by ath9k_hw_def_set_board_values().

◆ ath9k_hw_def_set_board_values()

void ath9k_hw_def_set_board_values ( struct ath_hw * ah,
struct ath9k_channel * chan )
static

Definition at line 408 of file ath9k_eeprom_def.c.

410{
411 struct modal_eep_header *pModal;
412 struct ar5416_eeprom_def *eep = &ah->eeprom.def;
413 int i, regChainOffset;
414 u8 txRxAttenLocal;
415
416 pModal = &(eep->modalHeader[IS_CHAN_2GHZ(chan)]);
417 txRxAttenLocal = IS_CHAN_2GHZ(chan) ? 23 : 44;
418
419 REG_WRITE(ah, AR_PHY_SWITCH_COM, pModal->antCtrlCommon & 0xffff);
420
421 for (i = 0; i < AR5416_MAX_CHAINS; i++) {
422 if (AR_SREV_9280(ah)) {
423 if (i >= 2)
424 break;
425 }
426
428 (ah->rxchainmask == 5 || ah->txchainmask == 5) && (i != 0))
429 regChainOffset = (i == 1) ? 0x2000 : 0x1000;
430 else
431 regChainOffset = i * 0x1000;
432
433 REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset,
434 pModal->antCtrlChain[i]);
435
436 REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset,
437 (REG_READ(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset) &
440 SM(pModal->iqCalICh[i],
442 SM(pModal->iqCalQCh[i],
444
445 if ((i == 0) || AR_SREV_5416_20_OR_LATER(ah))
446 ath9k_hw_def_set_gain(ah, pModal, eep, txRxAttenLocal,
447 regChainOffset, i);
448 }
449
451 if (IS_CHAN_2GHZ(chan)) {
455 pModal->ob);
459 pModal->db);
463 pModal->ob_ch1);
467 pModal->db_ch1);
468 } else {
472 pModal->ob);
476 pModal->db);
480 pModal->ob_ch1);
484 pModal->db_ch1);
485 }
489 pModal->xpaBiasLvl);
493 !!(pModal->lna_ctl &
496 !!(pModal->lna_ctl & LNA_CTL_FORCE_XPA));
497 }
498
500 pModal->switchSettling);
502 pModal->adcDesiredSize);
503
507 pModal->pgaDesiredSize);
508
511 | SM(pModal->txEndToXpaOff,
513 | SM(pModal->txFrameToXpaOn,
515 | SM(pModal->txFrameToXpaOn,
517
519 pModal->txEndToRxOn);
520
523 pModal->thresh62);
526 pModal->thresh62);
527 } else {
529 pModal->thresh62);
532 pModal->thresh62);
533 }
534
538 pModal->txFrameToDataStart);
540 pModal->txFrameToPaOn);
541 }
542
544 if (IS_CHAN_HT40(chan))
547 pModal->swSettleHt40);
548 }
549
554 pModal->miscBits);
555
556
558 if (IS_CHAN_2GHZ(chan))
561 else if (eep->baseEepHeader.dacHiPwrMode_5G)
563 else
566
567 udelay(100);
568
570 pModal->miscBits >> 2);
571
575 }
576}
#define AR_PHY_DESIRED_SZ_PGA
Definition ar9002_phy.h:109
#define AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK
Definition ar9002_phy.h:411
#define AR_PHY_RF_CTL4
Definition ar9002_phy.h:80
#define AR_PHY_EXT_CCA0
Definition ar9002_phy.h:328
#define AR_PHY_FRAME_CTL_TX_CLIP
Definition ar9002_phy.h:213
#define AR_PHY_SETTLING_SWITCH
Definition ar9002_phy.h:93
#define AR_PHY_RF_CTL4_TX_END_XPAB_OFF
Definition ar9002_phy.h:81
#define AR_PHY_TX_END_DATA_START
Definition ar9002_phy.h:58
#define AR_PHY_EXT_CCA
Definition ar9002_phy.h:332
#define AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF
Definition ar9002_phy.h:191
#define AR_PHY_SETTLING
Definition ar9002_phy.h:92
#define AR_PHY_TX_DESIRED_SCALE_CCK
Definition ar9002_phy.h:494
#define AR_PHY_TX_PWRCTRL9
Definition ar9002_phy.h:491
#define AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF
Definition ar9002_phy.h:189
#define AR_PHY_DESIRED_SZ_ADC
Definition ar9002_phy.h:107
#define AR_PHY_SWITCH_CHAIN_0
Definition ar9002_phy.h:252
#define AR_PHY_TX_END_TO_A2_RX_ON
Definition ar9002_phy.h:64
#define AR_PHY_SWITCH_COM
Definition ar9002_phy.h:253
#define AR_PHY_TIMING_CTRL4(_i)
Definition ar9002_phy.h:188
#define AR_PHY_RF_CTL4_FRAME_XPAB_ON
Definition ar9002_phy.h:85
#define AR_PHY_TX_END_PA_ON
Definition ar9002_phy.h:60
#define AR_PHY_XPA_CFG
Definition ar9002_phy.h:566
#define AR_PHY_RF_CTL3
Definition ar9002_phy.h:63
#define AR_PHY_CCA_THRESH62
Definition ar9002_phy.h:133
#define AR9280_PHY_CCA_THRESH62
Definition ar9002_phy.h:137
#define AR_PHY_CCA
Definition ar9002_phy.h:130
#define AR_PHY_DESIRED_SZ
Definition ar9002_phy.h:106
#define AR_PHY_RF_CTL4_TX_END_XPAA_OFF
Definition ar9002_phy.h:83
#define AR_PHY_EXT_CCA0_THRESH62
Definition ar9002_phy.h:329
#define AR_PHY_RF_CTL4_FRAME_XPAA_ON
Definition ar9002_phy.h:87
#define AR_PHY_EXT_CCA_THRESH62
Definition ar9002_phy.h:335
#define AR_PHY_RF_CTL2
Definition ar9002_phy.h:57
#define AR_PHY_CCK_TX_CTRL
Definition ar9002_phy.h:409
#define AR_PHY_FRAME_CTL
Definition ar9002_phy.h:212
#define AR_PHY_FORCE_XPA_CFG
Definition ar9002_phy.h:567
#define LNA_CTL_FORCE_XPA
Definition eeprom.h:223
#define LNA_CTL_LOCAL_BIAS
Definition eeprom.h:222
#define AR5416_EEP_MINOR_VER_2
Definition eeprom.h:134
#define AR_AN_RF5G1_CH1
Definition reg.h:1260
#define AR_AN_RF2G1_CH1_DB
Definition reg.h:1257
#define AR_AN_RF5G1_CH1_OB5
Definition reg.h:1261
#define AR_AN_TOP2_LOCALBIAS_S
Definition reg.h:1274
#define AR_AN_RF5G1_CH0_DB5_S
Definition reg.h:1252
#define AR_AN_RF5G1_CH1_DB5_S
Definition reg.h:1264
#define AR_AN_RF5G1_CH0_OB5_S
Definition reg.h:1250
#define AR_SREV_9280_20(_ah)
Definition reg.h:827
#define AR_AN_RF5G1_CH0
Definition reg.h:1248
#define AR_AN_RF5G1_CH0_DB5
Definition reg.h:1251
#define AR_AN_RF2G1_CH0_DB
Definition reg.h:1245
#define AR_AN_TOP2_LOCALBIAS
Definition reg.h:1273
#define AR_AN_RF2G1_CH0_DB_S
Definition reg.h:1246
#define AR_AN_RF5G1_CH1_OB5_S
Definition reg.h:1262
#define AR_AN_RF2G1_CH1_OB_S
Definition reg.h:1256
#define AR_AN_RF2G1_CH1_DB_S
Definition reg.h:1258
#define AR_SREV_5416_20_OR_LATER(_ah)
Definition reg.h:802
#define AR_AN_TOP1_DACIPMODE
Definition reg.h:1267
#define AR_AN_TOP2_XPABIAS_LVL
Definition reg.h:1271
#define AR_AN_RF2G1_CH1_OB
Definition reg.h:1255
#define AR_AN_RF2G1_CH0
Definition reg.h:1242
#define AR_AN_RF5G1_CH0_OB5
Definition reg.h:1249
#define AR_AN_TOP2
Definition reg.h:1270
#define AR_AN_RF5G1_CH1_DB5
Definition reg.h:1263
#define AR_AN_RF2G1_CH0_OB_S
Definition reg.h:1244
#define AR_AN_TOP2_XPABIAS_LVL_S
Definition reg.h:1272
#define AR_AN_RF2G1_CH1
Definition reg.h:1254
#define AR_AN_TOP1
Definition reg.h:1266
#define AR_AN_RF2G1_CH0_OB
Definition reg.h:1243
void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask, u32 shift, u32 val)
static void ath9k_hw_def_set_gain(struct ath_hw *ah, struct modal_eep_header *pModal, struct ar5416_eeprom_def *eep, u8 txRxAttenLocal, int regChainOffset, int i)
#define IS_CHAN_HT40(_c)
Definition hw.h:373
u8 iqCalICh[AR5416_MAX_CHAINS]
Definition eeprom.h:354
u8 iqCalQCh[AR5416_MAX_CHAINS]
Definition eeprom.h:355
u8 txFrameToDataStart
Definition eeprom.h:362
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
Definition timer.c:61

References modal_eep_header::adcDesiredSize, ah, modal_eep_header::antCtrlChain, modal_eep_header::antCtrlCommon, AR5416_EEP_MINOR_VER_19, AR5416_EEP_MINOR_VER_2, AR5416_EEP_MINOR_VER_20, AR5416_EEP_MINOR_VER_3, AR5416_MAX_CHAINS, AR5416_VER_MASK, AR9280_PHY_CCA_THRESH62, AR_AN_RF2G1_CH0, AR_AN_RF2G1_CH0_DB, AR_AN_RF2G1_CH0_DB_S, AR_AN_RF2G1_CH0_OB, AR_AN_RF2G1_CH0_OB_S, AR_AN_RF2G1_CH1, AR_AN_RF2G1_CH1_DB, AR_AN_RF2G1_CH1_DB_S, AR_AN_RF2G1_CH1_OB, AR_AN_RF2G1_CH1_OB_S, AR_AN_RF5G1_CH0, AR_AN_RF5G1_CH0_DB5, AR_AN_RF5G1_CH0_DB5_S, AR_AN_RF5G1_CH0_OB5, AR_AN_RF5G1_CH0_OB5_S, AR_AN_RF5G1_CH1, AR_AN_RF5G1_CH1_DB5, AR_AN_RF5G1_CH1_DB5_S, AR_AN_RF5G1_CH1_OB5, AR_AN_RF5G1_CH1_OB5_S, AR_AN_TOP1, AR_AN_TOP1_DACIPMODE, AR_AN_TOP2, AR_AN_TOP2_LOCALBIAS, AR_AN_TOP2_LOCALBIAS_S, AR_AN_TOP2_XPABIAS_LVL, AR_AN_TOP2_XPABIAS_LVL_S, AR_PHY_CCA, AR_PHY_CCA_THRESH62, AR_PHY_CCK_TX_CTRL, AR_PHY_CCK_TX_CTRL_TX_DAC_SCALE_CCK, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, AR_PHY_DESIRED_SZ_PGA, AR_PHY_EXT_CCA, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, AR_PHY_EXT_CCA_THRESH62, AR_PHY_FORCE_XPA_CFG, AR_PHY_FRAME_CTL, AR_PHY_FRAME_CTL_TX_CLIP, AR_PHY_RF_CTL2, AR_PHY_RF_CTL3, AR_PHY_RF_CTL4, AR_PHY_RF_CTL4_FRAME_XPAA_ON, AR_PHY_RF_CTL4_FRAME_XPAB_ON, AR_PHY_RF_CTL4_TX_END_XPAA_OFF, AR_PHY_RF_CTL4_TX_END_XPAB_OFF, AR_PHY_SETTLING, AR_PHY_SETTLING_SWITCH, AR_PHY_SWITCH_CHAIN_0, AR_PHY_SWITCH_COM, AR_PHY_TIMING_CTRL4, AR_PHY_TIMING_CTRL4_IQCORR_Q_I_COFF, AR_PHY_TIMING_CTRL4_IQCORR_Q_Q_COFF, AR_PHY_TX_DESIRED_SCALE_CCK, AR_PHY_TX_END_DATA_START, AR_PHY_TX_END_PA_ON, AR_PHY_TX_END_TO_A2_RX_ON, AR_PHY_TX_PWRCTRL9, AR_PHY_XPA_CFG, AR_SREV_5416_20_OR_LATER, AR_SREV_9280, AR_SREV_9280_20, AR_SREV_9280_20_OR_LATER, ath9k_hw_analog_shift_rmw(), ath9k_hw_def_set_gain(), ar5416_eeprom_def::baseEepHeader, base_eep_header::dacHiPwrMode_5G, base_eep_header::dacLpMode, modal_eep_header::db, modal_eep_header::db_ch1, base_eep_header::desiredScaleCCK, modal_eep_header::iqCalICh, modal_eep_header::iqCalQCh, IS_CHAN_2GHZ, IS_CHAN_HT40, modal_eep_header::lna_ctl, LNA_CTL_FORCE_XPA, LNA_CTL_LOCAL_BIAS, modal_eep_header::miscBits, ar5416_eeprom_def::modalHeader, modal_eep_header::ob, modal_eep_header::ob_ch1, modal_eep_header::pgaDesiredSize, REG_READ, REG_RMW_FIELD, REG_WRITE, SM, modal_eep_header::switchSettling, modal_eep_header::swSettleHt40, modal_eep_header::thresh62, modal_eep_header::txEndToRxOn, modal_eep_header::txEndToXpaOff, modal_eep_header::txFrameToDataStart, modal_eep_header::txFrameToPaOn, modal_eep_header::txFrameToXpaOn, u8, udelay(), and modal_eep_header::xpaBiasLvl.

◆ ath9k_hw_def_set_addac()

void ath9k_hw_def_set_addac ( struct ath_hw * ah,
struct ath9k_channel * chan )
static

Definition at line 578 of file ath9k_eeprom_def.c.

580{
581#define XPA_LVL_FREQ(cnt) (pModal->xpaBiasLvlFreq[cnt])
582 struct modal_eep_header *pModal;
583 struct ar5416_eeprom_def *eep = &ah->eeprom.def;
584 u8 biaslevel;
585
586 if (ah->hw_version.macVersion != AR_SREV_VERSION_9160)
587 return;
588
589 if (ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_MINOR_VER_7)
590 return;
591
592 pModal = &(eep->modalHeader[IS_CHAN_2GHZ(chan)]);
593
594 if (pModal->xpaBiasLvl != 0xff) {
595 biaslevel = pModal->xpaBiasLvl;
596 } else {
597 u16 resetFreqBin, freqBin, freqCount = 0;
598 struct chan_centers centers;
599
600 ath9k_hw_get_channel_centers(ah, chan, &centers);
601
602 resetFreqBin = FREQ2FBIN(centers.synth_center,
603 IS_CHAN_2GHZ(chan));
604 freqBin = XPA_LVL_FREQ(0) & 0xff;
605 biaslevel = (u8) (XPA_LVL_FREQ(0) >> 14);
606
607 freqCount++;
608
609 while (freqCount < 3) {
610 if (XPA_LVL_FREQ(freqCount) == 0x0)
611 break;
612
613 freqBin = XPA_LVL_FREQ(freqCount) & 0xff;
614 if (resetFreqBin >= freqBin)
615 biaslevel = (u8)(XPA_LVL_FREQ(freqCount) >> 14);
616 else
617 break;
618 freqCount++;
619 }
620 }
621
622 if (IS_CHAN_2GHZ(chan)) {
623 INI_RA(&ah->iniAddac, 7, 1) = (INI_RA(&ah->iniAddac,
624 7, 1) & (~0x18)) | biaslevel << 3;
625 } else {
626 INI_RA(&ah->iniAddac, 6, 1) = (INI_RA(&ah->iniAddac,
627 6, 1) & (~0xc0)) | biaslevel << 6;
628 }
629#undef XPA_LVL_FREQ
630}
#define AR5416_EEP_MINOR_VER_7
Definition eeprom.h:136
#define AR_SREV_VERSION_9160
Definition reg.h:773
#define XPA_LVL_FREQ(cnt)
#define INI_RA(iniarray, row, column)
Definition calib.h:46

References ah, AR5416_EEP_MINOR_VER_7, AR_SREV_VERSION_9160, ath9k_hw_get_channel_centers(), FREQ2FBIN, INI_RA, IS_CHAN_2GHZ, ar5416_eeprom_def::modalHeader, chan_centers::synth_center, u16, u8, XPA_LVL_FREQ, and modal_eep_header::xpaBiasLvl.

◆ ath9k_change_gain_boundary_setting()

int16_t ath9k_change_gain_boundary_setting ( struct ath_hw * ah,
u16 * gb,
u16 numXpdGain,
u16 pdGainOverlap_t2,
int8_t pwr_table_offset,
int16_t * diff )
static

Definition at line 632 of file ath9k_eeprom_def.c.

639{
640 u16 k;
641
642 /* Prior to writing the boundaries or the pdadc vs. power table
643 * into the chip registers the default starting point on the pdadc
644 * vs. power table needs to be checked and the curve boundaries
645 * adjusted accordingly
646 */
648 u16 gb_limit;
649
650 if (AR5416_PWR_TABLE_OFFSET_DB != pwr_table_offset) {
651 /* get the difference in dB */
652 *diff = (u16)(pwr_table_offset - AR5416_PWR_TABLE_OFFSET_DB);
653 /* get the number of half dB steps */
654 *diff *= 2;
655 /* change the original gain boundary settings
656 * by the number of half dB steps
657 */
658 for (k = 0; k < numXpdGain; k++)
659 gb[k] = (u16)(gb[k] - *diff);
660 }
661 /* Because of a hardware limitation, ensure the gain boundary
662 * is not larger than (63 - overlap)
663 */
664 gb_limit = (u16)(MAX_RATE_POWER - pdGainOverlap_t2);
665
666 for (k = 0; k < numXpdGain; k++)
667 gb[k] = (u16)min(gb_limit, gb[k]);
668 }
669
670 return *diff;
671}
#define min(x, y)
Definition ath.h:36
#define MAX_RATE_POWER
Definition hw.h:145
static const uint32_t k[64]
MD5 constants.
Definition md5.c:54

References ah, AR5416_PWR_TABLE_OFFSET_DB, AR_SREV_9280_20_OR_LATER, k, MAX_RATE_POWER, min, and u16.

Referenced by ath9k_hw_set_def_power_cal_table().

◆ ath9k_adjust_pdadc_values()

void ath9k_adjust_pdadc_values ( struct ath_hw * ah,
int8_t pwr_table_offset,
int16_t diff,
u8 * pdadcValues )
static

Definition at line 673 of file ath9k_eeprom_def.c.

677{
678#define NUM_PDADC(diff) (AR5416_NUM_PDADC_VALUES - diff)
679 u16 k;
680
681 /* If this is a board that has a pwrTableOffset that differs from
682 * the default AR5416_PWR_TABLE_OFFSET_DB then the start of the
683 * pdadc vs pwr table needs to be adjusted prior to writing to the
684 * chip.
685 */
687 if (AR5416_PWR_TABLE_OFFSET_DB != pwr_table_offset) {
688 /* shift the table to start at the new offset */
689 for (k = 0; k < (u16)NUM_PDADC(diff); k++ ) {
690 pdadcValues[k] = pdadcValues[k + diff];
691 }
692
693 /* fill the back of the table */
694 for (k = (u16)NUM_PDADC(diff); k < NUM_PDADC(0); k++) {
695 pdadcValues[k] = pdadcValues[NUM_PDADC(diff)];
696 }
697 }
698 }
699#undef NUM_PDADC
700}
#define NUM_PDADC(diff)

References ah, AR5416_PWR_TABLE_OFFSET_DB, AR_SREV_9280_20_OR_LATER, k, NUM_PDADC, u16, and u8.

Referenced by ath9k_hw_set_def_power_cal_table().

◆ ath9k_hw_set_def_power_cal_table()

void ath9k_hw_set_def_power_cal_table ( struct ath_hw * ah,
struct ath9k_channel * chan,
int16_t * pTxPowerIndexOffset )
static

Definition at line 702 of file ath9k_eeprom_def.c.

705{
706#define SM_PD_GAIN(x) SM(0x38, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##x)
707#define SM_PDGAIN_B(x, y) \
708 SM((gainBoundaries[x]), AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_##y)
709 struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
710 struct cal_data_per_freq *pRawDataset;
711 u8 *pCalBChans = NULL;
712 u16 pdGainOverlap_t2;
713 static u8 pdadcValues[AR5416_NUM_PDADC_VALUES];
714 u16 gainBoundaries[AR5416_PD_GAINS_IN_MASK];
715 u16 numPiers, i, j;
716 int16_t diff = 0;
717 u16 numXpdGain, xpdMask;
718 u16 xpdGainValues[AR5416_NUM_PD_GAINS] = { 0, 0, 0, 0 };
719 u32 reg32, regOffset, regChainOffset;
720 int16_t modalIdx;
721 int8_t pwr_table_offset;
722
723 modalIdx = IS_CHAN_2GHZ(chan) ? 1 : 0;
724 xpdMask = pEepData->modalHeader[modalIdx].xpdGain;
725
726 pwr_table_offset = ah->eep_ops->get_eeprom(ah, EEP_PWR_TABLE_OFFSET);
727
730 pdGainOverlap_t2 =
731 pEepData->modalHeader[modalIdx].pdGainOverlap;
732 } else {
733 pdGainOverlap_t2 = (u16)(MS(REG_READ(ah, AR_PHY_TPCRG5),
735 }
736
737 if (IS_CHAN_2GHZ(chan)) {
738 pCalBChans = pEepData->calFreqPier2G;
739 numPiers = AR5416_NUM_2G_CAL_PIERS;
740 } else {
741 pCalBChans = pEepData->calFreqPier5G;
742 numPiers = AR5416_NUM_5G_CAL_PIERS;
743 }
744
746 pRawDataset = pEepData->calPierData2G[0];
747 ah->initPDADC = ((struct calDataPerFreqOpLoop *)
748 pRawDataset)->vpdPdg[0][0];
749 }
750
751 numXpdGain = 0;
752
753 for (i = 1; i <= AR5416_PD_GAINS_IN_MASK; i++) {
754 if ((xpdMask >> (AR5416_PD_GAINS_IN_MASK - i)) & 1) {
755 if (numXpdGain >= AR5416_NUM_PD_GAINS)
756 break;
757 xpdGainValues[numXpdGain] =
759 numXpdGain++;
760 }
761 }
762
764 (numXpdGain - 1) & 0x3);
766 xpdGainValues[0]);
768 xpdGainValues[1]);
770 xpdGainValues[2]);
771
772 for (i = 0; i < AR5416_MAX_CHAINS; i++) {
774 (ah->rxchainmask == 5 || ah->txchainmask == 5) &&
775 (i != 0)) {
776 regChainOffset = (i == 1) ? 0x2000 : 0x1000;
777 } else
778 regChainOffset = i * 0x1000;
779
780 if (pEepData->baseEepHeader.txMask & (1 << i)) {
781 if (IS_CHAN_2GHZ(chan))
782 pRawDataset = pEepData->calPierData2G[i];
783 else
784 pRawDataset = pEepData->calPierData5G[i];
785
786
788 u8 pcdacIdx;
789 u8 txPower;
790
792 (struct calDataPerFreqOpLoop *)pRawDataset,
793 pCalBChans, numPiers, &txPower, &pcdacIdx);
794 ath9k_olc_get_pdadcs(ah, pcdacIdx,
795 txPower/2, pdadcValues);
796 } else {
798 chan, pRawDataset,
799 pCalBChans, numPiers,
800 pdGainOverlap_t2,
801 gainBoundaries,
802 pdadcValues,
803 numXpdGain);
804 }
805
807 gainBoundaries,
808 numXpdGain,
809 pdGainOverlap_t2,
810 pwr_table_offset,
811 &diff);
812
814
815 if ((i == 0) || AR_SREV_5416_20_OR_LATER(ah)) {
818 AR_PHY_TPCRG5 + regChainOffset,
819 SM(0x6,
821 SM_PD_GAIN(1) | SM_PD_GAIN(2) |
822 SM_PD_GAIN(3) | SM_PD_GAIN(4));
823 } else {
825 AR_PHY_TPCRG5 + regChainOffset,
826 SM(pdGainOverlap_t2,
828 SM_PDGAIN_B(0, 1) |
829 SM_PDGAIN_B(1, 2) |
830 SM_PDGAIN_B(2, 3) |
831 SM_PDGAIN_B(3, 4));
832 }
833 }
834
835
836 ath9k_adjust_pdadc_values(ah, pwr_table_offset,
837 diff, pdadcValues);
838
839 regOffset = AR_PHY_BASE + (672 << 2) + regChainOffset;
840 for (j = 0; j < 32; j++) {
841 reg32 = ((pdadcValues[4 * j + 0] & 0xFF) << 0) |
842 ((pdadcValues[4 * j + 1] & 0xFF) << 8) |
843 ((pdadcValues[4 * j + 2] & 0xFF) << 16)|
844 ((pdadcValues[4 * j + 3] & 0xFF) << 24);
845 REG_WRITE(ah, regOffset, reg32);
846
847 DBG2("ath9k: "
848 "PDADC (%d,%4x): %4.4x %8.8x\n",
849 i, regChainOffset, regOffset,
850 reg32);
851 DBG2("ath9k: "
852 "PDADC: Chain %d | PDADC %3d "
853 "Value %3d | PDADC %3d Value %3d | "
854 "PDADC %3d Value %3d | PDADC %3d "
855 "Value %3d |\n",
856 i, 4 * j, pdadcValues[4 * j],
857 4 * j + 1, pdadcValues[4 * j + 1],
858 4 * j + 2, pdadcValues[4 * j + 2],
859 4 * j + 3, pdadcValues[4 * j + 3]);
860
861 regOffset += 4;
862 }
864 }
865 }
866
867 *pTxPowerIndexOffset = 0;
868#undef SM_PD_GAIN
869#undef SM_PDGAIN_B
870}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
#define AR_PHY_TPCRG1
Definition ar9002_phy.h:460
#define AR_PHY_TPCRG1_PD_GAIN_2
Definition ar9002_phy.h:466
#define AR_PHY_TPCRG5
Definition ar9002_phy.h:539
#define AR_PHY_TPCRG5_PD_GAIN_OVERLAP
Definition ar9002_phy.h:540
#define AR_PHY_TPCRG1_PD_GAIN_3
Definition ar9002_phy.h:468
#define AR_PHY_TPCRG1_NUM_PD_GAIN
Definition ar9002_phy.h:461
#define AR_PHY_TPCRG1_PD_GAIN_1
Definition ar9002_phy.h:464
signed short int16_t
Definition stdint.h:16
signed char int8_t
Definition stdint.h:15
#define OLC_FOR_AR9280_20_LATER
Definition eeprom.h:107
#define AR5416_EEP_VER_MINOR_MASK
Definition eeprom.h:133
#define AR5416_NUM_2G_CAL_PIERS
Definition eeprom.h:146
#define AR5416_NUM_5G_CAL_PIERS
Definition eeprom.h:145
#define AR5416_NUM_PD_GAINS
Definition eeprom.h:154
#define AR5416_PD_GAINS_IN_MASK
Definition eeprom.h:155
void ath9k_hw_get_gain_boundaries_pdadcs(struct ath_hw *ah, struct ath9k_channel *chan, void *pRawDataSet, u8 *bChans, u16 availPiers, u16 tPdGainOverlap, u16 *pPdGainBoundaries, u8 *pPDADCValues, u16 numXpdGains)
static int16_t ath9k_change_gain_boundary_setting(struct ath_hw *ah, u16 *gb, u16 numXpdGain, u16 pdGainOverlap_t2, int8_t pwr_table_offset, int16_t *diff)
static void ath9k_get_txgain_index(struct ath_hw *ah, struct ath9k_channel *chan, struct calDataPerFreqOpLoop *rawDatasetOpLoop, u8 *calChans, u16 availPiers, u8 *pwr, u8 *pcdacIdx)
#define SM_PDGAIN_B(x, y)
static void ath9k_olc_get_pdadcs(struct ath_hw *ah, u32 initTxGain, int txPower, u8 *pPDADCValues)
static void ath9k_adjust_pdadc_values(struct ath_hw *ah, int8_t pwr_table_offset, int16_t diff, u8 *pdadcValues)
#define SM_PD_GAIN(x)
#define REGWRITE_BUFFER_FLUSH(_ah)
Definition hw.h:96
#define MS(_v, _f)
Definition hw.h:103
#define ENABLE_REGWRITE_BUFFER(_ah)
Definition hw.h:90
#define AR_PHY_BASE
Definition phy.h:27
u8 calFreqPier5G[AR5416_NUM_5G_CAL_PIERS]
Definition eeprom.h:571
struct cal_data_per_freq calPierData2G[AR5416_MAX_CHAINS][AR5416_NUM_2G_CAL_PIERS]
Definition eeprom.h:575
u8 calFreqPier2G[AR5416_NUM_2G_CAL_PIERS]
Definition eeprom.h:572
struct cal_data_per_freq calPierData5G[AR5416_MAX_CHAINS][AR5416_NUM_5G_CAL_PIERS]
Definition eeprom.h:573

References ah, AR5416_EEP_MINOR_VER_2, AR5416_EEP_VER_MINOR_MASK, AR5416_MAX_CHAINS, AR5416_NUM_2G_CAL_PIERS, AR5416_NUM_5G_CAL_PIERS, AR5416_NUM_PD_GAINS, AR5416_NUM_PDADC_VALUES, AR5416_PD_GAINS_IN_MASK, AR_PHY_BASE, AR_PHY_TPCRG1, AR_PHY_TPCRG1_NUM_PD_GAIN, AR_PHY_TPCRG1_PD_GAIN_1, AR_PHY_TPCRG1_PD_GAIN_2, AR_PHY_TPCRG1_PD_GAIN_3, AR_PHY_TPCRG5, AR_PHY_TPCRG5_PD_GAIN_OVERLAP, AR_SREV_5416_20_OR_LATER, ath9k_adjust_pdadc_values(), ath9k_change_gain_boundary_setting(), ath9k_get_txgain_index(), ath9k_hw_get_gain_boundaries_pdadcs(), ath9k_olc_get_pdadcs(), ar5416_eeprom_def::baseEepHeader, ar5416_eeprom_def::calFreqPier2G, ar5416_eeprom_def::calFreqPier5G, ar5416_eeprom_def::calPierData2G, ar5416_eeprom_def::calPierData5G, DBG2, EEP_PWR_TABLE_OFFSET, ENABLE_REGWRITE_BUFFER, IS_CHAN_2GHZ, ar5416_eeprom_def::modalHeader, MS, NULL, OLC_FOR_AR9280_20_LATER, modal_eep_header::pdGainOverlap, REG_READ, REG_RMW_FIELD, REG_WRITE, REGWRITE_BUFFER_FLUSH, SM, SM_PD_GAIN, SM_PDGAIN_B, base_eep_header::txMask, u16, u32, u8, base_eep_header::version, calDataPerFreqOpLoop::vpdPdg, and modal_eep_header::xpdGain.

Referenced by ath9k_hw_def_set_txpower().

◆ ath9k_hw_set_def_power_per_rate_table()

void ath9k_hw_set_def_power_per_rate_table ( struct ath_hw * ah,
struct ath9k_channel * chan,
int16_t * ratesArray,
u16 cfgCtl,
u16 AntennaReduction,
u16 twiceMaxRegulatoryPower,
u16 powerLimit )
static

Definition at line 872 of file ath9k_eeprom_def.c.

879{
880#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */
881#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */
882
883 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
884 struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
885 u16 twiceMaxEdgePower = MAX_RATE_POWER;
886 static const u16 tpScaleReductionTable[5] =
887 { 0, 3, 6, 9, MAX_RATE_POWER };
888
889 unsigned int i;
890 int16_t twiceLargestAntenna;
891 struct cal_ctl_data *rep;
892 struct cal_target_power_leg targetPowerOfdm, targetPowerCck = {
893 0, { 0, 0, 0, 0}
894 };
895 struct cal_target_power_leg targetPowerOfdmExt = {
896 0, { 0, 0, 0, 0} }, targetPowerCckExt = {
897 0, { 0, 0, 0, 0 }
898 };
899 struct cal_target_power_ht targetPowerHt20, targetPowerHt40 = {
900 0, {0, 0, 0, 0}
901 };
902 u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
903 static const u16 ctlModesFor11a[] = {
905 };
906 static const u16 ctlModesFor11g[] = {
909 };
910 u16 numCtlModes;
911 const u16 *pCtlMode;
912 u16 ctlMode, freq;
913 struct chan_centers centers;
914 int tx_chainmask;
915 u16 twiceMinEdgePower;
916
917 tx_chainmask = ah->txchainmask;
918
919 ath9k_hw_get_channel_centers(ah, chan, &centers);
920
921 twiceLargestAntenna = max(
922 pEepData->modalHeader
923 [IS_CHAN_2GHZ(chan)].antennaGainCh[0],
924 pEepData->modalHeader
925 [IS_CHAN_2GHZ(chan)].antennaGainCh[1]);
926
927 twiceLargestAntenna = max((u8)twiceLargestAntenna,
928 pEepData->modalHeader
929 [IS_CHAN_2GHZ(chan)].antennaGainCh[2]);
930
931 twiceLargestAntenna = (int16_t)min(AntennaReduction -
932 twiceLargestAntenna, 0);
933
934 maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
935
936 if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX) {
937 maxRegAllowedPower -=
938 (tpScaleReductionTable[(regulatory->tp_scale)] * 2);
939 }
940
941 scaledPower = min(powerLimit, maxRegAllowedPower);
942
943 switch (ar5416_get_ntxchains(tx_chainmask)) {
944 case 1:
945 break;
946 case 2:
947 if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
949 else
950 scaledPower = 0;
951 break;
952 case 3:
953 if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
955 else
956 scaledPower = 0;
957 break;
958 }
959
960 if (IS_CHAN_2GHZ(chan)) {
961 numCtlModes = ARRAY_SIZE(ctlModesFor11g) -
963 pCtlMode = ctlModesFor11g;
964
966 pEepData->calTargetPowerCck,
968 &targetPowerCck, 4, 0);
970 pEepData->calTargetPower2G,
972 &targetPowerOfdm, 4, 0);
974 pEepData->calTargetPower2GHT20,
976 &targetPowerHt20, 8, 0);
977
978 if (IS_CHAN_HT40(chan)) {
979 numCtlModes = ARRAY_SIZE(ctlModesFor11g);
981 pEepData->calTargetPower2GHT40,
983 &targetPowerHt40, 8, 1);
985 pEepData->calTargetPowerCck,
987 &targetPowerCckExt, 4, 1);
989 pEepData->calTargetPower2G,
991 &targetPowerOfdmExt, 4, 1);
992 }
993 } else {
994 numCtlModes = ARRAY_SIZE(ctlModesFor11a) -
996 pCtlMode = ctlModesFor11a;
997
999 pEepData->calTargetPower5G,
1001 &targetPowerOfdm, 4, 0);
1003 pEepData->calTargetPower5GHT20,
1005 &targetPowerHt20, 8, 0);
1006
1007 if (IS_CHAN_HT40(chan)) {
1008 numCtlModes = ARRAY_SIZE(ctlModesFor11a);
1010 pEepData->calTargetPower5GHT40,
1012 &targetPowerHt40, 8, 1);
1014 pEepData->calTargetPower5G,
1016 &targetPowerOfdmExt, 4, 1);
1017 }
1018 }
1019
1020 for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) {
1021 int isHt40CtlMode = (pCtlMode[ctlMode] == CTL_5GHT40) ||
1022 (pCtlMode[ctlMode] == CTL_2GHT40);
1023 if (isHt40CtlMode)
1024 freq = centers.synth_center;
1025 else if (pCtlMode[ctlMode] & EXT_ADDITIVE)
1026 freq = centers.ext_center;
1027 else
1028 freq = centers.ctl_center;
1029
1030 if (ah->eep_ops->get_eeprom_ver(ah) == 14 &&
1031 ah->eep_ops->get_eeprom_rev(ah) <= 2)
1032 twiceMaxEdgePower = MAX_RATE_POWER;
1033
1034 for (i = 0; (i < AR5416_NUM_CTLS) && pEepData->ctlIndex[i]; i++) {
1035 if ((((cfgCtl & ~CTL_MODE_M) |
1036 (pCtlMode[ctlMode] & CTL_MODE_M)) ==
1037 pEepData->ctlIndex[i]) ||
1038 (((cfgCtl & ~CTL_MODE_M) |
1039 (pCtlMode[ctlMode] & CTL_MODE_M)) ==
1040 ((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))) {
1041 rep = &(pEepData->ctlData[i]);
1042
1043 twiceMinEdgePower = ath9k_hw_get_max_edge_power(freq,
1044 rep->ctlEdges[ar5416_get_ntxchains(tx_chainmask) - 1],
1046
1047 if ((cfgCtl & ~CTL_MODE_M) == SD_NO_CTL) {
1048 twiceMaxEdgePower = min(twiceMaxEdgePower,
1049 twiceMinEdgePower);
1050 } else {
1051 twiceMaxEdgePower = twiceMinEdgePower;
1052 break;
1053 }
1054 }
1055 }
1056
1057 minCtlPower = min(twiceMaxEdgePower, scaledPower);
1058
1059 switch (pCtlMode[ctlMode]) {
1060 case CTL_11B:
1061 for (i = 0; i < ARRAY_SIZE(targetPowerCck.tPow2x); i++) {
1062 targetPowerCck.tPow2x[i] =
1063 min((u16)targetPowerCck.tPow2x[i],
1064 minCtlPower);
1065 }
1066 break;
1067 case CTL_11A:
1068 case CTL_11G:
1069 for (i = 0; i < ARRAY_SIZE(targetPowerOfdm.tPow2x); i++) {
1070 targetPowerOfdm.tPow2x[i] =
1071 min((u16)targetPowerOfdm.tPow2x[i],
1072 minCtlPower);
1073 }
1074 break;
1075 case CTL_5GHT20:
1076 case CTL_2GHT20:
1077 for (i = 0; i < ARRAY_SIZE(targetPowerHt20.tPow2x); i++) {
1078 targetPowerHt20.tPow2x[i] =
1079 min((u16)targetPowerHt20.tPow2x[i],
1080 minCtlPower);
1081 }
1082 break;
1083 case CTL_11B_EXT:
1084 targetPowerCckExt.tPow2x[0] = min((u16)
1085 targetPowerCckExt.tPow2x[0],
1086 minCtlPower);
1087 break;
1088 case CTL_11A_EXT:
1089 case CTL_11G_EXT:
1090 targetPowerOfdmExt.tPow2x[0] = min((u16)
1091 targetPowerOfdmExt.tPow2x[0],
1092 minCtlPower);
1093 break;
1094 case CTL_5GHT40:
1095 case CTL_2GHT40:
1096 for (i = 0; i < ARRAY_SIZE(targetPowerHt40.tPow2x); i++) {
1097 targetPowerHt40.tPow2x[i] =
1098 min((u16)targetPowerHt40.tPow2x[i],
1099 minCtlPower);
1100 }
1101 break;
1102 default:
1103 break;
1104 }
1105 }
1106
1107 ratesArray[rate6mb] = ratesArray[rate9mb] = ratesArray[rate12mb] =
1108 ratesArray[rate18mb] = ratesArray[rate24mb] =
1109 targetPowerOfdm.tPow2x[0];
1110 ratesArray[rate36mb] = targetPowerOfdm.tPow2x[1];
1111 ratesArray[rate48mb] = targetPowerOfdm.tPow2x[2];
1112 ratesArray[rate54mb] = targetPowerOfdm.tPow2x[3];
1113 ratesArray[rateXr] = targetPowerOfdm.tPow2x[0];
1114
1115 for (i = 0; i < ARRAY_SIZE(targetPowerHt20.tPow2x); i++)
1116 ratesArray[rateHt20_0 + i] = targetPowerHt20.tPow2x[i];
1117
1118 if (IS_CHAN_2GHZ(chan)) {
1119 ratesArray[rate1l] = targetPowerCck.tPow2x[0];
1120 ratesArray[rate2s] = ratesArray[rate2l] =
1121 targetPowerCck.tPow2x[1];
1122 ratesArray[rate5_5s] = ratesArray[rate5_5l] =
1123 targetPowerCck.tPow2x[2];
1124 ratesArray[rate11s] = ratesArray[rate11l] =
1125 targetPowerCck.tPow2x[3];
1126 }
1127 if (IS_CHAN_HT40(chan)) {
1128 for (i = 0; i < ARRAY_SIZE(targetPowerHt40.tPow2x); i++) {
1129 ratesArray[rateHt40_0 + i] =
1130 targetPowerHt40.tPow2x[i];
1131 }
1132 ratesArray[rateDupOfdm] = targetPowerHt40.tPow2x[0];
1133 ratesArray[rateDupCck] = targetPowerHt40.tPow2x[0];
1134 ratesArray[rateExtOfdm] = targetPowerOfdmExt.tPow2x[0];
1135 if (IS_CHAN_2GHZ(chan)) {
1136 ratesArray[rateExtCck] =
1137 targetPowerCckExt.tPow2x[0];
1138 }
1139 }
1140}
#define ar5416_get_ntxchains(_txchainmask)
Definition eeprom.h:707
#define CTL_2GHT20
Definition eeprom.h:74
#define CTL_2GHT40
Definition eeprom.h:76
#define CTL_MODE_M
Definition eeprom.h:70
#define AR5416_NUM_5G_40_TARGET_POWERS
Definition eeprom.h:148
#define CTL_11G
Definition eeprom.h:73
#define CTL_5GHT20
Definition eeprom.h:75
#define AR5416_NUM_2G_40_TARGET_POWERS
Definition eeprom.h:151
#define CTL_11A
Definition eeprom.h:71
#define AR5416_NUM_CTLS
Definition eeprom.h:152
#define SD_NO_CTL
Definition eeprom.h:68
#define AR5416_NUM_BAND_EDGES
Definition eeprom.h:153
#define AR5416_NUM_5G_20_TARGET_POWERS
Definition eeprom.h:147
#define CTL_11B
Definition eeprom.h:72
#define CTL_5GHT40
Definition eeprom.h:77
#define AR5416_NUM_2G_20_TARGET_POWERS
Definition eeprom.h:150
@ rateExtCck
Definition eeprom.h:273
@ rate5_5s
Definition eeprom.h:268
@ rate48mb
Definition eeprom.h:266
@ rate12mb
Definition eeprom.h:265
@ rateExtOfdm
Definition eeprom.h:273
@ rate9mb
Definition eeprom.h:265
@ rateDupCck
Definition eeprom.h:273
@ rateDupOfdm
Definition eeprom.h:273
@ rate18mb
Definition eeprom.h:265
@ rate11l
Definition eeprom.h:268
@ rateHt20_0
Definition eeprom.h:269
@ rate6mb
Definition eeprom.h:265
@ rate36mb
Definition eeprom.h:266
@ rate5_5l
Definition eeprom.h:267
@ rate1l
Definition eeprom.h:267
@ rate54mb
Definition eeprom.h:266
@ rate24mb
Definition eeprom.h:266
@ rate2s
Definition eeprom.h:267
@ rate11s
Definition eeprom.h:268
@ rate2l
Definition eeprom.h:267
@ rateHt40_0
Definition eeprom.h:271
@ rateXr
Definition eeprom.h:268
#define AR5416_NUM_2G_CCK_TARGET_POWERS
Definition eeprom.h:149
#define SUB_NUM_CTL_MODES_AT_5G_40
#define CTL_11G_EXT
#define EXT_ADDITIVE
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN
#define CTL_11A_EXT
#define CTL_11B_EXT
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN
#define SUB_NUM_CTL_MODES_AT_2G_40
void ath9k_hw_get_target_powers(struct ath_hw *ah, struct ath9k_channel *chan, struct cal_target_power_ht *powInfo, u16 numChannels, struct cal_target_power_ht *pNewPower, u16 numRates, int isHt40Target)
void ath9k_hw_get_legacy_target_powers(struct ath_hw *ah, struct ath9k_channel *chan, struct cal_target_power_leg *powInfo, u16 numChannels, struct cal_target_power_leg *pNewPower, u16 numRates, int isExtTarget)
u16 ath9k_hw_get_max_edge_power(u16 freq, struct cal_ctl_edges *pRdEdgesPower, int is2GHz, int num_band_edges)
#define max(x, y)
Definition ath.h:41
static struct ath_regulatory * ath9k_hw_regulatory(struct ath_hw *ah)
Definition hw.h:875
@ ATH9K_TP_SCALE_MAX
Definition hw.h:387
struct cal_target_power_leg calTargetPowerCck[AR5416_NUM_2G_CCK_TARGET_POWERS]
Definition eeprom.h:583
struct cal_target_power_ht calTargetPower2GHT20[AR5416_NUM_2G_20_TARGET_POWERS]
Definition eeprom.h:587
u8 ctlIndex[AR5416_NUM_CTLS]
Definition eeprom.h:591
struct cal_target_power_ht calTargetPower5GHT20[AR5416_NUM_5G_20_TARGET_POWERS]
Definition eeprom.h:579
struct cal_target_power_ht calTargetPower2GHT40[AR5416_NUM_2G_40_TARGET_POWERS]
Definition eeprom.h:589
struct cal_target_power_leg calTargetPower2G[AR5416_NUM_2G_20_TARGET_POWERS]
Definition eeprom.h:585
struct cal_ctl_data ctlData[AR5416_NUM_CTLS]
Definition eeprom.h:592
struct cal_target_power_leg calTargetPower5G[AR5416_NUM_5G_20_TARGET_POWERS]
Definition eeprom.h:577
struct cal_target_power_ht calTargetPower5GHT40[AR5416_NUM_5G_40_TARGET_POWERS]
Definition eeprom.h:581
u32 tp_scale
Definition ath.h:142
struct cal_ctl_edges ctlEdges[AR5416_MAX_CHAINS][AR5416_NUM_BAND_EDGES]
Definition eeprom.h:558

References ah, ar5416_get_ntxchains, AR5416_NUM_2G_20_TARGET_POWERS, AR5416_NUM_2G_40_TARGET_POWERS, AR5416_NUM_2G_CCK_TARGET_POWERS, AR5416_NUM_5G_20_TARGET_POWERS, AR5416_NUM_5G_40_TARGET_POWERS, AR5416_NUM_BAND_EDGES, AR5416_NUM_CTLS, ARRAY_SIZE, ath9k_hw_get_channel_centers(), ath9k_hw_get_legacy_target_powers(), ath9k_hw_get_max_edge_power(), ath9k_hw_get_target_powers(), ath9k_hw_regulatory(), ATH9K_TP_SCALE_MAX, ar5416_eeprom_def::calTargetPower2G, ar5416_eeprom_def::calTargetPower2GHT20, ar5416_eeprom_def::calTargetPower2GHT40, ar5416_eeprom_def::calTargetPower5G, ar5416_eeprom_def::calTargetPower5GHT20, ar5416_eeprom_def::calTargetPower5GHT40, ar5416_eeprom_def::calTargetPowerCck, CTL_11A, CTL_11A_EXT, CTL_11B, CTL_11B_EXT, CTL_11G, CTL_11G_EXT, CTL_2GHT20, CTL_2GHT40, CTL_5GHT20, CTL_5GHT40, chan_centers::ctl_center, CTL_MODE_M, ar5416_eeprom_def::ctlData, cal_ctl_data::ctlEdges, ar5416_eeprom_def::ctlIndex, EXT_ADDITIVE, chan_centers::ext_center, IS_CHAN_2GHZ, IS_CHAN_HT40, max, MAX_RATE_POWER, min, ar5416_eeprom_def::modalHeader, rate11l, rate11s, rate12mb, rate18mb, rate1l, rate24mb, rate2l, rate2s, rate36mb, rate48mb, rate54mb, rate5_5l, rate5_5s, rate6mb, rate9mb, rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, rateHt20_0, rateHt40_0, rateXr, REDUCE_SCALED_POWER_BY_THREE_CHAIN, REDUCE_SCALED_POWER_BY_TWO_CHAIN, SD_NO_CTL, SUB_NUM_CTL_MODES_AT_2G_40, SUB_NUM_CTL_MODES_AT_5G_40, chan_centers::synth_center, ath_regulatory::tp_scale, cal_target_power_ht::tPow2x, cal_target_power_leg::tPow2x, u16, and u8.

Referenced by ath9k_hw_def_set_txpower().

◆ ath9k_hw_def_set_txpower()

void ath9k_hw_def_set_txpower ( struct ath_hw * ah,
struct ath9k_channel * chan,
u16 cfgCtl,
u8 twiceAntennaReduction,
u8 twiceMaxRegulatoryPower,
u8 powerLimit,
int test )
static

Definition at line 1142 of file ath9k_eeprom_def.c.

1148{
1149#define RT_AR_DELTA(x) (ratesArray[x] - cck_ofdm_delta)
1150 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
1151 struct ar5416_eeprom_def *pEepData = &ah->eeprom.def;
1152 struct modal_eep_header *pModal =
1153 &(pEepData->modalHeader[IS_CHAN_2GHZ(chan)]);
1154 int16_t ratesArray[Ar5416RateSize];
1155 int16_t txPowerIndexOffset = 0;
1157 unsigned int i, cck_ofdm_delta = 0;
1158
1159 memset(ratesArray, 0, sizeof(ratesArray));
1160
1164 }
1165
1167 &ratesArray[0], cfgCtl,
1168 twiceAntennaReduction,
1169 twiceMaxRegulatoryPower,
1170 powerLimit);
1171
1172 ath9k_hw_set_def_power_cal_table(ah, chan, &txPowerIndexOffset);
1173
1174 regulatory->max_power_level = 0;
1175 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) {
1176 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]);
1177 if (ratesArray[i] > MAX_RATE_POWER)
1178 ratesArray[i] = MAX_RATE_POWER;
1179 if (ratesArray[i] > regulatory->max_power_level)
1180 regulatory->max_power_level = ratesArray[i];
1181 }
1182
1183 if (!test) {
1184 i = rate6mb;
1185
1186 if (IS_CHAN_HT40(chan))
1187 i = rateHt40_0;
1188 else if (IS_CHAN_HT20(chan))
1189 i = rateHt20_0;
1190
1191 regulatory->max_power_level = ratesArray[i];
1192 }
1193
1194 switch(ar5416_get_ntxchains(ah->txchainmask)) {
1195 case 1:
1196 break;
1197 case 2:
1199 break;
1200 case 3:
1202 break;
1203 default:
1204 DBG2("ath9k: "
1205 "Invalid chainmask configuration\n");
1206 break;
1207 }
1208
1209 if (test)
1210 return;
1211
1213 for (i = 0; i < Ar5416RateSize; i++) {
1214 int8_t pwr_table_offset;
1215
1216 pwr_table_offset = ah->eep_ops->get_eeprom(ah,
1218 ratesArray[i] -= pwr_table_offset * 2;
1219 }
1220 }
1221
1223
1225 ATH9K_POW_SM(ratesArray[rate18mb], 24)
1226 | ATH9K_POW_SM(ratesArray[rate12mb], 16)
1227 | ATH9K_POW_SM(ratesArray[rate9mb], 8)
1228 | ATH9K_POW_SM(ratesArray[rate6mb], 0));
1230 ATH9K_POW_SM(ratesArray[rate54mb], 24)
1231 | ATH9K_POW_SM(ratesArray[rate48mb], 16)
1232 | ATH9K_POW_SM(ratesArray[rate36mb], 8)
1233 | ATH9K_POW_SM(ratesArray[rate24mb], 0));
1234
1235 if (IS_CHAN_2GHZ(chan)) {
1237 cck_ofdm_delta = 2;
1241 | ATH9K_POW_SM(ratesArray[rateXr], 8)
1248 } else {
1250 ATH9K_POW_SM(ratesArray[rate2s], 24)
1251 | ATH9K_POW_SM(ratesArray[rate2l], 16)
1252 | ATH9K_POW_SM(ratesArray[rateXr], 8)
1253 | ATH9K_POW_SM(ratesArray[rate1l], 0));
1255 ATH9K_POW_SM(ratesArray[rate11s], 24)
1256 | ATH9K_POW_SM(ratesArray[rate11l], 16)
1257 | ATH9K_POW_SM(ratesArray[rate5_5s], 8)
1258 | ATH9K_POW_SM(ratesArray[rate5_5l], 0));
1259 }
1260 }
1261
1263 ATH9K_POW_SM(ratesArray[rateHt20_3], 24)
1264 | ATH9K_POW_SM(ratesArray[rateHt20_2], 16)
1265 | ATH9K_POW_SM(ratesArray[rateHt20_1], 8)
1266 | ATH9K_POW_SM(ratesArray[rateHt20_0], 0));
1268 ATH9K_POW_SM(ratesArray[rateHt20_7], 24)
1269 | ATH9K_POW_SM(ratesArray[rateHt20_6], 16)
1270 | ATH9K_POW_SM(ratesArray[rateHt20_5], 8)
1271 | ATH9K_POW_SM(ratesArray[rateHt20_4], 0));
1272
1273 if (IS_CHAN_HT40(chan)) {
1275 ATH9K_POW_SM(ratesArray[rateHt40_3] +
1277 | ATH9K_POW_SM(ratesArray[rateHt40_2] +
1279 | ATH9K_POW_SM(ratesArray[rateHt40_1] +
1281 | ATH9K_POW_SM(ratesArray[rateHt40_0] +
1284 ATH9K_POW_SM(ratesArray[rateHt40_7] +
1286 | ATH9K_POW_SM(ratesArray[rateHt40_6] +
1288 | ATH9K_POW_SM(ratesArray[rateHt40_5] +
1290 | ATH9K_POW_SM(ratesArray[rateHt40_4] +
1294 ATH9K_POW_SM(ratesArray[rateExtOfdm], 24)
1296 | ATH9K_POW_SM(ratesArray[rateDupOfdm], 8)
1298 } else {
1300 ATH9K_POW_SM(ratesArray[rateExtOfdm], 24)
1301 | ATH9K_POW_SM(ratesArray[rateExtCck], 16)
1302 | ATH9K_POW_SM(ratesArray[rateDupOfdm], 8)
1303 | ATH9K_POW_SM(ratesArray[rateDupCck], 0));
1304 }
1305 }
1306
1309 | ATH9K_POW_SM(pModal->pwrDecreaseFor2Chain, 0));
1310
1312}
#define AR_PHY_POWER_TX_RATE2
Definition ar9002_phy.h:208
#define AR_PHY_POWER_TX_RATE3
Definition ar9002_phy.h:452
#define AR_PHY_POWER_TX_SUB
Definition ar9002_phy.h:561
#define AR_PHY_POWER_TX_RATE5
Definition ar9002_phy.h:556
#define AR_PHY_POWER_TX_RATE4
Definition ar9002_phy.h:453
#define AR_PHY_POWER_TX_RATE6
Definition ar9002_phy.h:557
#define AR_PHY_POWER_TX_RATE1
Definition ar9002_phy.h:207
#define AR_PHY_POWER_TX_RATE8
Definition ar9002_phy.h:563
#define AR_PHY_POWER_TX_RATE7
Definition ar9002_phy.h:562
#define AR_PHY_POWER_TX_RATE9
Definition ar9002_phy.h:564
#define INCREASE_MAXPOW_BY_THREE_CHAIN
Definition eeprom.h:88
#define ATH9K_POW_SM(_r, _s)
Definition eeprom.h:102
#define INCREASE_MAXPOW_BY_TWO_CHAIN
Definition eeprom.h:87
@ Ar5416RateSize
Definition eeprom.h:274
@ rateHt20_5
Definition eeprom.h:270
@ rateHt40_2
Definition eeprom.h:271
@ rateHt20_4
Definition eeprom.h:270
@ rateHt40_4
Definition eeprom.h:272
@ rateHt20_3
Definition eeprom.h:269
@ rateHt20_7
Definition eeprom.h:270
@ rateHt40_7
Definition eeprom.h:272
@ rateHt40_6
Definition eeprom.h:272
@ rateHt40_1
Definition eeprom.h:271
@ rateHt20_1
Definition eeprom.h:269
@ rateHt40_5
Definition eeprom.h:272
@ rateHt20_2
Definition eeprom.h:269
@ rateHt20_6
Definition eeprom.h:270
@ rateHt40_3
Definition eeprom.h:271
static void ath9k_hw_set_def_power_cal_table(struct ath_hw *ah, struct ath9k_channel *chan, int16_t *pTxPowerIndexOffset)
#define RT_AR_DELTA(x)
static void ath9k_hw_set_def_power_per_rate_table(struct ath_hw *ah, struct ath9k_channel *chan, int16_t *ratesArray, u16 cfgCtl, u16 AntennaReduction, u16 twiceMaxRegulatoryPower, u16 powerLimit)
static int test
Definition epic100.c:73
#define IS_CHAN_HT20(_c)
Definition hw.h:371
void * memset(void *dest, int character, size_t len) __nonnull
u16 max_power_level
Definition ath.h:141
u8 pwrDecreaseFor3Chain
Definition eeprom.h:361
u8 pwrDecreaseFor2Chain
Definition eeprom.h:360
u8 ht40PowerIncForPdadc
Definition eeprom.h:364

References ah, AR5416_EEP_MINOR_VER_2, AR5416_EEP_VER_MINOR_MASK, ar5416_get_ntxchains, Ar5416RateSize, AR_PHY_POWER_TX_RATE1, AR_PHY_POWER_TX_RATE2, AR_PHY_POWER_TX_RATE3, AR_PHY_POWER_TX_RATE4, AR_PHY_POWER_TX_RATE5, AR_PHY_POWER_TX_RATE6, AR_PHY_POWER_TX_RATE7, AR_PHY_POWER_TX_RATE8, AR_PHY_POWER_TX_RATE9, AR_PHY_POWER_TX_SUB, AR_SREV_9280_20_OR_LATER, ARRAY_SIZE, ath9k_hw_regulatory(), ath9k_hw_set_def_power_cal_table(), ath9k_hw_set_def_power_per_rate_table(), ATH9K_POW_SM, ar5416_eeprom_def::baseEepHeader, DBG2, EEP_PWR_TABLE_OFFSET, ENABLE_REGWRITE_BUFFER, modal_eep_header::ht40PowerIncForPdadc, INCREASE_MAXPOW_BY_THREE_CHAIN, INCREASE_MAXPOW_BY_TWO_CHAIN, IS_CHAN_2GHZ, IS_CHAN_HT20, IS_CHAN_HT40, ath_regulatory::max_power_level, MAX_RATE_POWER, memset(), ar5416_eeprom_def::modalHeader, OLC_FOR_AR9280_20_LATER, modal_eep_header::pwrDecreaseFor2Chain, modal_eep_header::pwrDecreaseFor3Chain, rate11l, rate11s, rate12mb, rate18mb, rate1l, rate24mb, rate2l, rate2s, rate36mb, rate48mb, rate54mb, rate5_5l, rate5_5s, rate6mb, rate9mb, rateDupCck, rateDupOfdm, rateExtCck, rateExtOfdm, rateHt20_0, rateHt20_1, rateHt20_2, rateHt20_3, rateHt20_4, rateHt20_5, rateHt20_6, rateHt20_7, rateHt40_0, rateHt40_1, rateHt40_2, rateHt40_3, rateHt40_4, rateHt40_5, rateHt40_6, rateHt40_7, rateXr, REG_WRITE, REGWRITE_BUFFER_FLUSH, RT_AR_DELTA, test, u16, u8, and base_eep_header::version.

◆ ath9k_hw_def_get_spur_channel()

u16 ath9k_hw_def_get_spur_channel ( struct ath_hw * ah,
u16 i,
int is2GHz )
static

Definition at line 1314 of file ath9k_eeprom_def.c.

1315{
1316#define EEP_DEF_SPURCHAN \
1317 (ah->eeprom.def.modalHeader[is2GHz].spurChans[i].spurChan)
1318
1319 u16 spur_val = AR_NO_SPUR;
1320
1321 DBG2("ath9k: "
1322 "Getting spur idx:%d is2Ghz:%d val:%x\n",
1323 i, is2GHz, ah->config.spurchans[i][is2GHz]);
1324
1325 switch (ah->config.spurmode) {
1326 case SPUR_DISABLE:
1327 break;
1328 case SPUR_ENABLE_IOCTL:
1329 spur_val = ah->config.spurchans[i][is2GHz];
1330 DBG2("ath9k: "
1331 "Getting spur val from new loc. %d\n", spur_val);
1332 break;
1333 case SPUR_ENABLE_EEPROM:
1334 spur_val = EEP_DEF_SPURCHAN;
1335 break;
1336 }
1337
1338 return spur_val;
1339
1340#undef EEP_DEF_SPURCHAN
1341}
#define EEP_DEF_SPURCHAN
#define SPUR_ENABLE_IOCTL
Definition hw.h:237
#define SPUR_DISABLE
Definition hw.h:236
#define SPUR_ENABLE_EEPROM
Definition hw.h:238
#define AR_NO_SPUR
Definition hw.h:241

References ah, AR_NO_SPUR, DBG2, EEP_DEF_SPURCHAN, SPUR_DISABLE, SPUR_ENABLE_EEPROM, SPUR_ENABLE_IOCTL, and u16.

Variable Documentation

◆ eep_def_ops

const struct eeprom_ops eep_def_ops
Initial value:
= {
.check_eeprom = ath9k_hw_def_check_eeprom,
.get_eeprom = ath9k_hw_def_get_eeprom,
.fill_eeprom = ath9k_hw_def_fill_eeprom,
.get_eeprom_ver = ath9k_hw_def_get_eeprom_ver,
.get_eeprom_rev = ath9k_hw_def_get_eeprom_rev,
.set_board_values = ath9k_hw_def_set_board_values,
.set_addac = ath9k_hw_def_set_addac,
.set_txpower = ath9k_hw_def_set_txpower,
.get_spur_channel = ath9k_hw_def_get_spur_channel
}
static void ath9k_hw_def_set_txpower(struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test)
static void ath9k_hw_def_set_board_values(struct ath_hw *ah, struct ath9k_channel *chan)
static u16 ath9k_hw_def_get_spur_channel(struct ath_hw *ah, u16 i, int is2GHz)
static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah)
static int ath9k_hw_def_get_eeprom_ver(struct ath_hw *ah)
static u32 ath9k_hw_def_get_eeprom(struct ath_hw *ah, enum eeprom_param param)
static int ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
static void ath9k_hw_def_set_addac(struct ath_hw *ah, struct ath9k_channel *chan)
static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)

Definition at line 1343 of file ath9k_eeprom_def.c.

1343 {
1344 .check_eeprom = ath9k_hw_def_check_eeprom,
1345 .get_eeprom = ath9k_hw_def_get_eeprom,
1346 .fill_eeprom = ath9k_hw_def_fill_eeprom,
1347 .get_eeprom_ver = ath9k_hw_def_get_eeprom_ver,
1348 .get_eeprom_rev = ath9k_hw_def_get_eeprom_rev,
1349 .set_board_values = ath9k_hw_def_set_board_values,
1350 .set_addac = ath9k_hw_def_set_addac,
1351 .set_txpower = ath9k_hw_def_set_txpower,
1352 .get_spur_channel = ath9k_hw_def_get_spur_channel
1353};

Referenced by ath9k_hw_eeprom_init().