iPXE
ath9k_eeprom_9287.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_AR9287   (sizeof(struct ar9287_eeprom) / sizeof(u16))
#define CMP_CTL
#define CMP_NO_CTL
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN   6
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN   10
#define EEP_MAP9287_SPURCHAN    (ah->eeprom.map9287.modalHeader.spurChans[i].spurChan)

Functions

 FILE_SECBOOT (FORBIDDEN)
static int ath9k_hw_ar9287_get_eeprom_ver (struct ath_hw *ah)
static int ath9k_hw_ar9287_get_eeprom_rev (struct ath_hw *ah)
static int __ath9k_hw_ar9287_fill_eeprom (struct ath_hw *ah)
static int __ath9k_hw_usb_ar9287_fill_eeprom (struct ath_hw *ah)
static int ath9k_hw_ar9287_fill_eeprom (struct ath_hw *ah)
static int ath9k_hw_ar9287_check_eeprom (struct ath_hw *ah)
static u32 ath9k_hw_ar9287_get_eeprom (struct ath_hw *ah, enum eeprom_param param)
static void ar9287_eeprom_get_tx_gain_index (struct ath_hw *ah, struct ath9k_channel *chan, struct cal_data_op_loop_ar9287 *pRawDatasetOpLoop, u8 *pCalChans, u16 availPiers, int8_t *pPwr)
static void ar9287_eeprom_olpc_set_pdadcs (struct ath_hw *ah, int32_t txPower, u16 chain)
static void ath9k_hw_set_ar9287_power_cal_table (struct ath_hw *ah, struct ath9k_channel *chan, int16_t *pTxPowerIndexOffset)
static void ath9k_hw_set_ar9287_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_ar9287_set_txpower (struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test)
static void ath9k_hw_ar9287_set_addac (struct ath_hw *ah __unused, struct ath9k_channel *chan __unused)
static void ath9k_hw_ar9287_set_board_values (struct ath_hw *ah, struct ath9k_channel *chan)
static u16 ath9k_hw_ar9287_get_spur_channel (struct ath_hw *ah, u16 i, int is2GHz)

Variables

const struct eeprom_ops eep_ar9287_ops

Macro Definition Documentation

◆ SIZE_EEPROM_AR9287

#define SIZE_EEPROM_AR9287   (sizeof(struct ar9287_eeprom) / sizeof(u16))

◆ CMP_CTL

#define CMP_CTL
Value:
(((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == \
pEepData->ctlIndex[i])
#define CTL_MODE_M
Definition eeprom.h:70

Referenced by ath9k_hw_set_ar9287_power_per_rate_table().

◆ CMP_NO_CTL

#define CMP_NO_CTL
Value:
(((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == \
((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))
#define SD_NO_CTL
Definition eeprom.h:68

Referenced by ath9k_hw_set_ar9287_power_per_rate_table().

◆ REDUCE_SCALED_POWER_BY_TWO_CHAIN

#define REDUCE_SCALED_POWER_BY_TWO_CHAIN   6

◆ REDUCE_SCALED_POWER_BY_THREE_CHAIN

#define REDUCE_SCALED_POWER_BY_THREE_CHAIN   10

◆ EEP_MAP9287_SPURCHAN

#define EEP_MAP9287_SPURCHAN    (ah->eeprom.map9287.modalHeader.spurChans[i].spurChan)

Function Documentation

◆ FILE_SECBOOT()

FILE_SECBOOT ( FORBIDDEN )

◆ ath9k_hw_ar9287_get_eeprom_ver()

int ath9k_hw_ar9287_get_eeprom_ver ( struct ath_hw * ah)
static

Definition at line 29 of file ath9k_eeprom_9287.c.

30{
31 return (ah->eeprom.map9287.baseEepHeader.version >> 12) & 0xF;
32}
uint8_t ah
Definition registers.h:1

References ah.

◆ ath9k_hw_ar9287_get_eeprom_rev()

int ath9k_hw_ar9287_get_eeprom_rev ( struct ath_hw * ah)
static

Definition at line 34 of file ath9k_eeprom_9287.c.

35{
36 return (ah->eeprom.map9287.baseEepHeader.version) & 0xFFF;
37}

References ah.

◆ __ath9k_hw_ar9287_fill_eeprom()

int __ath9k_hw_ar9287_fill_eeprom ( struct ath_hw * ah)
static

Definition at line 39 of file ath9k_eeprom_9287.c.

40{
41 struct ar9287_eeprom *eep = &ah->eeprom.map9287;
43 u16 *eep_data;
44 unsigned int addr;
45 int eep_start_loc = AR9287_EEP_START_LOC;
46 eep_data = (u16 *)eep;
47
48 for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
49 if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
50 eep_data)) {
51 DBG("ath9k: "
52 "Unable to read eeprom region\n");
53 return 0;
54 }
55 eep_data++;
56 }
57
58 return 1;
59}
#define AR9287_EEP_START_LOC
Definition eeprom.h:194
int ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
#define SIZE_EEPROM_AR9287
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
#define u16
Definition vga.h:20

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

Referenced by ath9k_hw_ar9287_fill_eeprom().

◆ __ath9k_hw_usb_ar9287_fill_eeprom()

int __ath9k_hw_usb_ar9287_fill_eeprom ( struct ath_hw * ah)
static

Definition at line 61 of file ath9k_eeprom_9287.c.

62{
63 u16 *eep_data = (u16 *)&ah->eeprom.map9287;
64
68 return 1;
69}
#define AR9287_HTC_EEP_START_LOC
Definition eeprom.h:195
void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data, int eep_start_loc, int size)

References ah, AR9287_HTC_EEP_START_LOC, ath9k_hw_usb_gen_fill_eeprom(), SIZE_EEPROM_AR9287, and u16.

Referenced by ath9k_hw_ar9287_fill_eeprom().

◆ ath9k_hw_ar9287_fill_eeprom()

int ath9k_hw_ar9287_fill_eeprom ( struct ath_hw * ah)
static

Definition at line 71 of file ath9k_eeprom_9287.c.

72{
74
75 if (!ath9k_hw_use_flash(ah)) {
76 DBG2("ath9k: "
77 "Reading from EEPROM, not flash\n");
78 }
79
80 if (common->bus_ops->ath_bus_type == ATH_USB)
82 else
84}
#define ath9k_hw_use_flash(_ah)
Definition eeprom.h:104
static int __ath9k_hw_usb_ar9287_fill_eeprom(struct ath_hw *ah)
static int __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
@ ATH_USB
Definition ath.h:129
#define DBG2(...)
Definition compiler.h:515

References __ath9k_hw_ar9287_fill_eeprom(), __ath9k_hw_usb_ar9287_fill_eeprom(), ah, ath9k_hw_common(), ath9k_hw_use_flash, ATH_USB, common, and DBG2.

◆ ath9k_hw_ar9287_check_eeprom()

int ath9k_hw_ar9287_check_eeprom ( struct ath_hw * ah)
static

Definition at line 86 of file ath9k_eeprom_9287.c.

87{
88 u32 sum = 0, el, integer;
89 u16 temp, word, magic, magic2, *eepdata;
90 unsigned int i, addr;
91 int need_swap = 0;
92 struct ar9287_eeprom *eep = &ah->eeprom.map9287;
94
95 if (!ath9k_hw_use_flash(ah)) {
97 &magic)) {
98 DBG("ath9k: Reading Magic # failed\n");
99 return 0;
100 }
101
102 DBG2("ath9k: "
103 "Read Magic = 0x%04X\n", magic);
104
105 if (magic != AR5416_EEPROM_MAGIC) {
106 magic2 = swab16(magic);
107
108 if (magic2 == AR5416_EEPROM_MAGIC) {
109 need_swap = 1;
110 eepdata = (u16 *)(&ah->eeprom);
111
112 for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
113 temp = swab16(*eepdata);
114 *eepdata = temp;
115 eepdata++;
116 }
117 } else {
118 DBG("ath9k: "
119 "Invalid EEPROM Magic. Endianness mismatch.\n");
120 return -EINVAL;
121 }
122 }
123 }
124
125 DBG2("ath9k: need_swap = %s.\n",
126 need_swap ? "True" : "False");
127
128 if (need_swap)
129 el = swab16(ah->eeprom.map9287.baseEepHeader.length);
130 else
131 el = ah->eeprom.map9287.baseEepHeader.length;
132
133 if (el > sizeof(struct ar9287_eeprom))
134 el = sizeof(struct ar9287_eeprom) / sizeof(u16);
135 else
136 el = el / sizeof(u16);
137
138 eepdata = (u16 *)(&ah->eeprom);
139
140 for (i = 0; i < el; i++)
141 sum ^= *eepdata++;
142
143 if (need_swap) {
146
149
152
153 word = swab16(eep->baseEepHeader.regDmn[0]);
154 eep->baseEepHeader.regDmn[0] = word;
155
156 word = swab16(eep->baseEepHeader.regDmn[1]);
157 eep->baseEepHeader.regDmn[1] = word;
158
161
164
167
168 integer = swab32(eep->modalHeader.antCtrlCommon);
169 eep->modalHeader.antCtrlCommon = integer;
170
171 for (i = 0; i < AR9287_MAX_CHAINS; i++) {
172 integer = swab32(eep->modalHeader.antCtrlChain[i]);
173 eep->modalHeader.antCtrlChain[i] = integer;
174 }
175
176 for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
179 }
180 }
181
182 if (sum != 0xffff || ah->eep_ops->get_eeprom_ver(ah) != AR9287_EEP_VER
183 || ah->eep_ops->get_eeprom_rev(ah) < AR5416_EEP_NO_BACK_VER) {
184 DBG("ath9k: Bad EEPROM checksum 0x%x or revision 0x%04x\n",
185 sum, ah->eep_ops->get_eeprom_ver(ah));
186 return -EINVAL;
187 }
188
189 return 0;
190}
#define AR5416_EEP_NO_BACK_VER
Definition eeprom.h:131
#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 AR9287_MAX_CHAINS
Definition eeprom.h:205
#define AR9287_EEP_VER
Definition eeprom.h:185
#define swab32
Definition ath.h:69
#define swab16
Definition ath.h:68
uint16_t magic
Magic signature.
Definition bzimage.h:1
#define EINVAL
Invalid argument.
Definition errno.h:429
unsigned short word
Definition smc9000.h:39
struct base_eep_ar9287_header baseEepHeader
Definition eeprom.h:617
struct modal_eep_ar9287_header modalHeader
Definition eeprom.h:619
u32 antCtrlChain[AR9287_MAX_CHAINS]
Definition eeprom.h:475
struct spur_chan spurChans[AR_EEPROM_MODAL_SPURS]
Definition eeprom.h:507
u16 spurChan
Definition eeprom.h:332
#define u32
Definition vga.h:21

