FreeBSD kernel ATH device code
ar5416_cal.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  HAL_CAL_SAMPLE
 
struct  per_cal_data
 
struct  cal_list
 
struct  ar5416PerCal
 

Macros

#define MIN_CAL_SAMPLES   1
 
#define MAX_CAL_SAMPLES   64
 
#define INIT_LOG_COUNT   5
 
#define PER_MIN_LOG_COUNT   2
 
#define PER_MAX_LOG_COUNT   10
 
#define AR5416_MAX_CHAINS   3 /* XXX dup's eeprom def */
 
#define AR5416_NUM_NF_READINGS   6 /* (3 chains * (ctl + ext) */
 
#define INIT_CAL(_perCal)
 
#define INSERT_CAL(_cal, _perCal)
 

Typedefs

typedef struct per_cal_data HAL_PERCAL_DATA
 
typedef struct cal_list HAL_CAL_LIST
 

Enumerations

enum  HAL_CAL_TYPE { ADC_DC_INIT_CAL = 0x1 , ADC_GAIN_CAL = 0x2 , ADC_DC_CAL = 0x4 , IQ_MISMATCH_CAL = 0x8 }
 
enum  HAL_CAL_STATE { CAL_INACTIVE , CAL_WAITING , CAL_RUNNING , CAL_DONE }
 

Functions

HAL_BOOL ar5416InitCalHardware (struct ath_hal *ah, const struct ieee80211_channel *chan)
 
HAL_BOOL ar5416InitCal (struct ath_hal *, const struct ieee80211_channel *)
 
HAL_BOOL ar5416PerCalibration (struct ath_hal *, struct ieee80211_channel *, HAL_BOOL *isIQdone)
 
HAL_BOOL ar5416PerCalibrationN (struct ath_hal *, struct ieee80211_channel *, u_int chainMask, HAL_BOOL longCal, HAL_BOOL *isCalDone)
 
HAL_BOOL ar5416ResetCalValid (struct ath_hal *, const struct ieee80211_channel *)
 
void ar5416IQCalCollect (struct ath_hal *ah)
 
void ar5416IQCalibration (struct ath_hal *ah, uint8_t numChains)
 
void ar5416AdcGainCalCollect (struct ath_hal *ah)
 
void ar5416AdcGainCalibration (struct ath_hal *ah, uint8_t numChains)
 
void ar5416AdcDcCalCollect (struct ath_hal *ah)
 
void ar5416AdcDcCalibration (struct ath_hal *ah, uint8_t numChains)
 
void ar5416InitNfHistBuff (struct ar5212NfCalHist *h)
 

Macro Definition Documentation

◆ AR5416_MAX_CHAINS

#define AR5416_MAX_CHAINS   3 /* XXX dup's eeprom def */

Definition at line 80 of file ar5416_cal.h.

◆ AR5416_NUM_NF_READINGS

#define AR5416_NUM_NF_READINGS   6 /* (3 chains * (ctl + ext) */

Definition at line 87 of file ar5416_cal.h.

◆ INIT_CAL

#define INIT_CAL (   _perCal)
Value:
do { \
(_perCal)->calState = CAL_WAITING; \
(_perCal)->calNext = AH_NULL; \
} while (0)
#define AH_NULL
Definition: ah_internal.h:28
@ CAL_WAITING
Definition: ar5416_cal.h:34

Definition at line 91 of file ar5416_cal.h.

◆ INIT_LOG_COUNT

#define INIT_LOG_COUNT   5

Definition at line 46 of file ar5416_cal.h.

◆ INSERT_CAL

#define INSERT_CAL (   _cal,
  _perCal 
)
Value:
do { \
if ((_cal)->cal_last == AH_NULL) { \
(_cal)->cal_list = (_cal)->cal_last = (_perCal); \
((_cal)->cal_last)->calNext = (_perCal); \
} else { \
((_cal)->cal_last)->calNext = (_perCal); \
(_cal)->cal_last = (_perCal); \
(_perCal)->calNext = (_cal)->cal_list; \
} \
} while (0)
struct cal_list * calNext
Definition: ar5416_cal.h:63

Definition at line 96 of file ar5416_cal.h.

◆ MAX_CAL_SAMPLES

#define MAX_CAL_SAMPLES   64

Definition at line 45 of file ar5416_cal.h.

◆ MIN_CAL_SAMPLES

#define MIN_CAL_SAMPLES   1

Definition at line 44 of file ar5416_cal.h.

◆ PER_MAX_LOG_COUNT

#define PER_MAX_LOG_COUNT   10

Definition at line 48 of file ar5416_cal.h.

◆ PER_MIN_LOG_COUNT

#define PER_MIN_LOG_COUNT   2

Definition at line 47 of file ar5416_cal.h.

Typedef Documentation

◆ HAL_CAL_LIST

typedef struct cal_list HAL_CAL_LIST

◆ HAL_PERCAL_DATA

typedef struct per_cal_data HAL_PERCAL_DATA

Enumeration Type Documentation

◆ HAL_CAL_STATE

Enumerator
CAL_INACTIVE 
CAL_WAITING 
CAL_RUNNING 
CAL_DONE 

Definition at line 32 of file ar5416_cal.h.

◆ HAL_CAL_TYPE

Enumerator
ADC_DC_INIT_CAL 
ADC_GAIN_CAL 
ADC_DC_CAL 
IQ_MISMATCH_CAL 

Definition at line 24 of file ar5416_cal.h.

Function Documentation

◆ ar5416AdcDcCalCollect()

◆ ar5416AdcDcCalibration()

◆ ar5416AdcGainCalCollect()

◆ ar5416AdcGainCalibration()

void ar5416AdcGainCalibration ( struct ath_hal ah,
uint8_t  numChains 
)

◆ ar5416InitCal()

◆ ar5416InitCalHardware()

HAL_BOOL ar5416InitCalHardware ( struct ath_hal ah,
const struct ieee80211_channel *  chan 
)

Definition at line 203 of file ar5416_cal.c.

References AH_FALSE, AH_TRUE, AR_PHY_ADC_CTL, AR_PHY_ADC_CTL_OFF_PWDADC, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_CAL, AR_PHY_AGC_CONTROL_FLTR_CAL, AR_SREV_MERLIN_10_OR_LATER, ath_hal_wait(), HAL_DEBUG_ANY, HALDEBUG, OS_REG_CLR_BIT, and OS_REG_SET_BIT.

Referenced by ar5416InitState().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416InitNfHistBuff()

◆ ar5416IQCalCollect()

void ar5416IQCalCollect ( struct ath_hal ah)

◆ ar5416IQCalibration()

◆ ar5416PerCalibration()

HAL_BOOL ar5416PerCalibration ( struct ath_hal ah,
struct ieee80211_channel *  chan,
HAL_BOOL isIQdone 
)

Definition at line 544 of file ar5416_cal.c.

References AH5416, AH_FALSE, AH_NULL, ath_hal_5416::ah_rx_chainmask, AH_TRUE, ar5416PerCalibrationN(), ar5416PerCal::cal_curr, cal_list::calData, per_cal_data::calType, and IQ_MISMATCH_CAL.

Referenced by ar5416InitState().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416PerCalibrationN()

HAL_BOOL ar5416PerCalibrationN ( struct ath_hal ah,
struct ieee80211_channel *  chan,
u_int  chainMask,
HAL_BOOL  longCal,
HAL_BOOL isCalDone 
)

◆ ar5416ResetCalValid()

HAL_BOOL ar5416ResetCalValid ( struct ath_hal ah,
const struct ieee80211_channel *  chan 
)