/* * Copyright (c) 2004-2008 Reyk Floeter <reyk@openbsd.org> * Copyright (c) 2006-2008 Nick Kossifidis <mickflemm@gmail.com> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
*/
/* * Common ar5xxx EEPROM data offsets (set these on AR5K_EEPROM_BASE)
*/ #define AR5K_EEPROM_PCIE_OFFSET 0x02 /* Contains offset to PCI-E infos */ #define AR5K_EEPROM_PCIE_SERDES_SECTION 0x40 /* PCIE_OFFSET points here when
* SERDES infos are present */ #define AR5K_EEPROM_MAGIC 0x003d /* EEPROM Magic number */ #define AR5K_EEPROM_MAGIC_VALUE 0x5aa5 /* Default - found on EEPROM */
#define AR5K_EEPROM_IS_HB63 0x000b /* Talon detect */
/* Per channel calibration data, used for power table setup */ struct ath5k_chan_pcal_info_rf5111 { /* Power levels in half dBm units
* for one power curve. */
u8 pwr[AR5K_EEPROM_N_PWR_POINTS_5111]; /* PCDAC table steps
* for the above values */
u8 pcdac[AR5K_EEPROM_N_PWR_POINTS_5111]; /* Starting PCDAC step */
u8 pcdac_min; /* Final PCDAC step */
u8 pcdac_max;
};
struct ath5k_chan_pcal_info_rf5112 { /* Power levels in quarter dBm units * for lower (0) and higher (3)
* level curves in 0.25dB units */
s8 pwr_x0[AR5K_EEPROM_N_XPD0_POINTS];
s8 pwr_x3[AR5K_EEPROM_N_XPD3_POINTS]; /* PCDAC table steps
* for the above values */
u8 pcdac_x0[AR5K_EEPROM_N_XPD0_POINTS];
u8 pcdac_x3[AR5K_EEPROM_N_XPD3_POINTS];
};
struct ath5k_chan_pcal_info_rf2413 { /* Starting pwr/pddac values */
s8 pwr_i[AR5K_EEPROM_N_PD_GAINS];
u8 pddac_i[AR5K_EEPROM_N_PD_GAINS]; /* (pwr,pddac) points
* power levels in 0.5dB units */
s8 pwr[AR5K_EEPROM_N_PD_GAINS]
[AR5K_EEPROM_N_PD_POINTS];
u8 pddac[AR5K_EEPROM_N_PD_GAINS]
[AR5K_EEPROM_N_PD_POINTS];
};
struct ath5k_pdgain_info {
u8 pd_points;
u8 *pd_step; /* Power values are in
* 0.25dB units */
s16 *pd_pwr;
};
struct ath5k_chan_pcal_info { /* Frequency */
u16 freq; /* Tx power boundaries */
s16 max_pwr;
s16 min_pwr; union { struct ath5k_chan_pcal_info_rf5111 rf5111_info; struct ath5k_chan_pcal_info_rf5112 rf5112_info; struct ath5k_chan_pcal_info_rf2413 rf2413_info;
}; /* Raw values used by phy code * Curves are stored in order from lower
* gain to higher gain (max txpower -> min txpower) */ struct ath5k_pdgain_info *pd_curves;
};
/* Per rate calibration data for each mode, * used for rate power table setup.
* Note: Values in 0.5dB units */ struct ath5k_rate_pcal_info {
u16 freq; /* Frequency */ /* Power level for 6-24Mbit/s rates or
* 1Mb rate */
u16 target_power_6to24; /* Power level for 36Mbit rate or
* 2Mb rate */
u16 target_power_36; /* Power level for 48Mbit rate or
* 5.5Mbit rate */
u16 target_power_48; /* Power level for 54Mbit rate or
* 11Mbit rate */
u16 target_power_54;
};
/* Power edges for conformance test limits */ struct ath5k_edge_power {
u16 freq;
u16 edge; /* in half dBm */ bool flag;
};
/** * struct ath5k_eeprom_info - EEPROM calibration data * * @ee_regdomain: ath/regd.c takes care of COUNTRY_ERD and WORLDWIDE_ROAMING * flags * @ee_ant_gain: Antenna gain in 0.5dB steps signed [5211 only?] * @ee_cck_ofdm_gain_delta: difference in gainF to output the same power for * OFDM and CCK packets * @ee_cck_ofdm_power_delta: power difference between OFDM (6Mbps) and CCK * (11Mbps) rate in G mode. 0.1dB steps * @ee_scaled_cck_delta: for Japan Channel 14: 0.1dB resolution * * @ee_i_cal: Initial I coefficient to correct I/Q mismatch in the receive path * @ee_q_cal: Initial Q coefficient to correct I/Q mismatch in the receive path * @ee_fixed_bias: use ee_ob and ee_db settings or use automatic control * @ee_switch_settling: RX/TX Switch settling time * @ee_atn_tx_rx: Difference in attenuation between TX and RX in 1dB steps * @ee_ant_control: Antenna Control Settings * @ee_ob: Bias current for Output stage of PA * B/G mode: Index [0] is used for AR2112/5112, otherwise [1] * A mode: [0] 5.15-5.25 [1] 5.25-5.50 [2] 5.50-5.70 [3] 5.70-5.85 GHz * @ee_db: Bias current for Output stage of PA. see @ee_ob * @ee_tx_end2xlna_enable: Time difference from when BB finishes sending a frame * to when the external LNA is activated * @ee_tx_end2xpa_disable: Time difference from when BB finishes sending a frame * to when the external PA switch is deactivated * @ee_tx_frm2xpa_enable: Time difference from when MAC sends frame to when * external PA switch is activated * @ee_thr_62: Clear Channel Assessment (CCA) sensitivity * (IEEE802.11a section 17.3.10.5 ) * @ee_xlna_gain: Total gain of the LNA (information only) * @ee_xpd: Use external (1) or internal power detector * @ee_x_gain: Gain for external power detector output (differences in EEMAP * versions!) * @ee_i_gain: Initial gain value after reset * @ee_margin_tx_rx: Margin in dB when final attenuation stage should be used * * @ee_false_detect: Backoff in Sensitivity (dB) on channels with spur signals * @ee_noise_floor_thr: Noise floor threshold in 1dB steps * @ee_adc_desired_size: Desired amplitude for ADC, used by AGC; in 0.5 dB steps * @ee_pga_desired_size: Desired output of PGA (for BB gain) in 0.5 dB steps * @ee_pd_gain_overlap: PD ADC curves need to overlap in 0.5dB steps (ee_map>=2)
*/ struct ath5k_eeprom_info {
/* Power calibration data */
u16 ee_false_detect[AR5K_EEPROM_N_MODES];
/* Number of pd gain curves per mode */
u8 ee_pd_gains[AR5K_EEPROM_N_MODES]; /* Back mapping pdcurve number -> pdcurve index in pd->pd_curves */
u8 ee_pdc_to_idx[AR5K_EEPROM_N_MODES][AR5K_EEPROM_N_PD_GAINS];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.