References addr, ah, modal_eep_ar9287_header::antCtrlChain, modal_eep_ar9287_header::antCtrlCommon, AR5416_EEP_NO_BACK_VER, AR5416_EEPROM_MAGIC, AR5416_EEPROM_MAGIC_OFFSET, AR9287_EEP_VER, AR9287_MAX_CHAINS, AR_EEPROM_MODAL_SPURS, ath9k_hw_common(), ath9k_hw_nvram_read(), ath9k_hw_use_flash, ar9287_eeprom::baseEepHeader, base_eep_ar9287_header::blueToothOptions, base_eep_ar9287_header::checksum, common, DBG, DBG2, base_eep_ar9287_header::deviceCap, EINVAL, base_eep_ar9287_header::length, magic, ar9287_eeprom::modalHeader, base_eep_ar9287_header::regDmn, base_eep_ar9287_header::rfSilent, SIZE_EEPROM_AR9287, spur_chan::spurChan, modal_eep_ar9287_header::spurChans, swab16, swab32, u16, u32, and base_eep_ar9287_header::version.

◆ ath9k_hw_ar9287_get_eeprom()

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

Definition at line 192 of file ath9k_eeprom_9287.c.

194{
195 struct ar9287_eeprom *eep = &ah->eeprom.map9287;
196 struct modal_eep_ar9287_header *pModal = &eep->modalHeader;
197 struct base_eep_ar9287_header *pBase = &eep->baseEepHeader;
198 u16 ver_minor;
199
200 ver_minor = pBase->version & AR9287_EEP_VER_MINOR_MASK;
201
202 switch (param) {
203 case EEP_NFTHRESH_2:
204 return pModal->noiseFloorThreshCh[0];
205 case EEP_MAC_LSW:
206 return pBase->macAddr[0] << 8 | pBase->macAddr[1];
207 case EEP_MAC_MID:
208 return pBase->macAddr[2] << 8 | pBase->macAddr[3];
209 case EEP_MAC_MSW:
210 return pBase->macAddr[4] << 8 | pBase->macAddr[5];
211 case EEP_REG_0:
212 return pBase->regDmn[0];
213 case EEP_REG_1:
214 return pBase->regDmn[1];
215 case EEP_OP_CAP:
216 return pBase->deviceCap;
217 case EEP_OP_MODE:
218 return pBase->opCapFlags;
219 case EEP_RF_SILENT:
220 return pBase->rfSilent;
221 case EEP_MINOR_REV:
222 return ver_minor;
223 case EEP_TX_MASK:
224 return pBase->txMask;
225 case EEP_RX_MASK:
226 return pBase->rxMask;
227 case EEP_DEV_TYPE:
228 return pBase->deviceType;
229 case EEP_OL_PWRCTRL:
230 return pBase->openLoopPwrCntl;
232 if (ver_minor >= AR9287_EEP_MINOR_VER_2)
233 return pBase->tempSensSlope;
234 else
235 return 0;
237 if (ver_minor >= AR9287_EEP_MINOR_VER_3)
238 return pBase->tempSensSlopePalOn;
239 else
240 return 0;
241 default:
242 return 0;
243 }
244}
#define AR9287_EEP_VER_MINOR_MASK
Definition eeprom.h:186
@ EEP_RF_SILENT
Definition eeprom.h:236
@ EEP_REG_0
Definition eeprom.h:232
@ EEP_DEV_TYPE
Definition eeprom.h:251
@ EEP_MINOR_REV
Definition eeprom.h:241
@ EEP_OL_PWRCTRL
Definition eeprom.h:246
@ EEP_OP_CAP
Definition eeprom.h:234
@ EEP_MAC_MSW
Definition eeprom.h:229
@ EEP_TEMPSENSE_SLOPE
Definition eeprom.h:252
@ EEP_RX_MASK
Definition eeprom.h:243
@ EEP_MAC_LSW
Definition eeprom.h:231
@ EEP_MAC_MID
Definition eeprom.h:230
@ 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_TEMPSENSE_SLOPE_PAL_ON
Definition eeprom.h:253
#define AR9287_EEP_MINOR_VER_3
Definition eeprom.h:189
#define AR9287_EEP_MINOR_VER_2
Definition eeprom.h:188
struct hv_monitor_parameter param[4][32]
Parameters.
Definition hyperv.h:13
int8_t tempSensSlopePalOn
Definition eeprom.h:470
int8_t noiseFloorThreshCh[AR9287_MAX_CHAINS]
Definition eeprom.h:486

