/* * Copyright (c) 2008-2011 Atheros Communications Inc. * * Permission to use, copy, modify, and/or 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.
*/
/* * WoW device capabilities * @ATH9K_HW_WOW_DEVICE_CAPABLE: device revision is capable of WoW. * @ATH9K_HW_WOW_PATTERN_MATCH_EXACT: device is capable of matching * an exact user defined pattern or de-authentication/disassoc pattern. * @ATH9K_HW_WOW_PATTERN_MATCH_DWORD: device requires the first four * bytes of the pattern for user defined pattern, de-authentication and * disassociation patterns for all types of possible frames received * of those types.
*/
struct ath_hw_antcomb_conf {
u8 main_lna_conf;
u8 alt_lna_conf;
u8 fast_div_bias;
u8 main_gaintb;
u8 alt_gaintb; int lna1_lna2_delta; int lna1_lna2_switch_delta;
u8 div_group;
};
/** * struct ath_hw_radar_conf - radar detection initialization parameters * * @pulse_inband: threshold for checking the ratio of in-band power * to total power for short radar pulses (half dB steps) * @pulse_inband_step: threshold for checking an in-band power to total * power ratio increase for short radar pulses (half dB steps) * @pulse_height: threshold for detecting the beginning of a short * radar pulse (dB step) * @pulse_rssi: threshold for detecting if a short radar pulse is * gone (dB step) * @pulse_maxlen: maximum pulse length (0.8 us steps) * * @radar_rssi: RSSI threshold for starting long radar detection (dB steps) * @radar_inband: threshold for checking the ratio of in-band power * to total power for long radar pulses (half dB steps) * @fir_power: threshold for detecting the end of a long radar pulse (dB) * * @ext_channel: enable extension channel radar detection
*/ struct ath_hw_radar_conf { unsignedint pulse_inband; unsignedint pulse_inband_step; unsignedint pulse_height; unsignedint pulse_rssi; unsignedint pulse_maxlen;
unsignedint radar_rssi; unsignedint radar_inband; int fir_power;
bool ext_channel;
};
/** * struct ath_hw_private_ops - callbacks used internally by hardware code * * This structure contains private callbacks designed to only be used internally * by the hardware core. * * @init_cal_settings: setup types of calibrations supported * @init_cal: starts actual calibration * * @init_mode_gain_regs: Initialize TX/RX gain registers * * @rf_set_freq: change frequency * @spur_mitigate_freq: spur mitigation * @set_rf_regs: * @compute_pll_control: compute the PLL control value to use for * AR_RTC_PLL_CONTROL for a given channel * @setup_calibration: set up calibration * @iscal_supported: used to query if a type of calibration is supported * * @ani_cache_ini_regs: cache the values for ANI from the initial * register settings through the register initialization.
*/ struct ath_hw_private_ops { void (*init_hang_checks)(struct ath_hw *ah); bool (*detect_mac_hang)(struct ath_hw *ah); bool (*detect_bb_hang)(struct ath_hw *ah);
/** * struct ath_spec_scan - parameters for Atheros spectral scan * * @enabled: enable/disable spectral scan * @short_repeat: controls whether the chip is in spectral scan mode * for 4 usec (enabled) or 204 usec (disabled) * @count: number of scan results requested. There are special meanings * in some chip revisions: * AR92xx: highest bit set (>=128) for endless mode * (spectral scan won't stopped until explicitly disabled) * AR9300 and newer: 0 for endless mode * @endless: true if endless mode is intended. Otherwise, count value is * corrected to the next possible value. * @period: time duration between successive spectral scan entry points * (period*256*Tclk). Tclk = ath_common->clockrate * @fft_period: PHY passes FFT frames to MAC every (fft_period+1)*4uS * * Note: Tclk = 40MHz or 44MHz depending upon operating mode. * Typically it's 44MHz in 2/5GHz on later chips, but there's * a "fast clock" check for this in 5GHz. *
*/ struct ath_spec_scan { bool enabled; bool short_repeat; bool endless;
u8 count;
u8 period;
u8 fft_period;
};
/** * struct ath_hw_ops - callbacks used by hardware code and driver code * * This structure contains callbacks designed to be used internally by * hardware code and also by the lower level driver. * * @config_pci_powersave: * @calibrate: periodic calibration for NF, ANI, IQ, ADC gain, ADC-DC * * @spectral_scan_config: set parameters for spectral scan and enable/disable it * @spectral_scan_trigger: trigger a spectral scan run * @spectral_scan_wait: wait for a spectral scan run to finish
*/ struct ath_hw_ops { void (*config_pci_powersave)(struct ath_hw *ah, bool power_off); void (*rx_enable)(struct ath_hw *ah); void (*set_desc_link)(void *ds, u32 link); int (*calibrate)(struct ath_hw *ah, struct ath9k_channel *chan,
u8 rxchainmask, bool longcal); bool (*get_isr)(struct ath_hw *ah, enum ath9k_int *masked,
u32 *sync_cause_p); void (*set_txdesc)(struct ath_hw *ah, void *ds, struct ath_tx_info *i); int (*proc_txdesc)(struct ath_hw *ah, void *ds, struct ath_tx_status *ts); int (*get_duration)(struct ath_hw *ah, constvoid *ds, int index); void (*antdiv_comb_conf_get)(struct ath_hw *ah, struct ath_hw_antcomb_conf *antconf); void (*antdiv_comb_conf_set)(struct ath_hw *ah, struct ath_hw_antcomb_conf *antconf); void (*spectral_scan_config)(struct ath_hw *ah, struct ath_spec_scan *param); void (*spectral_scan_trigger)(struct ath_hw *ah); void (*spectral_scan_wait)(struct ath_hw *ah);
/* ah_flags */ #define AH_USE_EEPROM 0x1 #define AH_UNPLUGGED 0x2 /* The card has been physically removed. */ #define AH_FASTCC 0x4 #define AH_NO_EEP_SWAP 0x8 /* Do not swap EEPROM data */
u32 bb_watchdog_last_status;
u32 bb_watchdog_timeout_ms; /* in ms, 0 to disable */
u8 bb_hang_rx_ofdm; /* true if bb hang due to rx_ofdm */
unsignedint paprd_target_power; unsignedint paprd_training_power; unsignedint paprd_ratemask; unsignedint paprd_ratemask_ht40; bool paprd_table_write_done;
u32 paprd_gain_table_entries[PAPRD_GAIN_TABLE_ENTRIES];
u8 paprd_gain_table_index[PAPRD_GAIN_TABLE_ENTRIES]; /* * Store the permanent value of Reg 0x4004in WARegVal * so we dont have to R/M/W. We should not be reading * this register when in sleep states.
*/
u32 WARegVal;
/* Enterprise mode cap */
u32 ent_mode;
#ifdef CONFIG_ATH9K_WOW struct ath9k_hw_wow wow; #endif bool is_clk_25mhz; int (*get_mac_revision)(void); int (*external_reset)(void); bool disable_2ghz; bool disable_5ghz;
/* * Code Specific to AR5008, AR9001 or AR9002, * we stuff these here to avoid callbacks for AR9003.
*/ int ar9002_hw_rf_claim(struct ath_hw *ah); void ar9002_hw_enable_async_fifo(struct ath_hw *ah);
/* * Code specific to AR9003, we stuff these here to avoid callbacks * for older families
*/ bool ar9003_hw_bb_watchdog_check(struct ath_hw *ah); void ar9003_hw_bb_watchdog_config(struct ath_hw *ah); void ar9003_hw_bb_watchdog_read(struct ath_hw *ah); void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah); void ar9003_hw_disable_phy_restart(struct ath_hw *ah); void ar9003_paprd_enable(struct ath_hw *ah, bool val); void ar9003_paprd_populate_single_table(struct ath_hw *ah, struct ath9k_hw_cal_data *caldata, int chain); int ar9003_paprd_create_curve(struct ath_hw *ah, struct ath9k_hw_cal_data *caldata, int chain); void ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain); int ar9003_paprd_init_table(struct ath_hw *ah); bool ar9003_paprd_is_done(struct ath_hw *ah); bool ar9003_is_paprd_enabled(struct ath_hw *ah); void ar9003_hw_set_chain_masks(struct ath_hw *ah, u8 rx, u8 tx); void ar9003_hw_init_rate_txpower(struct ath_hw *ah, u8 *rate_array, struct ath9k_channel *chan); void ar5008_hw_cmn_spur_mitigate(struct ath_hw *ah, struct ath9k_channel *chan, int bin); void ar5008_hw_init_rate_txpower(struct ath_hw *ah, int16_t *rate_array, struct ath9k_channel *chan, int ht40_delta);
/* Hardware family op attach helpers */ int ar5008_hw_attach_phy_ops(struct ath_hw *ah); void ar9002_hw_attach_phy_ops(struct ath_hw *ah); void ar9003_hw_attach_phy_ops(struct ath_hw *ah);
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.