36 { { {4, 1, 1, 1}, 6,
"FG8"},
37 { {4, 0, 1, 1}, 4,
"FG7"},
38 { {3, 1, 1, 1}, 3,
"FG6"},
39 { {4, 0, 0, 1}, 1,
"FG5"},
40 { {4, 1, 1, 0}, 0,
"FG4"},
41 { {4, 0, 1, 0}, -2,
"FG3"},
42 { {3, 1, 1, 0}, -3,
"FG2"},
43 { {4, 0, 0, 0}, -4,
"FG1"},
44 { {2, 1, 1, 0}, -6,
"FG0"}
51 { { {3, 0,0,0, 0,0,0}, 6,
"FG7"},
52 { {2, 0,0,0, 0,0,0}, 0,
"FG6"},
53 { {1, 0,0,0, 0,0,0}, -3,
"FG5"},
54 { {0, 0,0,0, 0,0,0}, -6,
"FG4"},
55 { {0, 1,1,0, 0,0,0}, -8,
"FG3"},
56 { {0, 1,1,0, 1,1,0}, -10,
"FG2"},
57 { {0, 1,0,1, 1,1,0}, -13,
"FG1"},
58 { {0, 1,0,1, 1,0,1}, -16,
"FG0"},
88#define MAX_ANALOG_START 319
96 uint32_t reg32 = 0, mask, arrayEntry, lastBit;
97 uint32_t bitPosition, bitsShifted;
104 arrayEntry = (firstBit - 1) / 8;
105 bitPosition = (firstBit - 1) % 8;
108 while (bitsLeft > 0) {
109 lastBit = (bitPosition + bitsLeft > 8) ?
110 (8) : (bitPosition + bitsLeft);
111 mask = (((1 << lastBit) - 1) ^ ((1 << bitPosition) - 1)) <<
113 reg32 |= (((rfBuf[arrayEntry] & mask) >> (column * 8)) >>
114 bitPosition) << bitsShifted;
115 bitsShifted += lastBit - bitPosition;
116 bitsLeft -= (8 - bitPosition);
127 uint32_t gStep, g, mixOvr;
128 uint32_t L1, L2, L3, L4;
145 L2 = (gStep == 0x3f) ? 50 : gStep + 4;
146 L3 = (gStep != 0x3f) ? 0x40 : L1;
155 return !((g >= L1 && g<= L2) || (g >= L3 && g <= L4));
165 uint32_t probePowerIndex;
206 "%s: Adding gain: currG=%d [%s] --> ",
221 "%s: Min gain limit.\n", __func__);
225 "%s: Deducting gain: currG=%d [%s] --> ",
263 correction = gainStep;
266 correction = 2 * gainStep - 5;
269 correction = 2 * gainStep;
285 uint32_t rddata, probeType;
uint32_t ath_hal_reverseBits(uint32_t val, uint32_t n)
@ HAL_RFGAIN_READ_REQUESTED
#define HALDEBUG(_ah, __m,...)
#define OS_REG_WRITE(_ah, _reg, _val)
#define OS_REG_READ(_ah, _reg)
#define DYN_ADJ_UP_MARGIN
#define DYN_ADJ_LO_MARGIN
#define AR_PHY_PAPD_PROBE_POWERTX
#define AR_PHY_PAPD_PROBE_GAINF_S
#define AR_PHY_PAPD_PROBE
#define AR_PHY_PAPD_PROBE_NEXT_TX
#define PHY_PROBE_CCK_CORRECTION
#define ar5212GetRfBank(ah, b)
#define IS_RADX112_REV2(ah)
#define IS_RAD5112_ANY(ah)
static int32_t ar5212AdjustGain(struct ath_hal *ah, GAIN_VALUES *gv)
HAL_RFGAIN ar5212GetRfgain(struct ath_hal *ah)
void ar5212InitializeGainValues(struct ath_hal *ah)
static HAL_BOOL ar5212InvalidGainReadback(struct ath_hal *ah, GAIN_VALUES *gv)
static uint32_t ar5212GetRfField(uint32_t *rfBuf, uint32_t numBits, uint32_t firstBit, uint32_t column)
static HAL_BOOL ar5212IsGainAdjustNeeded(struct ath_hal *ah, const GAIN_VALUES *gv)
static const GAIN_OPTIMIZATION_LADDER gainLadder5112
void ar5212RequestRfgain(struct ath_hal *ah)
static const GAIN_OPTIMIZATION_LADDER gainLadder
static uint32_t ar5212GetGainFCorrection(struct ath_hal *ah)
#define AR_PHY_PAPD_PROBE_TYPE_CCK
#define AR_PHY_CHIP_ID_REV_2
#define AR_PHY_PAPD_PROBE_TYPE
GAIN_OPTIMIZATION_STEP optStep[10]
uint32_t numStepsInLadder
const GAIN_OPTIMIZATION_STEP * currStep
uint16_t ee_cckOfdmGainDelta
GAIN_VALUES ah_gainValues
int16_t ah_txPowerIndexOffset
enum ath_hal_5212::@22 ah_bIQCalibration
HAL_RFGAIN ah_rfgainState