References ah, AR9287_EEP_MINOR_VER_2, AR9287_EEP_MINOR_VER_3, AR9287_EEP_VER_MINOR_MASK, ar9287_eeprom::baseEepHeader, base_eep_ar9287_header::deviceCap, base_eep_ar9287_header::deviceType, EEP_DEV_TYPE, EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW, EEP_MINOR_REV, EEP_NFTHRESH_2, EEP_OL_PWRCTRL, EEP_OP_CAP, EEP_OP_MODE, EEP_REG_0, EEP_REG_1, EEP_RF_SILENT, EEP_RX_MASK, EEP_TEMPSENSE_SLOPE, EEP_TEMPSENSE_SLOPE_PAL_ON, EEP_TX_MASK, base_eep_ar9287_header::macAddr, ar9287_eeprom::modalHeader, modal_eep_ar9287_header::noiseFloorThreshCh, base_eep_ar9287_header::opCapFlags, base_eep_ar9287_header::openLoopPwrCntl, param, base_eep_ar9287_header::regDmn, base_eep_ar9287_header::rfSilent, base_eep_ar9287_header::rxMask, base_eep_ar9287_header::tempSensSlope, base_eep_ar9287_header::tempSensSlopePalOn, base_eep_ar9287_header::txMask, u16, u32, and base_eep_ar9287_header::version.

Referenced by ath9k_hw_ar9287_set_txpower(), and ath9k_hw_set_ar9287_power_cal_table().

◆ ar9287_eeprom_get_tx_gain_index()

void ar9287_eeprom_get_tx_gain_index ( struct ath_hw * ah,
struct ath9k_channel * chan,
struct cal_data_op_loop_ar9287 * pRawDatasetOpLoop,
u8 * pCalChans,
u16 availPiers,
int8_t * pPwr )
static

Definition at line 246 of file ath9k_eeprom_9287.c.

250{
251 u16 idxL = 0, idxR = 0, numPiers;
252 int match;
253 struct chan_centers centers;
254
255 ath9k_hw_get_channel_centers(ah, chan, &centers);
256
257 for (numPiers = 0; numPiers < availPiers; numPiers++) {
258 if (pCalChans[numPiers] == AR5416_BCHAN_UNUSED)
259 break;
260 }
261
263 (u8)FREQ2FBIN(centers.synth_center, IS_CHAN_2GHZ(chan)),
264 pCalChans, numPiers, &idxL, &idxR);
265
266 if (match) {
267 *pPwr = (int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0];
268 } else {
269 *pPwr = ((int8_t) pRawDatasetOpLoop[idxL].pwrPdg[0][0] +
270 (int8_t) pRawDatasetOpLoop[idxR].pwrPdg[0][0])/2;
271 }
272
273}
signed char int8_t
Definition stdint.h:15
#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

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

Referenced by ath9k_hw_set_ar9287_power_cal_table().

◆ ar9287_eeprom_olpc_set_pdadcs()

void ar9287_eeprom_olpc_set_pdadcs ( struct ath_hw * ah,
int32_t txPower,
u16 chain )
static

Definition at line 275 of file ath9k_eeprom_9287.c.

277{
278 u32 tmpVal;
279 u32 a;
280
281 /* Enable OLPC for chain 0 */
282
283 tmpVal = REG_READ(ah, 0xa270);
284 tmpVal = tmpVal & 0xFCFFFFFF;
285 tmpVal = tmpVal | (0x3 << 24);
286 REG_WRITE(ah, 0xa270, tmpVal);
287
288 /* Enable OLPC for chain 1 */
289
290 tmpVal = REG_READ(ah, 0xb270);
291 tmpVal = tmpVal & 0xFCFFFFFF;
292 tmpVal = tmpVal | (0x3 << 24);
293 REG_WRITE(ah, 0xb270, tmpVal);
294
295 /* Write the OLPC ref power for chain 0 */
296
297 if (chain == 0) {
298 tmpVal = REG_READ(ah, 0xa398);
299 tmpVal = tmpVal & 0xff00ffff;
300 a = (txPower)&0xff;
301 tmpVal = tmpVal | (a << 16);
302 REG_WRITE(ah, 0xa398, tmpVal);
303 }
304
305 /* Write the OLPC ref power for chain 1 */
306
307 if (chain == 1) {
308 tmpVal = REG_READ(ah, 0xb398);
309 tmpVal = tmpVal & 0xff00ffff;
310 a = (txPower)&0xff;
311 tmpVal = tmpVal | (a << 16);
312 REG_WRITE(ah, 0xb398, tmpVal);
313 }
314}
#define REG_WRITE(_ah, _reg, _val)
Definition hw.h:78
#define REG_READ(_ah, _reg)
Definition hw.h:81

References ah, REG_READ, REG_WRITE, u16, and u32.

Referenced by ath9k_hw_set_ar9287_power_cal_table().

◆ ath9k_hw_set_ar9287_power_cal_table()

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

Definition at line 316 of file ath9k_eeprom_9287.c.

