32 { -4, -2, 0, 2, 4, 6, 8, 10, 12 };
36 { -6, -4, -2, 0, 2, 4, 6, 8 };
58 for (i = 0; i <
array->ia_rows; i++)
63 #define REG_WRITE_RF_ARRAY(iniarray, regData, regWr) \ 64 ar5008_write_rf_array(ah, iniarray, regData, &(regWr)) 67 u32 *
data,
unsigned int *writecnt)
73 for (
r = 0;
r <
array->ia_rows;
r++) {
96 u32 tmp32, mask, arrayEntry, lastBit;
100 arrayEntry = (firstBit - 1) / 8;
101 bitPosition = (firstBit - 1) % 8;
103 while (bitsLeft > 0) {
104 lastBit = (bitPosition + bitsLeft > 8) ?
105 8 : bitPosition + bitsLeft;
106 mask = (((1 << lastBit) - 1) ^ ((1 << bitPosition) - 1)) <<
108 rfBuf[arrayEntry] &= ~mask;
109 rfBuf[arrayEntry] |= ((tmp32 << bitPosition) <<
110 (column * 8)) & mask;
111 bitsLeft -= 8 - bitPosition;
112 tmp32 = tmp32 >> (8 - bitPosition);
148 unsigned int reg_writes = 0;
154 if (synth_freq < 2412)
156 else if (synth_freq < 2422)
164 DBG(
"ath9k: Force rf_pwd_icsyndiv to %1d on %4d\n",
165 new_bias, synth_freq);
198 if (((freq - 2192) % 5) == 0) {
199 channelSel = ((freq - 672) * 2 - 3040) / 10;
201 }
else if (((freq - 2224) % 5) == 0) {
202 channelSel = ((freq - 704) * 2 - 3040) / 10;
205 DBG(
"ath9k: Invalid channel %d MHz\n", freq);
209 channelSel = (channelSel << 2) & 0xff;
222 }
else if ((freq % 20) == 0 && freq >= 5120) {
226 }
else if ((freq % 10) == 0) {
233 }
else if ((freq % 5) == 0) {
237 DBG(
"ath9k: Invalid channel %d MHz\n", freq);
244 (channelSel << 8) | (aModeRefSel << 2) | (bModeSynth << 1) |
250 ah->curchan_rad_index = -1;
269 int spur_delta_phase;
271 int upper, lower, cur_vit_mask;
274 static int pilot_mask_reg[4] = {
278 static int chan_mask_reg[4] = {
282 static int inc[4] = { 0, 100, 0, 0 };
295 cur_bb_spur =
ah->eep_ops->get_spur_channel(
ah, i, is2GHz);
298 cur_bb_spur = cur_bb_spur - (chan->
channel * 10);
299 if ((cur_bb_spur > -95) && (cur_bb_spur < 95)) {
300 bb_spur = cur_bb_spur;
325 spur_delta_phase = ((bb_spur * 524288) / 100) &
329 spur_freq_sd = ((bb_spur * 2048) / denominator) & 0x3ff;
340 for (i = 0; i < 4; i++) {
344 for (
bp = 0;
bp < 30;
bp++) {
345 if ((cur_bin > lower) && (cur_bin < upper)) {
346 pilot_mask = pilot_mask | 0x1 <<
bp;
347 chan_mask = chan_mask | 0x1 <<
bp;
360 for (i = 0; i < 123; i++) {
361 if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) {
364 volatile int tmp_v =
abs(cur_vit_mask - bin);
370 if (cur_vit_mask < 0)
371 mask_m[
abs(cur_vit_mask / 100)] = mask_amt;
373 mask_p[cur_vit_mask / 100] = mask_amt;
378 tmp_mask = (mask_m[46] << 30) | (mask_m[47] << 28)
379 | (mask_m[48] << 26) | (mask_m[49] << 24)
380 | (mask_m[50] << 22) | (mask_m[51] << 20)
381 | (mask_m[52] << 18) | (mask_m[53] << 16)
382 | (mask_m[54] << 14) | (mask_m[55] << 12)
383 | (mask_m[56] << 10) | (mask_m[57] << 8)
384 | (mask_m[58] << 6) | (mask_m[59] << 4)
385 | (mask_m[60] << 2) | (mask_m[61] << 0);
389 tmp_mask = (mask_m[31] << 28)
390 | (mask_m[32] << 26) | (mask_m[33] << 24)
391 | (mask_m[34] << 22) | (mask_m[35] << 20)
392 | (mask_m[36] << 18) | (mask_m[37] << 16)
393 | (mask_m[48] << 14) | (mask_m[39] << 12)
394 | (mask_m[40] << 10) | (mask_m[41] << 8)
395 | (mask_m[42] << 6) | (mask_m[43] << 4)
396 | (mask_m[44] << 2) | (mask_m[45] << 0);
400 tmp_mask = (mask_m[16] << 30) | (mask_m[16] << 28)
401 | (mask_m[18] << 26) | (mask_m[18] << 24)
402 | (mask_m[20] << 22) | (mask_m[20] << 20)
403 | (mask_m[22] << 18) | (mask_m[22] << 16)
404 | (mask_m[24] << 14) | (mask_m[24] << 12)
405 | (mask_m[25] << 10) | (mask_m[26] << 8)
406 | (mask_m[27] << 6) | (mask_m[28] << 4)
407 | (mask_m[29] << 2) | (mask_m[30] << 0);
411 tmp_mask = (mask_m[0] << 30) | (mask_m[1] << 28)
412 | (mask_m[2] << 26) | (mask_m[3] << 24)
413 | (mask_m[4] << 22) | (mask_m[5] << 20)
414 | (mask_m[6] << 18) | (mask_m[7] << 16)
415 | (mask_m[8] << 14) | (mask_m[9] << 12)
416 | (mask_m[10] << 10) | (mask_m[11] << 8)
417 | (mask_m[12] << 6) | (mask_m[13] << 4)
418 | (mask_m[14] << 2) | (mask_m[15] << 0);
422 tmp_mask = (mask_p[15] << 28)
423 | (mask_p[14] << 26) | (mask_p[13] << 24)
424 | (mask_p[12] << 22) | (mask_p[11] << 20)
425 | (mask_p[10] << 18) | (mask_p[9] << 16)
426 | (mask_p[8] << 14) | (mask_p[7] << 12)
427 | (mask_p[6] << 10) | (mask_p[5] << 8)
428 | (mask_p[4] << 6) | (mask_p[3] << 4)
429 | (mask_p[2] << 2) | (mask_p[1] << 0);
433 tmp_mask = (mask_p[30] << 28)
434 | (mask_p[29] << 26) | (mask_p[28] << 24)
435 | (mask_p[27] << 22) | (mask_p[26] << 20)
436 | (mask_p[25] << 18) | (mask_p[24] << 16)
437 | (mask_p[23] << 14) | (mask_p[22] << 12)
438 | (mask_p[21] << 10) | (mask_p[20] << 8)
439 | (mask_p[19] << 6) | (mask_p[18] << 4)
440 | (mask_p[17] << 2) | (mask_p[16] << 0);
444 tmp_mask = (mask_p[45] << 28)
445 | (mask_p[44] << 26) | (mask_p[43] << 24)
446 | (mask_p[42] << 22) | (mask_p[41] << 20)
447 | (mask_p[40] << 18) | (mask_p[39] << 16)
448 | (mask_p[38] << 14) | (mask_p[37] << 12)
449 | (mask_p[36] << 10) | (mask_p[35] << 8)
450 | (mask_p[34] << 6) | (mask_p[33] << 4)
451 | (mask_p[32] << 2) | (mask_p[31] << 0);
455 tmp_mask = (mask_p[61] << 30) | (mask_p[60] << 28)
456 | (mask_p[59] << 26) | (mask_p[58] << 24)
457 | (mask_p[57] << 22) | (mask_p[56] << 20)
458 | (mask_p[55] << 18) | (mask_p[54] << 16)
459 | (mask_p[53] << 14) | (mask_p[52] << 12)
460 | (mask_p[51] << 10) | (mask_p[50] << 8)
461 | (mask_p[49] << 6) | (mask_p[48] << 4)
462 | (mask_p[47] << 2) | (mask_p[46] << 0);
475 #define ATH_ALLOC_BANK(bank, size) do { \ 476 bank = zalloc((sizeof(u32) * size)); \ 478 DBG("ath9k: Cannot allocate RF banks\n"); \ 491 ah->iniAddac.ia_rows *
ah->iniAddac.ia_columns);
495 #undef ATH_ALLOC_BANK 506 #define ATH_FREE_BANK(bank) do { \ 541 u32 ob5GHz = 0, db5GHz = 0;
542 u32 ob2GHz = 0, db2GHz = 0;
543 unsigned int regWrites = 0;
570 for (i = 0; i <
ah->iniBank6TPC.ia_rows; i++) {
571 ah->analogBank6Data[i] =
572 INI_RA(&
ah->iniBank6TPC, i, modesIndex);
577 if (eepMinorRev >= 2) {
622 synthDelay = (4 * synthDelay) / 22;
633 int rx_chainmask, tx_chainmask;
635 rx_chainmask =
ah->rxchainmask;
636 tx_chainmask =
ah->txchainmask;
639 switch (rx_chainmask) {
667 if (tx_chainmask == 0x5) {
724 u32 enableDacFifo = 0;
759 unsigned int i, regWrites = 0;
761 u32 modesIndex, freqIndex;
798 ah->eep_ops->set_addac(
ah, chan);
805 sizeof(
u32) *
ah->iniAddac.ia_rows *
806 ah->iniAddac.ia_columns;
810 ah->iniAddac.ia_array, addacSize);
813 (
ah->addac5416_21)[31 *
ah->iniAddac.ia_columns + 1] = 0;
825 for (i = 0; i <
ah->iniModes.ia_rows; i++) {
834 if (
reg >= 0x7800 &&
reg < 0x78a0
835 &&
ah->config.analog_shiftreg
854 modesIndex, regWrites);
859 for (i = 0; i <
ah->iniCommon.ia_rows; i++) {
865 if (
reg >= 0x7800 &&
reg < 0x78a0
866 &&
ah->config.analog_shiftreg
879 modesIndex, regWrites);
882 modesIndex, regWrites);
898 ah->eep_ops->set_txpower(
ah, chan,
907 DBG(
"ath9k: ar5416SetRfRegs failed\n");
942 u32 coef_scaled, ds_coef_exp, ds_coef_man;
943 u32 clockMhzScaled = 0x64000000;
947 clockMhzScaled = clockMhzScaled >> 1;
949 clockMhzScaled = clockMhzScaled >> 2;
962 coef_scaled = (9 * coef_scaled) / 10;
984 synthDelay = (4 * synthDelay) / 22;
995 int rx_chainmask =
ah->rxchainmask;
997 if ((rx_chainmask == 0x5) || (rx_chainmask == 0x3)) {
1067 switch (
cmd &
ah->ani_function) {
1073 "level out of range (%d > %zd)\n",
1080 ah->totalSizeDesired[level]);
1083 ah->coarse_low[level]);
1086 ah->coarse_high[level]);
1092 ah->stats.ast_ani_niup++;
1094 ah->stats.ast_ani_nidown++;
1099 static const int m1ThreshLow[] = { 127, 50 };
1100 static const int m2ThreshLow[] = { 127, 40 };
1101 static const int m1Thresh[] = { 127, 0x4d };
1102 static const int m2Thresh[] = { 127, 0x40 };
1103 static const int m2CountThr[] = { 31, 16 };
1104 static const int m2CountThrLow[] = { 63, 48 };
1148 ah->stats.ast_ani_ofdmon++;
1150 ah->stats.ast_ani_ofdmoff++;
1156 static const int weakSigThrCck[] = { 8, 6 };
1161 weakSigThrCck[
high]);
1164 ah->stats.ast_ani_cckhigh++;
1166 ah->stats.ast_ani_ccklow++;
1172 static const int firstep[] = { 0, 4, 8 };
1177 "level out of range (%d > %zd)\n",
1185 ah->stats.ast_ani_stepup++;
1187 ah->stats.ast_ani_stepdown++;
1192 static const int cycpwrThr1[] = { 2, 4, 6, 8, 10, 12, 14, 16 };
1197 "level out of range (%d > %zd)\n",
1205 ah->stats.ast_ani_spurup++;
1207 ah->stats.ast_ani_spurdown++;
1214 DBG(
"ath9k: invalid cmd %d\n",
cmd);
1218 DBG2(
"ath9k: ANI parameters:\n");
1220 "noiseImmunityLevel=%d, spurImmunityLevel=%d, ofdmWeakSigDetect=%d\n",
1225 "cckWeakSigThreshold=%d, firstepLevel=%d, listenTime=%d\n",
1230 "ofdmPhyErrCount=%d, cckPhyErrCount=%d\n\n",
1245 switch (
cmd &
ah->ani_function) {
1259 int m1ThreshLow = on ?
1261 int m2ThreshLow = on ?
1267 int m2CountThr = on ?
1269 int m2CountThrLow = on ?
1271 int m1ThreshLowExt = on ?
1273 int m2ThreshLowExt = on ?
1275 int m1ThreshExt = on ?
1277 int m2ThreshExt = on ?
1314 "** ch %d: ofdm weak signal: %s=>%s\n",
1320 ah->stats.ast_ani_ofdmon++;
1322 ah->stats.ast_ani_ofdmoff++;
1332 "ATH9K_ANI_FIRSTEP_LEVEL: level out of range (%d > %zd)\n",
1369 "** ch %d: level %d=>%d[def:%d] firstep[level]=%d ini=%d\n",
1377 "** ch %d: level %d=>%d[def:%d] firstep_low[level]=%d ini=%d\n",
1385 ah->stats.ast_ani_stepup++;
1387 ah->stats.ast_ani_stepdown++;
1397 "ATH9K_ANI_SPUR_IMMUNITY_LEVEL: level out of range (%d > %zd)\n",
1433 "** ch %d: level %d=>%d[def:%d] cycpwrThr1[level]=%d ini=%d\n",
1441 "** ch %d: level %d=>%d[def:%d] cycpwrThr1Ext[level]=%d ini=%d\n",
1449 ah->stats.ast_ani_spurup++;
1451 ah->stats.ast_ani_spurdown++;
1465 DBG(
"ath9k: invalid cmd %d\n",
cmd);
1470 "ANI parameters: SI=%d, ofdmWS=%s FS=%d MRCcck=%s listenTime=%d ofdmErrs=%d cckErrs=%d\n",
1520 iniDef = &aniState->
iniDef;
1522 DBG2(
"ath9k: ver %d.%d chan %d Mhz/0x%x\n",
1523 ah->hw_version.macVersion,
1524 ah->hw_version.macRev,
1576 u32 radar_0 = 0, radar_1 = 0;
1621 static const u32 ar5416_cca_regs[6] = {
1664 memcpy(
ah->nf_regs, ar5416_cca_regs,
sizeof(
ah->nf_regs));
#define BASE_ACTIVATE_DELAY
static const int m1ThreshExt_off
#define AR_PHY_SFCORR_LOW
#define AR_PHY_SFCORR_LOW_M2_THRESH_LOW
#define AR_PHY_CCA_MAX_GOOD_VAL_5416_5GHZ
static const int m2ThreshExt_off
void(* set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_PHY_CCA_NOM_VAL_5416_5GHZ
static void ar5008_write_rf_array(struct ath_hw *ah, struct ar5416IniArray *array, u32 *data, unsigned int *writecnt)
#define EINVAL
Invalid argument.
#define AR_RTC_9160_PLL_REFDIV
void ar5008_hw_attach_phy_ops(struct ath_hw *ah)
static const int m1ThreshLow_off
#define AR_PHY_CH2_MINCCA_PWR
#define AR_PHY_MASK2_M_16_30
#define AR_SREV_9287_11_OR_LATER(_ah)
static int ar5008_hw_ani_control_new(struct ath_hw *ah, enum ath9k_ani_cmd cmd, int param)
#define AR_PHY_CCK_TX_CTRL_JAPAN
#define AR_GTXTO_TIMEOUT_LIMIT_S
#define AR_SREV_9280_20_OR_LATER(_ah)
static unsigned int unsigned int reg
#define AR_PHY_SFCORR_LOW_M1_THRESH_LOW
void(* init_bb)(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_PHY_HALFGI_DSC_MAN
#define AR_PHY_MASK2_M_31_45
#define AR_PHY_AGC_CTL1_COARSE_LOW
#define AR_PHY_RFBUS_REQ_EN
static const int firstep_table[]
#define AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV
static int ar5008_hw_rfbus_req(struct ath_hw *ah)
#define AR_PHY_FC_DYN2040_PRI_CH
#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_RSSI
void(* rf_free_ext_banks)(struct ath_hw *ah)
#define AR_PHY_AGC_CTL1_COARSE_HIGH
#define AR_PHY_RIFS_INIT_DELAY
#define AR_EEPROM_MODAL_SPURS
#define AR_PHY_RADAR_0_FFT_ENA
static void ar5008_hw_phy_modify_rx_buffer(u32 *rfBuf, u32 reg32, u32 numBits, u32 firstBit, u32 column)
ar5008_hw_phy_modify_rx_buffer() - perform analog swizzling of parameters @rfbuf: @reg32: @numBits: @...
#define INI_RA(iniarray, row, column)
#define REG_CLR_BIT(_a, _r, _f)
#define AR_PHY_CH2_EXT_MINCCA_PWR
#define ATH9K_SIG_FIRSTEP_SETTING_MAX
#define AR_PHY_BIN_MASK_1
void(* spur_mitigate_freq)(struct ath_hw *ah, struct ath9k_channel *chan)
#define REGWRITE_BUFFER_FLUSH(_ah)
#define AR_PHY_FC_ENABLE_DAC_FIFO
static int32_t sign_extend32(uint32_t value, int index)
void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah __unused, u32 coef_scaled, u32 *coef_mantissa, u32 *coef_exponent)
#define AR_PHY_FIND_SIG_LOW
int(* rf_alloc_ext_banks)(struct ath_hw *ah)
#define AR_PHY_FIND_SIG_FIRPWR
#define AR_PHY_SFCORR_EXT_M1_THRESH_LOW
static void ar5008_restore_chainmask(struct ath_hw *ah)
#define AR_PHY_RADAR_1_MAX_RRSSI
#define IS_CHAN_HALF_RATE(_c)
#define CHANNEL_A_HT40MINUS
#define AR_PHY_SPUR_REG_ENABLE_VIT_SPUR_RSSI
#define AR_PHY_TIMING11_SPUR_FREQ_SD
void(* rfbus_done)(struct ath_hw *ah)
#define AR_SREV_5416_20_OR_LATER(_ah)
#define AR_PHY_SFCORR_EXT_M2_THRESH_LOW
static int ar5008_hw_set_rf_regs(struct ath_hw *ah, struct ath9k_channel *chan, u16 modesIndex)
static void ar5008_hw_mark_phy_inactive(struct ath_hw *ah)
struct ath_hw_private_ops - callbacks used internally by hardware code
static void ar5008_hw_set_channel_regs(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_PHY_CHANNEL_MASK_01_30
#define AR_PHY_ADC_SERIAL_CTL
#define REG_WRITE_RF_ARRAY(iniarray, regData, regWr)
static void ar5008_hw_init_bb(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_PHY_MODE_RF5GHZ
#define AR_RTC_PLL_REFDIV_5
#define AR_PHY_SPUR_REG_ENABLE_MASK_PPM
#define AR_PHY_CHANNEL_MASK_31_60
static void ar5008_hw_force_bias(struct ath_hw *ah, u16 synth_freq)
struct net80211_channel * chan
static u32 ar5008_hw_compute_pll_control(struct ath_hw *ah __unused, struct ath9k_channel *chan)
#define AR_PHY_BIN_MASK2_3
static void ar5008_hw_set_nf_limits(struct ath_hw *ah)
#define AR_PHY_MASK2_P_61_45
#define AR_PHY_TIMING_CTRL4_ENABLE_SPUR_FILTER
#define REG_RMW_FIELD(_a, _r, _f, _v)
#define AR_PHY_ACTIVE_DIS
static void ar5008_hw_init_chain_masks(struct ath_hw *ah)
Dynamic memory allocation.
void(* mark_phy_inactive)(struct ath_hw *ah)
#define AR_PHY_CCA_MAX_GOOD_VAL_5416_2GHZ
#define IS_CHAN_QUARTER_RATE(_c)
#define AR_PHY_DESIRED_SZ
unsigned int pulse_maxlen
static void ath9k_olc_init(struct ath_hw *ah)
#define AR_PHY_SFCORR_EXT_M2_THRESH
static void ar5008_hw_set_rfmode(struct ath_hw *ah, struct ath9k_channel *chan)
void * memcpy(void *dest, const void *src, size_t len) __nonnull
#define AR_PHY_MASK2_P_45_31
u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan)
#define AR_PHY_EXT_MINCCA_PWR
#define __unused
Declare a variable or data structure as unused.
uint32_t array
Array number.
#define AR_PHY_SEL_INTERNAL_ADDAC
int(* process_ini)(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_PHY_TIMING_CTRL4_ENABLE_CHAN_MASK
#define AR_RTC_9160_PLL_DIV
#define AR_PHY_RX_DELAY_DELAY
static const int m2CountThrLow_off
#define AR_PHY_ANALOG_SWAP
#define AR_PHY_RADAR_0_HEIGHT
#define AR_PHY_CCK_TX_CTRL
#define AR_PHY_SFCORR_M1_THRESH
#define AR_PHY_CCA_MIN_GOOD_VAL_5416_2GHZ
#define AR_PHY_FC_SHORT_GI_40
#define AR_SREV_9160(_ah)
#define AR_PHY_TIMING_CTRL4(_i)
#define AR_PCU_MISC_MODE2_HWWAR2
pseudo_bit_t value[0x00020]
static int ar5008_hw_ani_control_old(struct ath_hw *ah, enum ath9k_ani_cmd cmd, int param)
unsigned int pulse_inband_step
unsigned int pulse_height
static int ar5008_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan)
ar5008_hw_set_channel - tune to a channel on the external AR2133/AR5133 radios @ah: atheros hardware ...
static struct ath_regulatory * ath9k_hw_regulatory(struct ath_hw *ah)
#define AR_PHY_SFCORR_LOW_M2COUNT_THR_LOW
int(* set_rf_regs)(struct ath_hw *ah, struct ath9k_channel *chan, u16 modesIndex)
#define AR_PCU_MISC_MODE2
void udelay(unsigned long usecs)
Delay for a fixed number of microseconds.
#define AR_RTC_PLL_CLKSEL
#define ATH_FREE_BANK(bank)
#define AR_PHY_TIMING_CTRL4_ENABLE_PILOT_MASK
#define AR_PHY_RADAR_1_RELSTEP_THRESH
void(* ani_cache_ini_regs)(struct ath_hw *ah)
#define AR_PHY_RADAR_0_RRSSI
static void ar5008_hw_rf_free_ext_banks(struct ath_hw *ah)
ar5008_hw_rf_free_ext_banks - Free memory for analog bank scratch buffers @ah: atheros hardware strut...
uint32_t channel
RNDIS channel.
static int ar5008_hw_process_ini(struct ath_hw *ah, struct ath9k_channel *chan)
static void ar5008_hw_set_radar_conf(struct ath_hw *ah)
#define AR_PHY_MASK2_P_30_16
#define ATH9K_ANI_FIRSTEP_LVL_NEW
#define AR_PHY_CCK_DETECT_WEAK_SIG_THR_CCK
#define AR_PHY_TIMING5_CYCPWR_THR1
static int ar5008_hw_rf_alloc_ext_banks(struct ath_hw *ah)
ar5008_hw_rf_alloc_ext_banks - allocates banks for external radio programming @ah: atheros hardware s...
#define AR_PHY_RFBUS_GRANT_EN
#define AR_PHY_CCA_MIN_GOOD_VAL_5416_5GHZ
uint32_t high
High 32 bits of address.
#define AR_PHY_CH2_EXT_CCA
static const int m2ThreshLowExt_off
#define ATH9K_SIG_SPUR_IMM_SETTING_MIN
#define AR_PHY_RADAR_0_INBAND
#define AR_PHY_SPUR_REG_SPUR_RSSI_THRESH
#define AR_PHY_TIMING3_DSC_EXP
#define AR_PHY_RADAR_0_PRSSI
#define AR_PHY_SPUR_REG_MASK_RATE_CNTL
#define AR_SREV_9271_10(_ah)
#define AR_PHY_CH1_MINCCA_PWR
struct ath_hw_radar_conf - radar detection initialization parameters
#define AR_SREV_9280(_ah)
#define AR_RTC_9160_PLL_CLKSEL
struct hv_monitor_parameter param[4][32]
Parameters.
static u32 ar9160_hw_compute_pll_control(struct ath_hw *ah __unused, struct ath9k_channel *chan)
static const int m2Thresh_off
#define AR_PHY_RX_CHAINMASK
#define AR_PHY_RADAR_1_MAXLEN
#define AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW
#define AR_PHY_CH1_EXT_CCA
#define AR_PHY_TIMING11_SPUR_DELTA_PHASE
#define AR_PHY_FIND_SIG_FIRSTEP_LOW
static struct ath_common * ath9k_hw_common(struct ath_hw *ah)
#define AR_PHY_BIN_MASK2_4
#define AR_PHY_MASK2_M_00_15
#define AR_PHY_CAL_CHAINMASK
#define AR_SREV_REVISION_5416_10
#define AR_SREV_9285_12_OR_LATER(_ah)
#define AR_PHY_SWAP_ALT_CHAIN
#define AR_PHY_CCK_DETECT
#define ATH9K_SIG_SPUR_IMM_SETTING_MAX
static const int m2CountThr_off
#define AR_PHY_CH1_EXT_MINCCA_PWR
unsigned int radar_inband
#define AR_PHY_SFCORR_M2COUNT_THR
static void ar5008_hw_do_getnf(struct ath_hw *ah, int16_t nfarray[NUM_NF_READINGS])
#define ATH9K_ANI_SPUR_IMMUNE_LVL_NEW
static void ar5008_hw_spur_mitigate(struct ath_hw *ah, struct ath9k_channel *chan)
ar5008_hw_spur_mitigate - convert baseband spur frequency for external radios @ah: atheros hardware s...
struct ib_cm_common common
#define AR_PHY_SPUR_REG_MASK_RATE_SELECT
static u32 ar9100_hw_compute_pll_control(struct ath_hw *ah __unused, struct ath9k_channel *chan)
void(* set_rfmode)(struct ath_hw *ah, struct ath9k_channel *chan)
#define REG_READ(_ah, _reg)
#define AR_PHY_RADAR_0_ENA
#define AR_AN_TOP2_PWDCLKIND
#define AR_PHY_FIND_SIG_FIRSTEP
#define AR_PHY_MASK2_P_15_01
#define AR_PHY_TIMING3_DSC_MAN
#define AR_CST_TIMEOUT_LIMIT_S
#define AR_PHY_RADAR_0_FIRPWR
void(* set_diversity)(struct ath_hw *ah, int value)
#define REG_SET_BIT(_a, _r, _f)
#define AR_SREV_5416(_ah)
#define AR_PHY_FC_DYN2040_EN
int(* rfbus_req)(struct ath_hw *ah)
#define AR_PHY_BIN_MASK_2
int modparam_force_new_ani
#define REG_WRITE_ARRAY(iniarray, column, regWr)
#define ATH_ALLOC_BANK(bank, size)
static const int m1ThreshLowExt_off
#define AR_PHY_PILOT_MASK_31_60
#define AR_PHY_SFCORR_M2_THRESH
#define AR_PHY_MINCCA_PWR
#define AR_PHY_MODE_DYN_CCK_DISABLE
#define AR_PHY_FC_SINGLE_HT_LTF1
#define AR_SREV_5416_22_OR_LATER(_ah)
#define AR_PCU_MISC_MODE2_HWWAR1
static void ar5008_hw_override_ini(struct ath_hw *ah, struct ath9k_channel *chan __unused)
#define AR_PHY_SFCORR_EXT
struct ar5416AniState ani
#define AR_PHY_RADAR_1_BLOCK_CHECK
int ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout)
#define REG_WRITE(_ah, _reg, _val)
#define AR_PHY_PILOT_MASK_01_30
void ath9k_hw_set11nmac2040(struct ath_hw *ah)
#define CHANNEL_A_HT40PLUS
static void ar5008_hw_ani_cache_ini_regs(struct ath_hw *ah)
#define EIO
Input/output error.
static const int m1Thresh_off
#define AR_SREV_9271(_ah)
#define REG_READ_FIELD(_a, _r, _f)
int(* ani_control)(struct ath_hw *ah, enum ath9k_ani_cmd cmd, int param)
#define ATH9K_SIG_FIRSTEP_SETTING_MIN
#define AR_PHY_SFCORR_EXT_M1_THRESH
static const int cycpwrThr1_table[]
uint8_t data[48]
Additional event data.
#define ATH9K_ANI_USE_OFDM_WEAK_SIG
#define AR_PHY_MODE_RF2GHZ
static const int m2ThreshLow_off
static void ar5008_rf_bank_setup(u32 *bank, struct ar5416IniArray *array, int col)
int(* rf_set_freq)(struct ath_hw *ah, struct ath9k_channel *chan)
static void ar5008_hw_set_delta_slope(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_PHY_DESIRED_SZ_TOT_DES
void(* set_channel_regs)(struct ath_hw *ah, struct ath9k_channel *chan)
void ath9k_hw_get_channel_centers(struct ath_hw *ah __unused, struct ath9k_channel *chan, struct chan_centers *centers)
unsigned int pulse_inband
u32(* compute_pll_control)(struct ath_hw *ah, struct ath9k_channel *chan)
#define AR_SREV_9160_10_OR_LATER(_ah)
void(* set_radar_params)(struct ath_hw *ah, struct ath_hw_radar_conf *conf)
static struct ath_hw_private_ops * ath9k_hw_private_ops(struct ath_hw *ah)
void(* do_getnf)(struct ath_hw *ah, int16_t nfarray[NUM_NF_READINGS])
#define AR_PHY_SEL_EXTERNAL_RADIO
#define DBG(...)
Print a debugging message.
void(* restore_chainmask)(struct ath_hw *ah)
struct ath9k_ani_default iniDef
#define CHANNEL_G_HT40PLUS
#define AR_PHY_EXT_TIMING5_CYCPWR_THR1
#define IS_CHAN_A_FAST_CLOCK(_ah, _c)
#define AR_PHY_BIN_MASK2_1
#define AR_PHY_RADAR_EXT_ENA
#define AR_PHY_BIN_MASK2_2
#define AR_PHY_RFBUS_GRANT
#define AR_PHY_CCA_NOM_VAL_5416_2GHZ
#define NULL
NULL pointer (VOID *)
#define AR_PHY_HEAVY_CLIP_FACTOR_RIFS
static void ar5008_hw_rfbus_done(struct ath_hw *ah)
#define AR_PHY_BIN_MASK_3
#define CHANNEL_G_HT40MINUS
#define AR_PHY_TIMING11_USE_SPUR_IN_AGC
#define ENABLE_REGWRITE_BUFFER(_ah)
static void ar5008_hw_set_radar_params(struct ath_hw *ah, struct ath_hw_radar_conf *conf)
static int ath9k_hw_set_rf_regs(struct ath_hw *ah, struct ath9k_channel *chan, u16 modesIndex)
#define AR_PHY_MODE_DYNAMIC
#define AR_PHY_RADAR_1_RELPWR_THRESH
static void ar5008_set_diversity(struct ath_hw *ah, int value)
void * memset(void *dest, int character, size_t len) __nonnull
u32 ath9k_hw_reverse_bits(u32 val, u32 n)
static const uint8_t r[3][4]
MD4 shift amounts.
#define AR_PHY_HALFGI_DSC_EXP
#define AR_PHY_VIT_MASK2_M_46_61