iPXE
|
#include <ipxe/io.h>
#include <ipxe/malloc.h>
#include "hw.h"
#include "ar9003_phy.h"
#include "ar9003_eeprom.h"
Go to the source code of this file.
Macros | |
#define | COMP_HDR_LEN 4 |
#define | COMP_CKSUM_LEN 2 |
#define | AR_CH0_TOP (0x00016288) |
#define | AR_CH0_TOP_XPABIASLVL (0x300) |
#define | AR_CH0_TOP_XPABIASLVL_S (8) |
#define | AR_CH0_THERM (0x00016290) |
#define | AR_CH0_THERM_XPABIASLVL_MSB 0x3 |
#define | AR_CH0_THERM_XPABIASLVL_MSB_S 0 |
#define | AR_CH0_THERM_XPASHORT2GND 0x4 |
#define | AR_CH0_THERM_XPASHORT2GND_S 2 |
#define | AR_SWITCH_TABLE_COM_ALL (0xffff) |
#define | AR_SWITCH_TABLE_COM_ALL_S (0) |
#define | AR_SWITCH_TABLE_COM2_ALL (0xffffff) |
#define | AR_SWITCH_TABLE_COM2_ALL_S (0) |
#define | AR_SWITCH_TABLE_ALL (0xfff) |
#define | AR_SWITCH_TABLE_ALL_S (0) |
#define | LE16(x) (uint16_t)(x) |
#define | LE32(x) (uint32_t)(x) |
#define | EXT_ADDITIVE (0x8000) |
#define | CTL_11A_EXT (CTL_11A | EXT_ADDITIVE) |
#define | CTL_11G_EXT (CTL_11G | EXT_ADDITIVE) |
#define | CTL_11B_EXT (CTL_11B | EXT_ADDITIVE) |
#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 | PWRINCR_3_TO_1_CHAIN 9 /* 10*log(3)*2 */ |
#define | PWRINCR_3_TO_2_CHAIN 3 /* floor(10*log(3/2)*2) */ |
#define | PWRINCR_2_TO_1_CHAIN 6 /* 10*log(2)*2 */ |
#define | SUB_NUM_CTL_MODES_AT_5G_40 2 /* excluding HT40, EXT-OFDM */ |
#define | SUB_NUM_CTL_MODES_AT_2G_40 3 /* excluding HT40, EXT-OFDM, EXT-CCK */ |
#define | CTL(_tpower, _flag) ((_tpower) | ((_flag) << 6)) |
#define | EEPROM_DATA_LEN_9485 1088 |
#define | N_LOOP (sizeof(ar9300_eep_templates) / sizeof(ar9300_eep_templates[0])) |
#define | AR9300_EEP_BASE_DRIV_STRENGTH 0x1 |
#define | MDEFAULT 15 |
#define | MSTATE 100 |
#define | POW_SM(_r, _s) (((_r) & 0x3f) << (_s)) |
Typedefs | |
typedef int(* | eeprom_read_op) (struct ath_hw *ah, int address, u8 *buffer, int count) |
Functions | |
static int | ar9003_hw_power_interpolate (int32_t x, int32_t *px, int32_t *py, uint16_t np) |
static const struct ar9300_eeprom * | ar9003_eeprom_struct_find_by_id (int id) |
static u16 | ath9k_hw_fbin2freq (u8 fbin, int is2GHz) |
static int | ath9k_hw_ar9300_check_eeprom (struct ath_hw *ah __unused) |
static int | interpolate (int x, int xa, int xb, int ya, int yb) |
static u32 | ath9k_hw_ar9300_get_eeprom (struct ath_hw *ah, enum eeprom_param param) |
static int | ar9300_eeprom_read_byte (struct ath_common *common, int address, u8 *buffer) |
static int | ar9300_eeprom_read_word (struct ath_common *common, int address, u8 *buffer) |
static int | ar9300_read_eeprom (struct ath_hw *ah, int address, u8 *buffer, int count) |
static int | ar9300_otp_read_word (struct ath_hw *ah, int addr, u32 *data) |
static int | ar9300_read_otp (struct ath_hw *ah, int address, u8 *buffer, int count) |
static void | ar9300_comp_hdr_unpack (u8 *best, int *code, int *reference, int *length, int *major, int *minor) |
static u16 | ar9300_comp_cksum (u8 *data, int dsize) |
static int | ar9300_uncompress_block (struct ath_hw *ah __unused, u8 *mptr, int mdataSize, u8 *block, int size) |
static int | ar9300_compress_decision (struct ath_hw *ah, int it, int code, int reference, u8 *mptr, u8 *word, int length, int mdata_size) |
static int | ar9300_check_header (void *data) |
static int | ar9300_check_eeprom_header (struct ath_hw *ah, eeprom_read_op read, int base_addr) |
static int | ar9300_eeprom_restore_flash (struct ath_hw *ah, u8 *mptr, int mdata_size) |
static int | ar9300_eeprom_restore_internal (struct ath_hw *ah, u8 *mptr, int mdata_size) |
static int | ath9k_hw_ar9300_fill_eeprom (struct ath_hw *ah) |
static int | ath9k_hw_ar9300_get_eeprom_ver (struct ath_hw *ah) |
static int | ath9k_hw_ar9300_get_eeprom_rev (struct ath_hw *ah __unused) |
static s32 | ar9003_hw_xpa_bias_level_get (struct ath_hw *ah, int is2ghz) |
static void | ar9003_hw_xpa_bias_level_apply (struct ath_hw *ah, int is2ghz) |
static u32 | ar9003_hw_ant_ctrl_common_get (struct ath_hw *ah, int is2ghz) |
static u32 | ar9003_hw_ant_ctrl_common_2_get (struct ath_hw *ah, int is2ghz) |
static u16 | ar9003_hw_ant_ctrl_chain_get (struct ath_hw *ah, int chain, int is2ghz) |
static void | ar9003_hw_ant_ctrl_apply (struct ath_hw *ah, int is2ghz) |
static void | ar9003_hw_drive_strength_apply (struct ath_hw *ah) |
static u16 | ar9003_hw_atten_chain_get (struct ath_hw *ah, int chain, struct ath9k_channel *chan) |
static u16 | ar9003_hw_atten_chain_get_margin (struct ath_hw *ah, int chain, struct ath9k_channel *chan) |
static void | ar9003_hw_atten_apply (struct ath_hw *ah, struct ath9k_channel *chan) |
static int | is_pmu_set (struct ath_hw *ah, u32 pmu_reg, int pmu_set) |
static void | ar9003_hw_internal_regulator_apply (struct ath_hw *ah) |
static void | ar9003_hw_apply_tuning_caps (struct ath_hw *ah) |
static void | ath9k_hw_ar9300_set_board_values (struct ath_hw *ah, struct ath9k_channel *chan) |
static void | ath9k_hw_ar9300_set_addac (struct ath_hw *ah __unused, struct ath9k_channel *chan __unused) |
static u8 | ar9003_hw_eeprom_get_tgt_pwr (struct ath_hw *ah, u16 rateIndex, u16 freq, int is2GHz) |
static u8 | ar9003_hw_eeprom_get_ht20_tgt_pwr (struct ath_hw *ah, u16 rateIndex, u16 freq, int is2GHz) |
static u8 | ar9003_hw_eeprom_get_ht40_tgt_pwr (struct ath_hw *ah, u16 rateIndex, u16 freq, int is2GHz) |
static u8 | ar9003_hw_eeprom_get_cck_tgt_pwr (struct ath_hw *ah, u16 rateIndex, u16 freq) |
static int | ar9003_hw_tx_power_regwrite (struct ath_hw *ah, u8 *pPwrArray) |
static void | ar9003_hw_set_target_power_eeprom (struct ath_hw *ah, u16 freq, u8 *targetPowerValT2) |
static int | ar9003_hw_cal_pier_get (struct ath_hw *ah, int mode, int ipier, int ichain, int *pfrequency, int *pcorrection, int *ptemperature, int *pvoltage) |
static int | ar9003_hw_power_control_override (struct ath_hw *ah, int frequency, int *correction, int *voltage __unused, int *temperature) |
static int | ar9003_hw_calibration_apply (struct ath_hw *ah, int frequency) |
static u16 | ar9003_hw_get_direct_edge_power (struct ar9300_eeprom *eep, int idx, int edge, int is2GHz) |
static u16 | ar9003_hw_get_indirect_edge_power (struct ar9300_eeprom *eep, int idx, unsigned int edge, u16 freq, int is2GHz) |
static u16 | ar9003_hw_get_max_edge_power (struct ar9300_eeprom *eep, u16 freq, int idx, int is2GHz) |
static void | ar9003_hw_set_power_per_rate_table (struct ath_hw *ah, struct ath9k_channel *chan, u8 *pPwrArray, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u16 powerLimit) |
static u8 | mcsidx_to_tgtpwridx (unsigned int mcs_idx, u8 base_pwridx) |
static void | ath9k_hw_ar9300_set_txpower (struct ath_hw *ah, struct ath9k_channel *chan, u16 cfgCtl, u8 twiceAntennaReduction, u8 twiceMaxRegulatoryPower, u8 powerLimit, int test) |
static u16 | ath9k_hw_ar9300_get_spur_channel (struct ath_hw *ah __unused, u16 i __unused, int is2GHz __unused) |
s32 | ar9003_hw_get_tx_gain_idx (struct ath_hw *ah) |
s32 | ar9003_hw_get_rx_gain_idx (struct ath_hw *ah) |
u8 * | ar9003_get_spur_chan_ptr (struct ath_hw *ah, int is_2ghz) |
unsigned int | ar9003_get_paprd_scale_factor (struct ath_hw *ah, struct ath9k_channel *chan) |
Variables | |
static const struct ar9300_eeprom | ar9300_default |
static const struct ar9300_eeprom | ar9300_x113 |
static const struct ar9300_eeprom | ar9300_h112 |
static const struct ar9300_eeprom | ar9300_x112 |
static const struct ar9300_eeprom | ar9300_h116 |
static const struct ar9300_eeprom * | ar9300_eep_templates [] |
const struct eeprom_ops | eep_ar9300_ops |
#define COMP_HDR_LEN 4 |
Definition at line 27 of file ath9k_ar9003_eeprom.c.
#define COMP_CKSUM_LEN 2 |
Definition at line 28 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_TOP (0x00016288) |
Definition at line 30 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_TOP_XPABIASLVL (0x300) |
Definition at line 31 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_TOP_XPABIASLVL_S (8) |
Definition at line 32 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_THERM (0x00016290) |
Definition at line 34 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_THERM_XPABIASLVL_MSB 0x3 |
Definition at line 35 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_THERM_XPABIASLVL_MSB_S 0 |
Definition at line 36 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_THERM_XPASHORT2GND 0x4 |
Definition at line 37 of file ath9k_ar9003_eeprom.c.
#define AR_CH0_THERM_XPASHORT2GND_S 2 |
Definition at line 38 of file ath9k_ar9003_eeprom.c.
#define AR_SWITCH_TABLE_COM_ALL (0xffff) |
Definition at line 40 of file ath9k_ar9003_eeprom.c.
#define AR_SWITCH_TABLE_COM_ALL_S (0) |
Definition at line 41 of file ath9k_ar9003_eeprom.c.
#define AR_SWITCH_TABLE_COM2_ALL (0xffffff) |
Definition at line 43 of file ath9k_ar9003_eeprom.c.
#define AR_SWITCH_TABLE_COM2_ALL_S (0) |
Definition at line 44 of file ath9k_ar9003_eeprom.c.
#define AR_SWITCH_TABLE_ALL (0xfff) |
Definition at line 46 of file ath9k_ar9003_eeprom.c.
#define AR_SWITCH_TABLE_ALL_S (0) |
Definition at line 47 of file ath9k_ar9003_eeprom.c.
#define LE16 | ( | x | ) | (uint16_t)(x) |
Definition at line 49 of file ath9k_ar9003_eeprom.c.
#define LE32 | ( | x | ) | (uint32_t)(x) |
Definition at line 50 of file ath9k_ar9003_eeprom.c.
#define EXT_ADDITIVE (0x8000) |
Definition at line 53 of file ath9k_ar9003_eeprom.c.
#define CTL_11A_EXT (CTL_11A | EXT_ADDITIVE) |
Definition at line 54 of file ath9k_ar9003_eeprom.c.
#define CTL_11G_EXT (CTL_11G | EXT_ADDITIVE) |
Definition at line 55 of file ath9k_ar9003_eeprom.c.
#define CTL_11B_EXT (CTL_11B | EXT_ADDITIVE) |
Definition at line 56 of file ath9k_ar9003_eeprom.c.
#define REDUCE_SCALED_POWER_BY_TWO_CHAIN 6 /* 10*log10(2)*2 */ |
Definition at line 57 of file ath9k_ar9003_eeprom.c.
#define REDUCE_SCALED_POWER_BY_THREE_CHAIN 9 /* 10*log10(3)*2 */ |
Definition at line 58 of file ath9k_ar9003_eeprom.c.
#define PWRINCR_3_TO_1_CHAIN 9 /* 10*log(3)*2 */ |
Definition at line 59 of file ath9k_ar9003_eeprom.c.
#define PWRINCR_3_TO_2_CHAIN 3 /* floor(10*log(3/2)*2) */ |
Definition at line 60 of file ath9k_ar9003_eeprom.c.
#define PWRINCR_2_TO_1_CHAIN 6 /* 10*log(2)*2 */ |
Definition at line 61 of file ath9k_ar9003_eeprom.c.
#define SUB_NUM_CTL_MODES_AT_5G_40 2 /* excluding HT40, EXT-OFDM */ |
Definition at line 63 of file ath9k_ar9003_eeprom.c.
#define SUB_NUM_CTL_MODES_AT_2G_40 3 /* excluding HT40, EXT-OFDM, EXT-CCK */ |
Definition at line 64 of file ath9k_ar9003_eeprom.c.
#define CTL | ( | _tpower, | |
_flag | |||
) | ((_tpower) | ((_flag) << 6)) |
Definition at line 66 of file ath9k_ar9003_eeprom.c.
#define EEPROM_DATA_LEN_9485 1088 |
Definition at line 68 of file ath9k_ar9003_eeprom.c.
#define N_LOOP (sizeof(ar9300_eep_templates) / sizeof(ar9300_eep_templates[0])) |
#define AR9300_EEP_BASE_DRIV_STRENGTH 0x1 |
#define MDEFAULT 15 |
#define MSTATE 100 |
#define POW_SM | ( | _r, | |
_s | |||
) | (((_r) & 0x3f) << (_s)) |
Definition at line 3265 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 3821 of file ath9k_ar9003_eeprom.c.
References dx, interpolate(), and ip.
Referenced by ar9003_hw_atten_chain_get(), ar9003_hw_atten_chain_get_margin(), ar9003_hw_eeprom_get_cck_tgt_pwr(), ar9003_hw_eeprom_get_ht20_tgt_pwr(), ar9003_hw_eeprom_get_ht40_tgt_pwr(), ar9003_hw_eeprom_get_tgt_pwr(), and ar9003_hw_power_control_override().
|
static |
Definition at line 2971 of file ath9k_ar9003_eeprom.c.
References ar9300_eep_templates, N_LOOP, NULL, and templateVersion.
Referenced by ar9300_compress_decision().
Definition at line 2984 of file ath9k_ar9003_eeprom.c.
References AR5416_BCHAN_UNUSED.
Referenced by ar9003_hw_get_indirect_edge_power(), and ar9003_hw_get_max_edge_power().
Definition at line 2992 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 2997 of file ath9k_ar9003_eeprom.c.
Referenced by ar9003_hw_calibration_apply(), and ar9003_hw_power_interpolate().
|
static |
Definition at line 3007 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_BaseExtension_1::ant_div_control, AR9300_EEP_BASE_DRIV_STRENGTH, ar9300_eeprom::base_ext1, ar9300_eeprom::baseEepHeader, BIT, ar9300_base_eep_hdr::deviceCap, EEP_ANT_DIV_CTL1, EEP_CHAIN_MASK_REDUCE, EEP_DRIVE_STRENGTH, EEP_INTERNAL_REGULATOR, EEP_MAC_LSW, EEP_MAC_MID, EEP_MAC_MSW, EEP_OP_CAP, EEP_OP_MODE, EEP_PAPRD, EEP_REG_0, EEP_REG_1, EEP_RF_SILENT, EEP_RX_MASK, EEP_SWREG, EEP_TX_MASK, ar9300_base_eep_hdr::featureEnable, ar9300_eeprom::macAddr, ar9300_base_eep_hdr::miscConfiguration, ar9300_base_eep_hdr::opCapFlags, eepFlags::opFlags, param, ar9300_base_eep_hdr::regDmn, ar9300_base_eep_hdr::rfSilent, ar9300_base_eep_hdr::swreg, and ar9300_base_eep_hdr::txrxMask.
Referenced by ar9003_hw_ant_ctrl_apply(), ar9003_hw_drive_strength_apply(), and ar9003_hw_internal_regulator_apply().
|
static |
Definition at line 3053 of file ath9k_ar9003_eeprom.c.
References address, ath9k_hw_nvram_read(), buffer, common, and val.
Referenced by ar9300_read_eeprom().
|
static |
Definition at line 3065 of file ath9k_ar9003_eeprom.c.
References address, ath9k_hw_nvram_read(), buffer, common, and val.
Referenced by ar9300_read_eeprom().
Definition at line 3079 of file ath9k_ar9003_eeprom.c.
References address, ah, ar9300_eeprom_read_byte(), ar9300_eeprom_read_word(), AR9300_EEPROM_SIZE, ath9k_hw_common(), buffer, common, count, DBG, and error.
Referenced by ar9300_eeprom_restore_internal().
Definition at line 3123 of file ath9k_ar9003_eeprom.c.
References addr, ah, AR9300_OTP_BASE, AR9300_OTP_READ_DATA, AR9300_OTP_STATUS, AR9300_OTP_STATUS_TYPE, AR9300_OTP_STATUS_VALID, ath9k_hw_wait(), data, and REG_READ.
Referenced by ar9300_read_otp().
Definition at line 3135 of file ath9k_ar9003_eeprom.c.
References address, ah, ar9300_otp_read_word(), buffer, count, data, and offset.
Referenced by ar9300_eeprom_restore_internal().
|
static |
Definition at line 3153 of file ath9k_ar9003_eeprom.c.
References code, length, major, minor, and value.
Referenced by ar9300_eeprom_restore_internal().
Definition at line 3169 of file ath9k_ar9003_eeprom.c.
References checksum, and data.
Referenced by ar9300_eeprom_restore_internal().
|
static |
Definition at line 3181 of file ath9k_ar9003_eeprom.c.
References block, DBG, DBG2, length, memcpy(), offset, and size.
Referenced by ar9300_compress_decision().
|
static |
Definition at line 3217 of file ath9k_ar9003_eeprom.c.
References _CompressBlock, _CompressNone, ah, ar9003_eeprom_struct_find_by_id(), ar9300_uncompress_block(), code, COMP_HDR_LEN, DBG, DBG2, length, memcpy(), and NULL.
Referenced by ar9300_eeprom_restore_internal().
|
static |
Definition at line 3268 of file ath9k_ar9003_eeprom.c.
References data.
Referenced by ar9300_check_eeprom_header(), and ar9300_eeprom_restore_internal().
|
static |
Definition at line 3274 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_check_header(), base_addr, header, and read.
Referenced by ar9300_eeprom_restore_internal().
Definition at line 3285 of file ath9k_ar9003_eeprom.c.
References ah, ath9k_hw_common(), ath9k_hw_nvram_read(), common, and data.
Referenced by ar9300_eeprom_restore_internal().
Definition at line 3304 of file ath9k_ar9003_eeprom.c.
References ah, AR9300_BASE_ADDR, AR9300_BASE_ADDR_4K, AR9300_BASE_ADDR_512, ar9300_check_eeprom_header(), ar9300_check_header(), ar9300_comp_cksum(), ar9300_comp_hdr_unpack(), ar9300_compress_decision(), ar9300_default, ar9300_eeprom_restore_flash(), ar9300_read_eeprom(), ar9300_read_otp(), AR_SREV_9485, ath9k_hw_use_flash, checksum, code, COMP_CKSUM_LEN, COMP_HDR_LEN, DBG2, EEPROM_DATA_LEN_9485, free, length, major, memcpy(), minor, MSTATE, read, and zalloc().
Referenced by ath9k_hw_ar9300_fill_eeprom().
|
static |
Definition at line 3411 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_eeprom_restore_internal(), and if().
|
static |
Definition at line 3429 of file ath9k_ar9003_eeprom.c.
Definition at line 3434 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, and ar9300_modal_eep_header::xpaBiasLvl.
Referenced by ar9003_hw_xpa_bias_level_apply().
|
static |
Definition at line 3444 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_xpa_bias_level_get(), AR_CH0_THERM, AR_CH0_THERM_XPABIASLVL_MSB, AR_CH0_THERM_XPASHORT2GND, AR_CH0_TOP, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, AR_CH0_TOP_XPABIASLVL, AR_SREV_9340, AR_SREV_9485, and REG_RMW_FIELD.
Referenced by ath9k_hw_ar9300_set_board_values().
Definition at line 3460 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_modal_eep_header::antCtrlCommon, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, and val.
Referenced by ar9003_hw_ant_ctrl_apply().
Definition at line 3472 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_modal_eep_header::antCtrlCommon2, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, and val.
Referenced by ar9003_hw_ant_ctrl_apply().
Definition at line 3484 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_modal_eep_header::antCtrlChain, AR9300_MAX_CHAINS, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, and val.
Referenced by ar9003_hw_ant_ctrl_apply().
|
static |
Definition at line 3501 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_ant_ctrl_chain_get(), ar9003_hw_ant_ctrl_common_2_get(), ar9003_hw_ant_ctrl_common_get(), AR9300_MAX_CHAINS, AR_ANT_DIV_CTRL_ALL, AR_ANT_DIV_CTRL_ALL_S, AR_FAST_DIV_ENABLE, AR_FAST_DIV_ENABLE_S, AR_PHY_9485_ANT_DIV_ALT_GAINTB, AR_PHY_9485_ANT_DIV_ALT_LNACONF, AR_PHY_9485_ANT_DIV_ALT_LNACONF_S, AR_PHY_9485_ANT_DIV_LNA1, AR_PHY_9485_ANT_DIV_LNA2, AR_PHY_9485_ANT_DIV_LNADIV, AR_PHY_9485_ANT_DIV_LNADIV_S, AR_PHY_9485_ANT_DIV_MAIN_GAINTB, AR_PHY_9485_ANT_DIV_MAIN_LNACONF, AR_PHY_9485_ANT_DIV_MAIN_LNACONF_S, AR_PHY_CCK_DETECT, AR_PHY_MC_GAIN_CTRL, AR_PHY_SWITCH_CHAIN_0, AR_PHY_SWITCH_CHAIN_1, AR_PHY_SWITCH_CHAIN_2, AR_PHY_SWITCH_COM, AR_PHY_SWITCH_COM_2, AR_SREV_9485, AR_SWITCH_TABLE_ALL, AR_SWITCH_TABLE_COM2_ALL, AR_SWITCH_TABLE_COM_ALL, ath9k_hw_ar9300_get_eeprom(), BIT, EEP_ANT_DIV_CTL1, REG_READ, REG_RMW_FIELD, REG_WRITE, and value.
Referenced by ath9k_hw_ar9300_set_board_values().
|
static |
Definition at line 3576 of file ath9k_ar9003_eeprom.c.
References ah, AR_PHY_65NM_CH0_BIAS1, AR_PHY_65NM_CH0_BIAS2, AR_PHY_65NM_CH0_BIAS4, ath9k_hw_ar9300_get_eeprom(), EEP_DRIVE_STRENGTH, reg, REG_READ, and REG_WRITE.
Referenced by ath9k_hw_ar9300_set_board_values().
|
static |
Definition at line 3617 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), ar9300_eeprom::base_ext2, ath9k_channel::channel, IS_CHAN_2GHZ, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, value, ar9300_modal_eep_header::xatten1DB, ar9300_BaseExtension_2::xatten1DBHigh, and ar9300_BaseExtension_2::xatten1DBLow.
Referenced by ar9003_hw_atten_apply().
|
static |
Definition at line 3645 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), ar9300_eeprom::base_ext2, ath9k_channel::channel, IS_CHAN_2GHZ, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, value, ar9300_modal_eep_header::xatten1Margin, ar9300_BaseExtension_2::xatten1MarginHigh, and ar9300_BaseExtension_2::xatten1MarginLow.
Referenced by ar9003_hw_atten_apply().
|
static |
Definition at line 3672 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_atten_chain_get(), ar9003_hw_atten_chain_get_margin(), AR_PHY_EXT_ATTEN_CTL_0, AR_PHY_EXT_ATTEN_CTL_1, AR_PHY_EXT_ATTEN_CTL_2, AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN, BIT, REG_RMW_FIELD, and value.
Referenced by ath9k_hw_ar9300_set_board_values().
Definition at line 3696 of file ath9k_ar9003_eeprom.c.
References ah, REG_READ, REG_WRITE, timeout(), and udelay().
Referenced by ar9003_hw_internal_regulator_apply().
|
static |
Definition at line 3710 of file ath9k_ar9003_eeprom.c.
References ah, AR_PHY_PMU1, AR_PHY_PMU1_PWD, AR_PHY_PMU2, AR_PHY_PMU2_PGM, AR_RTC_FORCE_SWREG_PRD, AR_RTC_REG_CONTROL0, AR_RTC_REG_CONTROL1, AR_RTC_REG_CONTROL1_SWREG_PROGRAM, AR_RTC_SLEEP_CLK, AR_SREV_9485, ath9k_hw_ar9300_get_eeprom(), EEP_INTERNAL_REGULATOR, EEP_SWREG, is_pmu_set(), REG_READ, REG_READ_FIELD, REG_RMW_FIELD, REG_WRITE, swreg, and udelay().
Referenced by ath9k_hw_ar9300_set_board_values().
|
static |
Definition at line 3780 of file ath9k_ar9003_eeprom.c.
References ah, AR_CH0_XTAL, AR_CH0_XTAL_CAPINDAC, AR_CH0_XTAL_CAPOUTDAC, ar9300_eeprom::baseEepHeader, ar9300_base_eep_hdr::featureEnable, ar9300_base_eep_hdr::params_for_tuning_caps, and REG_RMW_FIELD.
Referenced by ath9k_hw_ar9300_set_board_values().
|
static |
Definition at line 3794 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_ant_ctrl_apply(), ar9003_hw_apply_tuning_caps(), ar9003_hw_atten_apply(), ar9003_hw_drive_strength_apply(), ar9003_hw_internal_regulator_apply(), ar9003_hw_xpa_bias_level_apply(), AR_SREV_9340, AR_SREV_9485, and IS_CHAN_2GHZ.
|
static |
Definition at line 3807 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 3875 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), AR9300_NUM_2G_20_TARGET_POWERS, AR9300_NUM_5G_20_TARGET_POWERS, ar9300_eeprom::calTarget_freqbin_2G, ar9300_eeprom::calTarget_freqbin_5G, ar9300_eeprom::calTargetPower2G, ar9300_eeprom::calTargetPower5G, FBIN2FREQ, and cal_tgt_pow_legacy::tPow2x.
Referenced by ar9003_hw_set_target_power_eeprom().
|
static |
Definition at line 3910 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), AR9300_NUM_2G_20_TARGET_POWERS, AR9300_NUM_5G_20_TARGET_POWERS, ar9300_eeprom::calTarget_freqbin_2GHT20, ar9300_eeprom::calTarget_freqbin_5GHT20, ar9300_eeprom::calTargetPower2GHT20, ar9300_eeprom::calTargetPower5GHT20, FBIN2FREQ, and cal_tgt_pow_ht::tPow2x.
Referenced by ar9003_hw_set_target_power_eeprom().
|
static |
Definition at line 3946 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), AR9300_NUM_2G_40_TARGET_POWERS, AR9300_NUM_5G_40_TARGET_POWERS, ar9300_eeprom::calTarget_freqbin_2GHT40, ar9300_eeprom::calTarget_freqbin_5GHT40, ar9300_eeprom::calTargetPower2GHT40, ar9300_eeprom::calTargetPower5GHT40, FBIN2FREQ, and cal_tgt_pow_ht::tPow2x.
Referenced by ar9003_hw_set_target_power_eeprom().
Definition at line 3982 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), AR9300_NUM_2G_CCK_TARGET_POWERS, ar9300_eeprom::calTarget_freqbin_Cck, ar9300_eeprom::calTargetPowerCck, FBIN2FREQ, and cal_tgt_pow_legacy::tPow2x.
Referenced by ar9003_hw_set_target_power_eeprom().
Definition at line 4008 of file ath9k_ar9003_eeprom.c.
References ah, ALL_TARGET_HT20_0_8_16, ALL_TARGET_HT20_12, ALL_TARGET_HT20_13, ALL_TARGET_HT20_14, ALL_TARGET_HT20_15, ALL_TARGET_HT20_1_3_9_11_17_19, ALL_TARGET_HT20_20, ALL_TARGET_HT20_21, ALL_TARGET_HT20_22, ALL_TARGET_HT20_23, ALL_TARGET_HT20_4, ALL_TARGET_HT20_5, ALL_TARGET_HT20_6, ALL_TARGET_HT20_7, ALL_TARGET_HT40_0_8_16, ALL_TARGET_HT40_12, ALL_TARGET_HT40_13, ALL_TARGET_HT40_14, ALL_TARGET_HT40_15, ALL_TARGET_HT40_1_3_9_11_17_19, ALL_TARGET_HT40_20, ALL_TARGET_HT40_21, ALL_TARGET_HT40_22, ALL_TARGET_HT40_23, ALL_TARGET_HT40_4, ALL_TARGET_HT40_5, ALL_TARGET_HT40_6, ALL_TARGET_HT40_7, ALL_TARGET_LEGACY_11L, ALL_TARGET_LEGACY_11S, ALL_TARGET_LEGACY_1L_5L, ALL_TARGET_LEGACY_36, ALL_TARGET_LEGACY_48, ALL_TARGET_LEGACY_54, ALL_TARGET_LEGACY_5S, ALL_TARGET_LEGACY_6_24, AR_PHY_POWER_TX_RATE, AR_PHY_TX_FORCED_GAIN, POW_SM, and REG_WRITE.
Referenced by ath9k_hw_ar9300_set_txpower().
|
static |
Definition at line 4125 of file ath9k_ar9003_eeprom.c.
References ah, ALL_TARGET_HT20_0_8_16, ALL_TARGET_HT20_12, ALL_TARGET_HT20_13, ALL_TARGET_HT20_14, ALL_TARGET_HT20_15, ALL_TARGET_HT20_1_3_9_11_17_19, ALL_TARGET_HT20_20, ALL_TARGET_HT20_21, ALL_TARGET_HT20_22, ALL_TARGET_HT20_23, ALL_TARGET_HT20_4, ALL_TARGET_HT20_5, ALL_TARGET_HT20_6, ALL_TARGET_HT20_7, ALL_TARGET_HT40_0_8_16, ALL_TARGET_HT40_12, ALL_TARGET_HT40_13, ALL_TARGET_HT40_14, ALL_TARGET_HT40_15, ALL_TARGET_HT40_1_3_9_11_17_19, ALL_TARGET_HT40_20, ALL_TARGET_HT40_21, ALL_TARGET_HT40_22, ALL_TARGET_HT40_23, ALL_TARGET_HT40_4, ALL_TARGET_HT40_5, ALL_TARGET_HT40_6, ALL_TARGET_HT40_7, ALL_TARGET_LEGACY_11L, ALL_TARGET_LEGACY_11S, ALL_TARGET_LEGACY_1L_5L, ALL_TARGET_LEGACY_36, ALL_TARGET_LEGACY_48, ALL_TARGET_LEGACY_54, ALL_TARGET_LEGACY_5S, ALL_TARGET_LEGACY_6_24, ar9003_hw_eeprom_get_cck_tgt_pwr(), ar9003_hw_eeprom_get_ht20_tgt_pwr(), ar9003_hw_eeprom_get_ht40_tgt_pwr(), ar9003_hw_eeprom_get_tgt_pwr(), ar9300RateSize, DBG2, HT_TARGET_RATE_0_8_16, HT_TARGET_RATE_12, HT_TARGET_RATE_13, HT_TARGET_RATE_14, HT_TARGET_RATE_15, HT_TARGET_RATE_1_3_9_11_17_19, HT_TARGET_RATE_20, HT_TARGET_RATE_21, HT_TARGET_RATE_22, HT_TARGET_RATE_23, HT_TARGET_RATE_4, HT_TARGET_RATE_5, HT_TARGET_RATE_6, HT_TARGET_RATE_7, LEGACY_TARGET_RATE_11L, LEGACY_TARGET_RATE_11S, LEGACY_TARGET_RATE_1L_5L, LEGACY_TARGET_RATE_36, LEGACY_TARGET_RATE_48, LEGACY_TARGET_RATE_54, LEGACY_TARGET_RATE_5S, and LEGACY_TARGET_RATE_6_24.
Referenced by ath9k_hw_ar9300_set_txpower().
|
static |
Definition at line 4249 of file ath9k_ar9003_eeprom.c.
References ah, AR9300_MAX_CHAINS, AR9300_NUM_2G_CAL_PIERS, AR9300_NUM_5G_CAL_PIERS, ar9300_eeprom::calFreqPier2G, ar9300_eeprom::calFreqPier5G, ar9300_eeprom::calPierData2G, ar9300_eeprom::calPierData5G, DBG, FBIN2FREQ, ar9300_cal_data_per_freq_op_loop::refPower, ar9300_cal_data_per_freq_op_loop::tempMeas, and ar9300_cal_data_per_freq_op_loop::voltMeas.
Referenced by ar9003_hw_calibration_apply().
|
static |
Definition at line 4300 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_power_interpolate(), AR_PHY_TPC_11_B0, AR_PHY_TPC_11_B1, AR_PHY_TPC_11_B2, AR_PHY_TPC_18, AR_PHY_TPC_18_THERM_CAL_VALUE, AR_PHY_TPC_19, AR_PHY_TPC_19_ALPHA_THERM, AR_PHY_TPC_6_B0, AR_PHY_TPC_6_B1, AR_PHY_TPC_6_B2, AR_PHY_TPC_6_ERROR_EST_MODE, AR_PHY_TPC_6_ERROR_EST_MODE_S, AR_PHY_TPC_OLPC_GAIN_DELTA, AR_PHY_TPC_OLPC_GAIN_DELTA_S, ar9300_eeprom::base_ext2, BIT, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, REG_RMW, REG_RMW_FIELD, tempSlope, ar9300_modal_eep_header::tempSlope, ar9300_BaseExtension_2::tempSlopeHigh, and ar9300_BaseExtension_2::tempSlopeLow.
Referenced by ar9003_hw_calibration_apply().
|
static |
Definition at line 4360 of file ath9k_ar9003_eeprom.c.
References ah, ar9003_hw_cal_pier_get(), ar9003_hw_power_control_override(), AR9300_MAX_CHAINS, AR9300_NUM_2G_CAL_PIERS, AR9300_NUM_5G_CAL_PIERS, DBG2, and interpolate().
Referenced by ath9k_hw_ar9300_set_txpower().
|
static |
Definition at line 4499 of file ath9k_ar9003_eeprom.c.
References CTL_EDGE_TPOWER, ctlEdges, ar9300_eeprom::ctlPowerData_2G, and ar9300_eeprom::ctlPowerData_5G.
Referenced by ar9003_hw_get_max_edge_power().
|
static |
Definition at line 4513 of file ath9k_ar9003_eeprom.c.
References ath9k_hw_fbin2freq(), CTL_EDGE_FLAGS, CTL_EDGE_TPOWER, ar9300_eeprom::ctl_freqbin_2G, ar9300_eeprom::ctl_freqbin_5G, ctlEdges, ar9300_eeprom::ctlPowerData_2G, ar9300_eeprom::ctlPowerData_5G, and MAX_RATE_POWER.
Referenced by ar9003_hw_get_max_edge_power().
|
static |
Definition at line 4542 of file ath9k_ar9003_eeprom.c.
References AR5416_BCHAN_UNUSED, ar9003_hw_get_direct_edge_power(), ar9003_hw_get_indirect_edge_power(), AR9300_NUM_BAND_EDGES_2G, AR9300_NUM_BAND_EDGES_5G, ath9k_hw_fbin2freq(), ar9300_eeprom::ctl_freqbin_2G, ar9300_eeprom::ctl_freqbin_5G, and MAX_RATE_POWER.
Referenced by ar9003_hw_set_power_per_rate_table().
|
static |
Definition at line 4583 of file ath9k_ar9003_eeprom.c.
References ah, ALL_TARGET_HT20_0_8_16, ALL_TARGET_HT20_21, ALL_TARGET_HT20_22, ALL_TARGET_HT20_23, ALL_TARGET_HT40_0_8_16, ALL_TARGET_HT40_23, ALL_TARGET_LEGACY_11S, ALL_TARGET_LEGACY_1L_5L, ALL_TARGET_LEGACY_54, ALL_TARGET_LEGACY_6_24, ar9300_modal_eep_header::antennaGain, ar5416_get_ntxchains, ar9003_hw_get_max_edge_power(), AR9300_NUM_CTLS_2G, AR9300_NUM_CTLS_5G, ARRAY_SIZE, ath9k_hw_get_channel_centers(), ath9k_hw_regulatory(), ATH9K_TP_SCALE_MAX, ath9k_channel::channel, 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, ar9300_eeprom::ctlIndex_2G, ar9300_eeprom::ctlIndex_5G, DBG2, EXT_ADDITIVE, chan_centers::ext_center, IS_CHAN_2GHZ, IS_CHAN_HT40, max, MAX_RATE_POWER, min, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, 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, and u8.
Referenced by ath9k_hw_ar9300_set_txpower().
|
static |
Definition at line 4821 of file ath9k_ar9003_eeprom.c.
References abs, ah, ALL_TARGET_HT20_0_8_16, ALL_TARGET_HT20_7, ALL_TARGET_HT40_0_8_16, ALL_TARGET_HT40_7, ALL_TARGET_LEGACY_6_24, ar9003_get_paprd_scale_factor(), ar9003_hw_calibration_apply(), ar9003_hw_set_power_per_rate_table(), ar9003_hw_set_target_power_eeprom(), ar9003_hw_tx_power_regwrite(), AR9300_PAPRD_RATE_MASK, ar9300RateSize, ath9k_hw_regulatory(), ath9k_channel::channel, DBG2, EEP_PAPRD, IS_CHAN_2GHZ, IS_CHAN_HT20, IS_CHAN_HT40, ath_regulatory::max_power_level, mcsidx_to_tgtpwridx(), memcpy(), ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, ar9300_modal_eep_header::papdRateMaskHt20, ar9300_modal_eep_header::papdRateMaskHt40, and test.
|
static |
Definition at line 4944 of file ath9k_ar9003_eeprom.c.
References AR_NO_SPUR.
Definition at line 4950 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_eeprom::baseEepHeader, and ar9300_base_eep_hdr::txrxgain.
Referenced by ar9003_tx_gain_table_apply().
Definition at line 4957 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_eeprom::baseEepHeader, and ar9300_base_eep_hdr::txrxgain.
Referenced by ar9003_rx_gain_table_apply().
Definition at line 4964 of file ath9k_ar9003_eeprom.c.
References ah, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, and ar9300_modal_eep_header::spurChans.
Referenced by ar9003_hw_spur_mitigate_mrc_cck().
unsigned int ar9003_get_paprd_scale_factor | ( | struct ath_hw * | ah, |
struct ath9k_channel * | chan | ||
) |
Definition at line 4974 of file ath9k_ar9003_eeprom.c.
References ah, AR9300_PAPRD_SCALE_1, AR9300_PAPRD_SCALE_2, ath9k_channel::channel, IS_CHAN_2GHZ, ar9300_eeprom::modalHeader2G, ar9300_eeprom::modalHeader5G, MS, ar9300_modal_eep_header::papdRateMaskHt20, and ar9300_modal_eep_header::papdRateMaskHt40.
Referenced by ath9k_hw_ar9300_set_txpower().
|
static |
Definition at line 74 of file ath9k_ar9003_eeprom.c.
Referenced by ar9300_eeprom_restore_internal().
|
static |
Definition at line 652 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 1230 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 1808 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 2385 of file ath9k_ar9003_eeprom.c.
|
static |
Definition at line 2963 of file ath9k_ar9003_eeprom.c.
Referenced by ar9003_eeprom_struct_find_by_id().
const struct eeprom_ops eep_ar9300_ops |
Definition at line 4995 of file ath9k_ar9003_eeprom.c.
Referenced by ath9k_hw_eeprom_init().