319{
320 struct cal_data_per_freq_ar9287 *pRawDataset;
321 struct cal_data_op_loop_ar9287 *pRawDatasetOpenLoop;
322 u8 *pCalBChans = NULL;
323 u16 pdGainOverlap_t2;
324 u8 pdadcValues[AR5416_NUM_PDADC_VALUES];
325 u16 gainBoundaries[AR5416_PD_GAINS_IN_MASK];
326 u16 numPiers = 0, i, j;
327 u16 numXpdGain, xpdMask;
328 u16 xpdGainValues[AR5416_NUM_PD_GAINS] = {0, 0, 0, 0};
329 u32 reg32, regOffset, regChainOffset, regval;
330 int16_t diff = 0;
331 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;
332
333 xpdMask = pEepData->modalHeader.xpdGain;
334
337 pdGainOverlap_t2 = pEepData->modalHeader.pdGainOverlap;
338 else
339 pdGainOverlap_t2 = (u16)(MS(REG_READ(ah, AR_PHY_TPCRG5),
341
342 if (IS_CHAN_2GHZ(chan)) {
343 pCalBChans = pEepData->calFreqPier2G;
344 numPiers = AR9287_NUM_2G_CAL_PIERS;
346 pRawDatasetOpenLoop =
347 (struct cal_data_op_loop_ar9287 *)pEepData->calPierData2G[0];
348 ah->initPDADC = pRawDatasetOpenLoop->vpdPdg[0][0];
349 }
350 }
351
352 numXpdGain = 0;
353
354 /* Calculate the value of xpdgains from the xpdGain Mask */
355 for (i = 1; i <= AR5416_PD_GAINS_IN_MASK; i++) {
356 if ((xpdMask >> (AR5416_PD_GAINS_IN_MASK - i)) & 1) {
357 if (numXpdGain >= AR5416_NUM_PD_GAINS)
358 break;
359 xpdGainValues[numXpdGain] =
361 numXpdGain++;
362 }
363 }
364
366 (numXpdGain - 1) & 0x3);
368 xpdGainValues[0]);
370 xpdGainValues[1]);
372 xpdGainValues[2]);
373
374 for (i = 0; i < AR9287_MAX_CHAINS; i++) {
375 regChainOffset = i * 0x1000;
376
377 if (pEepData->baseEepHeader.txMask & (1 << i)) {
378 pRawDatasetOpenLoop =
379 (struct cal_data_op_loop_ar9287 *)pEepData->calPierData2G[i];
380
382 int8_t txPower;
384 pRawDatasetOpenLoop,
385 pCalBChans, numPiers,
386 &txPower);
388 } else {
389 pRawDataset =
390 (struct cal_data_per_freq_ar9287 *)
391 pEepData->calPierData2G[i];
392
394 pRawDataset,
395 pCalBChans, numPiers,
396 pdGainOverlap_t2,
397 gainBoundaries,
398 pdadcValues,
399 numXpdGain);
400 }
401
403
404 if (i == 0) {
407
408 regval = SM(pdGainOverlap_t2,
410 | SM(gainBoundaries[0],
412 | SM(gainBoundaries[1],
414 | SM(gainBoundaries[2],
416 | SM(gainBoundaries[3],
418
420 AR_PHY_TPCRG5 + regChainOffset,
421 regval);
422 }
423 }
424
426 pEepData->baseEepHeader.pwrTableOffset) {
427 diff = (u16)(pEepData->baseEepHeader.pwrTableOffset -
429 diff *= 2;
430
431 for (j = 0; j < ((u16)AR5416_NUM_PDADC_VALUES-diff); j++)
432 pdadcValues[j] = pdadcValues[j+diff];
433
434 for (j = (u16)(AR5416_NUM_PDADC_VALUES-diff);
436 pdadcValues[j] =
437 pdadcValues[AR5416_NUM_PDADC_VALUES-diff];
438 }
439
441 regOffset = AR_PHY_BASE +
442 (672 << 2) + regChainOffset;
443
444 for (j = 0; j < 32; j++) {
445 reg32 = ((pdadcValues[4*j + 0] & 0xFF) << 0)
446 | ((pdadcValues[4*j + 1] & 0xFF) << 8)
447 | ((pdadcValues[4*j + 2] & 0xFF) << 16)
448 | ((pdadcValues[4*j + 3] & 0xFF) << 24);
449
450 REG_WRITE(ah, regOffset, reg32);
451 regOffset += 4;
452 }
453 }
455 }
456 }
457
458 *pTxPowerIndexOffset = 0;
459}
#define NULL
NULL pointer (VOID *)
Definition Base.h:322
#define AR_PHY_TPCRG1
Definition ar9002_phy.h:460
#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4
Definition ar9002_phy.h:548
#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_BOUNDARY_2
Definition ar9002_phy.h:544
#define AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_1
Definition ar9002_phy.h:542
#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_TPCRG5_PD_GAIN_BOUNDARY_3
Definition ar9002_phy.h:546
#define AR_PHY_TPCRG1_PD_GAIN_1
Definition ar9002_phy.h:464
signed short int16_t
Definition stdint.h:16
signed int int32_t
Definition stdint.h:17
#define AR5416_NUM_PDADC_VALUES
Definition eeprom.h:157
#define AR9287_PWR_TABLE_OFFSET_DB
Definition eeprom.h:210
#define AR5416_NUM_PD_GAINS
Definition eeprom.h:154
#define AR9287_NUM_2G_CAL_PIERS
Definition eeprom.h:196
#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 void ar9287_eeprom_olpc_set_pdadcs(struct ath_hw *ah, int32_t txPower, u16 chain)
static u32 ath9k_hw_ar9287_get_eeprom(struct ath_hw *ah, enum eeprom_param param)
static void ar9287_eeprom_get_tx_gain_index(struct ath_hw *ah, struct ath9k_channel *chan, struct cal_data_op_loop_ar9287 *pRawDatasetOpLoop, u8 *pCalChans, u16 availPiers, int8_t *pPwr)
#define REGWRITE_BUFFER_FLUSH(_ah)
Definition hw.h:96
#define SM(_v, _f)
Definition hw.h:102
#define MS(_v, _f)
Definition hw.h:103
#define REG_RMW_FIELD(_a, _r, _f, _v)
Definition hw.h:104
#define ENABLE_REGWRITE_BUFFER(_ah)
Definition hw.h:90
#define AR_PHY_BASE
Definition phy.h:27
u8 calFreqPier2G[AR9287_NUM_2G_CAL_PIERS]
Definition eeprom.h:620
union cal_data_per_freq_ar9287_u calPierData2G[AR9287_MAX_CHAINS][AR9287_NUM_2G_CAL_PIERS]
Definition eeprom.h:621

References ah, AR5416_NUM_PD_GAINS, AR5416_NUM_PDADC_VALUES, AR5416_PD_GAINS_IN_MASK, AR9287_EEP_MINOR_VER_2, AR9287_EEP_VER_MINOR_MASK, ar9287_eeprom_get_tx_gain_index(), ar9287_eeprom_olpc_set_pdadcs(), AR9287_MAX_CHAINS, AR9287_NUM_2G_CAL_PIERS, AR9287_PWR_TABLE_OFFSET_DB, 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_BOUNDARY_1, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_2, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_3, AR_PHY_TPCRG5_PD_GAIN_BOUNDARY_4, AR_PHY_TPCRG5_PD_GAIN_OVERLAP, ath9k_hw_ar9287_get_eeprom(), ath9k_hw_get_gain_boundaries_pdadcs(), ar9287_eeprom::baseEepHeader, ar9287_eeprom::calFreqPier2G, ar9287_eeprom::calPierData2G, EEP_OL_PWRCTRL, ENABLE_REGWRITE_BUFFER, IS_CHAN_2GHZ, ar9287_eeprom::modalHeader, MS, NULL, modal_eep_ar9287_header::pdGainOverlap, base_eep_ar9287_header::pwrTableOffset, REG_READ, REG_RMW_FIELD, REG_WRITE, REGWRITE_BUFFER_FLUSH, SM, base_eep_ar9287_header::txMask, u16, u32, u8, base_eep_ar9287_header::version, cal_data_op_loop_ar9287::vpdPdg, and modal_eep_ar9287_header::xpdGain.

Referenced by ath9k_hw_ar9287_set_txpower().

◆ ath9k_hw_set_ar9287_power_per_rate_table()

void ath9k_hw_set_ar9287_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 461 of file ath9k_eeprom_9287.c.

468{
469#define CMP_CTL \
470 (((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == \
471 pEepData->ctlIndex[i])
472
473#define CMP_NO_CTL \
474 (((cfgCtl & ~CTL_MODE_M) | (pCtlMode[ctlMode] & CTL_MODE_M)) == \
475 ((pEepData->ctlIndex[i] & CTL_MODE_M) | SD_NO_CTL))
476
477#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6
478#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 10
479
480 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
481 u16 twiceMaxEdgePower = MAX_RATE_POWER;
482 static const u16 tpScaleReductionTable[5] =
483 { 0, 3, 6, 9, MAX_RATE_POWER };
484 unsigned int i;
485 int16_t twiceLargestAntenna;
486 struct cal_ctl_data_ar9287 *rep;
487 struct cal_target_power_leg targetPowerOfdm = {0, {0, 0, 0, 0} },
488 targetPowerCck = {0, {0, 0, 0, 0} };
489 struct cal_target_power_leg targetPowerOfdmExt = {0, {0, 0, 0, 0} },
490 targetPowerCckExt = {0, {0, 0, 0, 0} };
491 struct cal_target_power_ht targetPowerHt20,
492 targetPowerHt40 = {0, {0, 0, 0, 0} };
493 u16 scaledPower = 0, minCtlPower, maxRegAllowedPower;
494 static const u16 ctlModesFor11g[] = {
497 };
498 u16 numCtlModes = 0;
499 const u16 *pCtlMode = NULL;
500 u16 ctlMode, freq;
501 struct chan_centers centers;
502 int tx_chainmask;
503 u16 twiceMinEdgePower;
504 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;
505 tx_chainmask = ah->txchainmask;
506
507 ath9k_hw_get_channel_centers(ah, chan, &centers);
508
509 /* Compute TxPower reduction due to Antenna Gain */
510 twiceLargestAntenna = max(pEepData->modalHeader.antennaGainCh[0],
511 pEepData->modalHeader.antennaGainCh[1]);
512 twiceLargestAntenna = (int16_t)min((AntennaReduction) -
513 twiceLargestAntenna, 0);
514
515 /*
516 * scaledPower is the minimum of the user input power level
517 * and the regulatory allowed power level.
518 */
519 maxRegAllowedPower = twiceMaxRegulatoryPower + twiceLargestAntenna;
520
521 if (regulatory->tp_scale != ATH9K_TP_SCALE_MAX)
522 maxRegAllowedPower -=
523 (tpScaleReductionTable[(regulatory->tp_scale)] * 2);
524
525 scaledPower = min(powerLimit, maxRegAllowedPower);
526
527 /*
528 * Reduce scaled Power by number of chains active
529 * to get the per chain tx power level.
530 */
531 switch (ar5416_get_ntxchains(tx_chainmask)) {
532 case 1:
533 break;
534 case 2:
535 if (scaledPower > REDUCE_SCALED_POWER_BY_TWO_CHAIN)
537 else
538 scaledPower = 0;
539 break;
540 case 3:
541 if (scaledPower > REDUCE_SCALED_POWER_BY_THREE_CHAIN)
543 else
544 scaledPower = 0;
545 break;
546 }
547 scaledPower = max((u16)0, scaledPower);
548
549 /*
550 * Get TX power from EEPROM.
551 */
552 if (IS_CHAN_2GHZ(chan)) {
553 /* CTL_11B, CTL_11G, CTL_2GHT20 */
554 numCtlModes =
555 ARRAY_SIZE(ctlModesFor11g) - SUB_NUM_CTL_MODES_AT_2G_40;
556
557 pCtlMode = ctlModesFor11g;
558
560 pEepData->calTargetPowerCck,
562 &targetPowerCck, 4, 0);
564 pEepData->calTargetPower2G,
566 &targetPowerOfdm, 4, 0);
568 pEepData->calTargetPower2GHT20,
570 &targetPowerHt20, 8, 0);
571
572 if (IS_CHAN_HT40(chan)) {
573 /* All 2G CTLs */
574 numCtlModes = ARRAY_SIZE(ctlModesFor11g);
576 pEepData->calTargetPower2GHT40,
578 &targetPowerHt40, 8, 1);
580 pEepData->calTargetPowerCck,
582 &targetPowerCckExt, 4, 1);
584 pEepData->calTargetPower2G,
586 &targetPowerOfdmExt, 4, 1);
587 }
588 }
589
590 for (ctlMode = 0; ctlMode < numCtlModes; ctlMode++) {
591 int isHt40CtlMode =
592 (pCtlMode[ctlMode] == CTL_2GHT40) ? 1 : 0;
593
594 if (isHt40CtlMode)
595 freq = centers.synth_center;
596 else if (pCtlMode[ctlMode] & EXT_ADDITIVE)
597 freq = centers.ext_center;
598 else
599 freq = centers.ctl_center;
600
601 /* Walk through the CTL indices stored in EEPROM */
602 for (i = 0; (i < AR9287_NUM_CTLS) && pEepData->ctlIndex[i]; i++) {
603 struct cal_ctl_edges *pRdEdgesPower;
604
605 /*
606 * Compare test group from regulatory channel list
607 * with test mode from pCtlMode list
608 */
609 if (CMP_CTL || CMP_NO_CTL) {
610 rep = &(pEepData->ctlData[i]);
611 pRdEdgesPower =
612 rep->ctlEdges[ar5416_get_ntxchains(tx_chainmask) - 1];
613
614 twiceMinEdgePower = ath9k_hw_get_max_edge_power(freq,
615 pRdEdgesPower,
616 IS_CHAN_2GHZ(chan),
618
619 if ((cfgCtl & ~CTL_MODE_M) == SD_NO_CTL) {
620 twiceMaxEdgePower = min(twiceMaxEdgePower,
621 twiceMinEdgePower);
622 } else {
623 twiceMaxEdgePower = twiceMinEdgePower;
624 break;
625 }
626 }
627 }
628
629 minCtlPower = (u8)min(twiceMaxEdgePower, scaledPower);
630
631 /* Apply ctl mode to correct target power set */
632 switch (pCtlMode[ctlMode]) {
633 case CTL_11B:
634 for (i = 0; i < ARRAY_SIZE(targetPowerCck.tPow2x); i++) {
635 targetPowerCck.tPow2x[i] =
636 (u8)min((u16)targetPowerCck.tPow2x[i],
637 minCtlPower);
638 }
639 break;
640 case CTL_11A:
641 case CTL_11G:
642 for (i = 0; i < ARRAY_SIZE(targetPowerOfdm.tPow2x); i++) {
643 targetPowerOfdm.tPow2x[i] =
644 (u8)min((u16)targetPowerOfdm.tPow2x[i],
645 minCtlPower);
646 }
647 break;
648 case CTL_5GHT20:
649 case CTL_2GHT20:
650 for (i = 0; i < ARRAY_SIZE(targetPowerHt20.tPow2x); i++) {
651 targetPowerHt20.tPow2x[i] =
652 (u8)min((u16)targetPowerHt20.tPow2x[i],
653 minCtlPower);
654 }
655 break;
656 case CTL_11B_EXT:
657 targetPowerCckExt.tPow2x[0] =
658 (u8)min((u16)targetPowerCckExt.tPow2x[0],
659 minCtlPower);
660 break;
661 case CTL_11A_EXT:
662 case CTL_11G_EXT:
663 targetPowerOfdmExt.tPow2x[0] =
664 (u8)min((u16)targetPowerOfdmExt.tPow2x[0],
665 minCtlPower);
666 break;
667 case CTL_5GHT40:
668 case CTL_2GHT40:
669 for (i = 0; i < ARRAY_SIZE(targetPowerHt40.tPow2x); i++) {
670 targetPowerHt40.tPow2x[i] =
671 (u8)min((u16)targetPowerHt40.tPow2x[i],
672 minCtlPower);
673 }
674 break;
675 default:
676 break;
677 }
678 }
679
680 /* Now set the rates array */
681
682 ratesArray[rate6mb] =
683 ratesArray[rate9mb] =
684 ratesArray[rate12mb] =
685 ratesArray[rate18mb] =
686 ratesArray[rate24mb] = targetPowerOfdm.tPow2x[0];
687
688 ratesArray[rate36mb] = targetPowerOfdm.tPow2x[1];
689 ratesArray[rate48mb] = targetPowerOfdm.tPow2x[2];
690 ratesArray[rate54mb] = targetPowerOfdm.tPow2x[3];
691 ratesArray[rateXr] = targetPowerOfdm.tPow2x[0];
692
693 for (i = 0; i < ARRAY_SIZE(targetPowerHt20.tPow2x); i++)
694 ratesArray[rateHt20_0 + i] = targetPowerHt20.tPow2x[i];
695
696 if (IS_CHAN_2GHZ(chan)) {
697 ratesArray[rate1l] = targetPowerCck.tPow2x[0];
698 ratesArray[rate2s] =
699 ratesArray[rate2l] = targetPowerCck.tPow2x[1];
700 ratesArray[rate5_5s] =
701 ratesArray[rate5_5l] = targetPowerCck.tPow2x[2];
702 ratesArray[rate11s] =
703 ratesArray[rate11l] = targetPowerCck.tPow2x[3];
704 }
705 if (IS_CHAN_HT40(chan)) {
706 for (i = 0; i < ARRAY_SIZE(targetPowerHt40.tPow2x); i++)
707 ratesArray[rateHt40_0 + i] = targetPowerHt40.tPow2x[i];
708
709 ratesArray[rateDupOfdm] = targetPowerHt40.tPow2x[0];
710 ratesArray[rateDupCck] = targetPowerHt40.tPow2x[0];
711 ratesArray[rateExtOfdm] = targetPowerOfdmExt.tPow2x[0];
712
713 if (IS_CHAN_2GHZ(chan))
714 ratesArray[rateExtCck] = targetPowerCckExt.tPow2x[0];
715 }
716
717#undef CMP_CTL
718#undef CMP_NO_CTL
719#undef REDUCE_SCALED_POWER_BY_TWO_CHAIN
720#undef REDUCE_SCALED_POWER_BY_THREE_CHAIN
721}
#define AR9287_NUM_2G_20_TARGET_POWERS
Definition eeprom.h:198
#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_11G
Definition eeprom.h:73
#define AR9287_NUM_2G_CCK_TARGET_POWERS
Definition eeprom.h:197
#define CTL_5GHT20
Definition eeprom.h:75
#define CTL_11A
Definition eeprom.h:71
#define AR9287_NUM_2G_40_TARGET_POWERS
Definition eeprom.h:199
#define AR9287_NUM_CTLS
Definition eeprom.h:200
#define AR5416_NUM_BAND_EDGES
Definition eeprom.h:153
#define CTL_11B
Definition eeprom.h:72
#define CTL_5GHT40
Definition eeprom.h:77
@ 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 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 CMP_CTL
#define CMP_NO_CTL
#define min(x, y)
Definition ath.h:36
#define max(x, y)
Definition ath.h:41
#define ARRAY_SIZE(x)
Definition efx_common.h:43
static struct ath_regulatory * ath9k_hw_regulatory(struct ath_hw *ah)
Definition hw.h:875
@ ATH9K_TP_SCALE_MAX
Definition hw.h:387
#define IS_CHAN_HT40(_c)
Definition hw.h:373
#define MAX_RATE_POWER
Definition hw.h:145
struct cal_target_power_ht calTargetPower2GHT40[AR9287_NUM_2G_40_TARGET_POWERS]
Definition eeprom.h:629
struct cal_ctl_data_ar9287 ctlData[AR9287_NUM_CTLS]
Definition eeprom.h:632
u8 ctlIndex[AR9287_NUM_CTLS]
Definition eeprom.h:631
struct cal_target_power_leg calTargetPowerCck[AR9287_NUM_2G_CCK_TARGET_POWERS]
Definition eeprom.h:623
struct cal_target_power_ht calTargetPower2GHT20[AR9287_NUM_2G_20_TARGET_POWERS]
Definition eeprom.h:627
struct cal_target_power_leg calTargetPower2G[AR9287_NUM_2G_20_TARGET_POWERS]
Definition eeprom.h:625
u32 tp_scale
Definition ath.h:142
struct cal_ctl_edges ctlEdges[AR9287_MAX_CHAINS][AR9287_NUM_BAND_EDGES]
Definition eeprom.h:553
int8_t antennaGainCh[AR9287_MAX_CHAINS]
Definition eeprom.h:477

References ah, modal_eep_ar9287_header::antennaGainCh, ar5416_get_ntxchains, AR5416_NUM_BAND_EDGES, AR9287_NUM_2G_20_TARGET_POWERS, AR9287_NUM_2G_40_TARGET_POWERS, AR9287_NUM_2G_CCK_TARGET_POWERS, AR9287_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, ar9287_eeprom::calTargetPower2G, ar9287_eeprom::calTargetPower2GHT20, ar9287_eeprom::calTargetPower2GHT40, ar9287_eeprom::calTargetPowerCck, CMP_CTL, CMP_NO_CTL, 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, ar9287_eeprom::ctlData, cal_ctl_data_ar9287::ctlEdges, ar9287_eeprom::ctlIndex, EXT_ADDITIVE, chan_centers::ext_center, IS_CHAN_2GHZ, IS_CHAN_HT40, max, MAX_RATE_POWER, min, ar9287_eeprom::modalHeader, NULL, 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, 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_ar9287_set_txpower().

◆ ath9k_hw_ar9287_set_txpower()

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

Definition at line 723 of file ath9k_eeprom_9287.c.

728{
729 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
730 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;
731 struct modal_eep_ar9287_header *pModal = &pEepData->modalHeader;
732 int16_t ratesArray[Ar5416RateSize];
733 int16_t txPowerIndexOffset = 0;
735 unsigned int i;
736
737 memset(ratesArray, 0, sizeof(ratesArray));
738
742
744 &ratesArray[0], cfgCtl,
745 twiceAntennaReduction,
746 twiceMaxRegulatoryPower,
747 powerLimit);
748
749 ath9k_hw_set_ar9287_power_cal_table(ah, chan, &txPowerIndexOffset);
750
751 regulatory->max_power_level = 0;
752 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) {
753 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]);
754 if (ratesArray[i] > MAX_RATE_POWER)
755 ratesArray[i] = MAX_RATE_POWER;
756
757 if (ratesArray[i] > regulatory->max_power_level)
758 regulatory->max_power_level = ratesArray[i];
759 }
760
761 if (test)
762 return;
763
764 if (IS_CHAN_2GHZ(chan))
765 i = rate1l;
766 else
767 i = rate6mb;
768
769 regulatory->max_power_level = ratesArray[i];
770
772 for (i = 0; i < Ar5416RateSize; i++)
773 ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
774 }
775
777
778 /* OFDM power per rate */
780 ATH9K_POW_SM(ratesArray[rate18mb], 24)
781 | ATH9K_POW_SM(ratesArray[rate12mb], 16)
782 | ATH9K_POW_SM(ratesArray[rate9mb], 8)
783 | ATH9K_POW_SM(ratesArray[rate6mb], 0));
784
786 ATH9K_POW_SM(ratesArray[rate54mb], 24)
787 | ATH9K_POW_SM(ratesArray[rate48mb], 16)
788 | ATH9K_POW_SM(ratesArray[rate36mb], 8)
789 | ATH9K_POW_SM(ratesArray[rate24mb], 0));
790
791 /* CCK power per rate */
792 if (IS_CHAN_2GHZ(chan)) {
794 ATH9K_POW_SM(ratesArray[rate2s], 24)
795 | ATH9K_POW_SM(ratesArray[rate2l], 16)
796 | ATH9K_POW_SM(ratesArray[rateXr], 8)
797 | ATH9K_POW_SM(ratesArray[rate1l], 0));
799 ATH9K_POW_SM(ratesArray[rate11s], 24)
800 | ATH9K_POW_SM(ratesArray[rate11l], 16)
801 | ATH9K_POW_SM(ratesArray[rate5_5s], 8)
802 | ATH9K_POW_SM(ratesArray[rate5_5l], 0));
803 }
804
805 /* HT20 power per rate */
807 ATH9K_POW_SM(ratesArray[rateHt20_3], 24)
808 | ATH9K_POW_SM(ratesArray[rateHt20_2], 16)
809 | ATH9K_POW_SM(ratesArray[rateHt20_1], 8)
810 | ATH9K_POW_SM(ratesArray[rateHt20_0], 0));
811
813 ATH9K_POW_SM(ratesArray[rateHt20_7], 24)
814 | ATH9K_POW_SM(ratesArray[rateHt20_6], 16)
815 | ATH9K_POW_SM(ratesArray[rateHt20_5], 8)
816 | ATH9K_POW_SM(ratesArray[rateHt20_4], 0));
817
818 /* HT40 power per rate */
819 if (IS_CHAN_HT40(chan)) {
822 ATH9K_POW_SM(ratesArray[rateHt40_3], 24)
823 | ATH9K_POW_SM(ratesArray[rateHt40_2], 16)
824 | ATH9K_POW_SM(ratesArray[rateHt40_1], 8)
825 | ATH9K_POW_SM(ratesArray[rateHt40_0], 0));
826
828 ATH9K_POW_SM(ratesArray[rateHt40_7], 24)
829 | ATH9K_POW_SM(ratesArray[rateHt40_6], 16)
830 | ATH9K_POW_SM(ratesArray[rateHt40_5], 8)
831 | ATH9K_POW_SM(ratesArray[rateHt40_4], 0));
832 } else {
834 ATH9K_POW_SM(ratesArray[rateHt40_3] +
836 | ATH9K_POW_SM(ratesArray[rateHt40_2] +
838 | ATH9K_POW_SM(ratesArray[rateHt40_1] +
840 | ATH9K_POW_SM(ratesArray[rateHt40_0] +
842
844 ATH9K_POW_SM(ratesArray[rateHt40_7] +
846 | ATH9K_POW_SM(ratesArray[rateHt40_6] +
848 | ATH9K_POW_SM(ratesArray[rateHt40_5] +
850 | ATH9K_POW_SM(ratesArray[rateHt40_4] +
852 }
853
854 /* Dup/Ext power per rate */
856 ATH9K_POW_SM(ratesArray[rateExtOfdm], 24)
857 | ATH9K_POW_SM(ratesArray[rateExtCck], 16)
858 | ATH9K_POW_SM(ratesArray[rateDupOfdm], 8)
859 | ATH9K_POW_SM(ratesArray[rateDupCck], 0));
860 }
862}
#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_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 ATH9K_POW_SM(_r, _s)
Definition eeprom.h:102
@ 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
#define AR_SREV_9280_20_OR_LATER(_ah)
Definition reg.h:825
static void ath9k_hw_set_ar9287_power_cal_table(struct ath_hw *ah, struct ath9k_channel *chan, int16_t *pTxPowerIndexOffset)
static void ath9k_hw_set_ar9287_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
void * memset(void *dest, int character, size_t len) __nonnull
u16 max_power_level
Definition ath.h:141

References ah, Ar5416RateSize, AR9287_EEP_MINOR_VER_2, AR9287_EEP_VER_MINOR_MASK, AR9287_PWR_TABLE_OFFSET_DB, 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_SREV_9280_20_OR_LATER, ARRAY_SIZE, ath9k_hw_ar9287_get_eeprom(), ath9k_hw_regulatory(), ath9k_hw_set_ar9287_power_cal_table(), ath9k_hw_set_ar9287_power_per_rate_table(), ATH9K_POW_SM, ar9287_eeprom::baseEepHeader, EEP_OL_PWRCTRL, ENABLE_REGWRITE_BUFFER, modal_eep_ar9287_header::ht40PowerIncForPdadc, IS_CHAN_2GHZ, IS_CHAN_HT40, ath_regulatory::max_power_level, MAX_RATE_POWER, memset(), ar9287_eeprom::modalHeader, 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, test, u16, u8, and base_eep_ar9287_header::version.

◆ ath9k_hw_ar9287_set_addac()

void ath9k_hw_ar9287_set_addac ( struct ath_hw *ah __unused,
struct ath9k_channel *chan __unused )
static

Definition at line 864 of file ath9k_eeprom_9287.c.

866{
867}

References __unused, and ah.

◆ ath9k_hw_ar9287_set_board_values()

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

Definition at line 869 of file ath9k_eeprom_9287.c.

871{
872 struct ar9287_eeprom *eep = &ah->eeprom.map9287;
873 struct modal_eep_ar9287_header *pModal = &eep->modalHeader;
874 u32 regChainOffset, regval;
875 u8 txRxAttenLocal;
876 int i;
877
878 pModal = &eep->modalHeader;
879
881
882 for (i = 0; i < AR9287_MAX_CHAINS; i++) {
883 regChainOffset = i * 0x1000;
884
885 REG_WRITE(ah, AR_PHY_SWITCH_CHAIN_0 + regChainOffset,
886 pModal->antCtrlChain[i]);
887
888 REG_WRITE(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset,
889 (REG_READ(ah, AR_PHY_TIMING_CTRL4(0) + regChainOffset)
892 SM(pModal->iqCalICh[i],
894 SM(pModal->iqCalQCh[i],
896
897 txRxAttenLocal = pModal->txRxAttenCh[i];
898
899 REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
901 pModal->bswMargin[i]);
902 REG_RMW_FIELD(ah, AR_PHY_GAIN_2GHZ + regChainOffset,
904 pModal->bswAtten[i]);
905 REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset,
907 txRxAttenLocal);
908 REG_RMW_FIELD(ah, AR_PHY_RXGAIN + regChainOffset,
910 pModal->rxTxMarginCh[i]);
911 }
912
913
914 if (IS_CHAN_HT40(chan))
917 else
920
923
929
932
937
939 regval &= ~(AR9287_AN_RF2G3_DB1 |
945 regval |= (SM(pModal->db1, AR9287_AN_RF2G3_DB1) |
946 SM(pModal->db2, AR9287_AN_RF2G3_DB2) |
951
953
955 regval &= ~(AR9287_AN_RF2G3_DB1 |
961 regval |= (SM(pModal->db1, AR9287_AN_RF2G3_DB1) |
962 SM(pModal->db2, AR9287_AN_RF2G3_DB2) |
967
969
974
978 pModal->xpaBiasLvl);
979}
#define AR_PHY_RF_CTL4
Definition ar9002_phy.h:80
#define AR_PHY_EXT_CCA0
Definition ar9002_phy.h:328
#define AR_PHY_SETTLING_SWITCH
Definition ar9002_phy.h:93
#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_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_TIMING_CTRL4_IQCORR_Q_I_COFF
Definition ar9002_phy.h:191
#define AR_PHY_GAIN_2GHZ_XATTEN1_DB
Definition ar9002_phy.h:437
#define AR_PHY_SETTLING
Definition ar9002_phy.h:92
#define AR9280_PHY_RXGAIN_TXRX_MARGIN
Definition ar9002_phy.h:103
#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 AR9280_PHY_RXGAIN_TXRX_ATTEN
Definition ar9002_phy.h:101
#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_RXGAIN
Definition ar9002_phy.h:96
#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_RF_CTL3
Definition ar9002_phy.h:63
#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_RF_CTL2
Definition ar9002_phy.h:57
#define AR9287_AN_TOP2
Definition reg.h:1423
#define AR9287_AN_RF2G3_DB2
Definition reg.h:1404
#define AR9287_AN_RF2G3_CH0
Definition reg.h:1400
#define AR9287_AN_TOP2_XPABIAS_LVL_S
Definition reg.h:1425
#define AR9287_AN_RF2G3_DB1
Definition reg.h:1402
#define AR9287_AN_TOP2_XPABIAS_LVL
Definition reg.h:1424
#define AR9287_AN_RF2G3_OB_PSK
Definition reg.h:1408
#define AR9287_AN_RF2G3_OB_CCK
Definition reg.h:1406
#define AR9287_AN_RF2G3_OB_QAM
Definition reg.h:1410
#define AR9287_AN_RF2G3_OB_PAL_OFF
Definition reg.h:1412
#define AR9287_AN_RF2G3_CH1
Definition reg.h:1401
void ath9k_hw_analog_shift_rmw(struct ath_hw *ah, u32 reg, u32 mask, u32 shift, u32 val)
void ath9k_hw_analog_shift_regwrite(struct ath_hw *ah, u32 reg, u32 val)
u8 bswMargin[AR9287_MAX_CHAINS]
Definition eeprom.h:497
u8 txRxAttenCh[AR9287_MAX_CHAINS]
Definition eeprom.h:479
u8 bswAtten[AR9287_MAX_CHAINS]
Definition eeprom.h:496
u8 rxTxMarginCh[AR9287_MAX_CHAINS]
Definition eeprom.h:480
int8_t iqCalICh[AR9287_MAX_CHAINS]
Definition eeprom.h:489
int8_t iqCalQCh[AR9287_MAX_CHAINS]
Definition eeprom.h:490

References modal_eep_ar9287_header::adcDesiredSize, ah, modal_eep_ar9287_header::antCtrlChain, modal_eep_ar9287_header::antCtrlCommon, AR9280_PHY_CCA_THRESH62, AR9280_PHY_RXGAIN_TXRX_ATTEN, AR9280_PHY_RXGAIN_TXRX_MARGIN, AR9287_AN_RF2G3_CH0, AR9287_AN_RF2G3_CH1, AR9287_AN_RF2G3_DB1, AR9287_AN_RF2G3_DB2, AR9287_AN_RF2G3_OB_CCK, AR9287_AN_RF2G3_OB_PAL_OFF, AR9287_AN_RF2G3_OB_PSK, AR9287_AN_RF2G3_OB_QAM, AR9287_AN_TOP2, AR9287_AN_TOP2_XPABIAS_LVL, AR9287_AN_TOP2_XPABIAS_LVL_S, AR9287_MAX_CHAINS, AR_PHY_CCA, AR_PHY_DESIRED_SZ, AR_PHY_DESIRED_SZ_ADC, AR_PHY_EXT_CCA0, AR_PHY_EXT_CCA0_THRESH62, AR_PHY_GAIN_2GHZ, AR_PHY_GAIN_2GHZ_XATTEN1_DB, AR_PHY_GAIN_2GHZ_XATTEN1_MARGIN, 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_RXGAIN, 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_END_DATA_START, AR_PHY_TX_END_PA_ON, AR_PHY_TX_END_TO_A2_RX_ON, ath9k_hw_analog_shift_regwrite(), ath9k_hw_analog_shift_rmw(), modal_eep_ar9287_header::bswAtten, modal_eep_ar9287_header::bswMargin, modal_eep_ar9287_header::db1, modal_eep_ar9287_header::db2, modal_eep_ar9287_header::iqCalICh, modal_eep_ar9287_header::iqCalQCh, IS_CHAN_HT40, ar9287_eeprom::modalHeader, modal_eep_ar9287_header::ob_cck, modal_eep_ar9287_header::ob_pal_off, modal_eep_ar9287_header::ob_psk, modal_eep_ar9287_header::ob_qam, REG_READ, REG_RMW_FIELD, REG_WRITE, modal_eep_ar9287_header::rxTxMarginCh, SM, modal_eep_ar9287_header::switchSettling, modal_eep_ar9287_header::swSettleHt40, modal_eep_ar9287_header::thresh62, modal_eep_ar9287_header::txEndToRxOn, modal_eep_ar9287_header::txEndToXpaOff, modal_eep_ar9287_header::txFrameToDataStart, modal_eep_ar9287_header::txFrameToPaOn, modal_eep_ar9287_header::txFrameToXpaOn, modal_eep_ar9287_header::txRxAttenCh, u32, u8, and modal_eep_ar9287_header::xpaBiasLvl.

◆ ath9k_hw_ar9287_get_spur_channel()

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

Definition at line 981 of file ath9k_eeprom_9287.c.

983{
984#define EEP_MAP9287_SPURCHAN \
985 (ah->eeprom.map9287.modalHeader.spurChans[i].spurChan)
986
987 u16 spur_val = AR_NO_SPUR;
988
989 DBG2("ath9k: "
990 "Getting spur idx:%d is2Ghz:%d val:%x\n",
991 i, is2GHz, ah->config.spurchans[i][is2GHz]);
992
993 switch (ah->config.spurmode) {
994 case SPUR_DISABLE:
995 break;
997 spur_val = ah->config.spurchans[i][is2GHz];
998 DBG2("ath9k: "
999 "Getting spur val from new loc. %d\n", spur_val);
1000 break;
1001 case SPUR_ENABLE_EEPROM:
1002 spur_val = EEP_MAP9287_SPURCHAN;
1003 break;
1004 }
1005
1006 return spur_val;
1007
1008#undef EEP_MAP9287_SPURCHAN
1009}
#define EEP_MAP9287_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_MAP9287_SPURCHAN, SPUR_DISABLE, SPUR_ENABLE_EEPROM, SPUR_ENABLE_IOCTL, and u16.

Variable Documentation

◆ eep_ar9287_ops

const struct eeprom_ops eep_ar9287_ops
Initial value:
= {
.get_eeprom_ver = ath9k_hw_ar9287_get_eeprom_ver,
.get_eeprom_rev = ath9k_hw_ar9287_get_eeprom_rev,
.set_board_values = ath9k_hw_ar9287_set_board_values,
}
static int ath9k_hw_ar9287_get_eeprom_ver(struct ath_hw *ah)
static u16 ath9k_hw_ar9287_get_spur_channel(struct ath_hw *ah, u16 i, int is2GHz)
static void ath9k_hw_ar9287_set_addac(struct ath_hw *ah __unused, struct ath9k_channel *chan __unused)
static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah)
static void ath9k_hw_ar9287_set_board_values(struct ath_hw *ah, struct ath9k_channel *chan)
static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)
static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test)
static int ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)

Definition at line 1011 of file ath9k_eeprom_9287.c.

1011 {
1012 .check_eeprom = ath9k_hw_ar9287_check_eeprom,
1013 .get_eeprom = ath9k_hw_ar9287_get_eeprom,
1014 .fill_eeprom = ath9k_hw_ar9287_fill_eeprom,
1015 .get_eeprom_ver = ath9k_hw_ar9287_get_eeprom_ver,
1016 .get_eeprom_rev = ath9k_hw_ar9287_get_eeprom_rev,
1017 .set_board_values = ath9k_hw_ar9287_set_board_values,
1018 .set_addac = ath9k_hw_ar9287_set_addac,
1019 .set_txpower = ath9k_hw_ar9287_set_txpower,
1020 .get_spur_channel = ath9k_hw_ar9287_get_spur_channel
1021};

Referenced by ath9k_hw_eeprom_init().