Linux Kernel
3.7.1
|
#include "../ath.h"
Go to the source code of this file.
Data Structures | |
struct | ath5k_ani_state |
Macros | |
#define | ATH5K_ANI_LISTEN_PERIOD 100 |
#define | ATH5K_ANI_OFDM_TRIG_HIGH 500 |
#define | ATH5K_ANI_OFDM_TRIG_LOW 200 |
#define | ATH5K_ANI_CCK_TRIG_HIGH 200 |
#define | ATH5K_ANI_CCK_TRIG_LOW 100 |
#define | ATH5K_ANI_RSSI_THR_HIGH 40 |
#define | ATH5K_ANI_RSSI_THR_LOW 7 |
#define | ATH5K_ANI_MAX_FIRSTEP_LVL 2 |
#define | ATH5K_ANI_MAX_NOISE_IMM_LVL 1 |
Enumerations | |
enum | ath5k_ani_mode { ATH5K_ANI_MODE_OFF = 0, ATH5K_ANI_MODE_MANUAL_LOW = 1, ATH5K_ANI_MODE_MANUAL_HIGH = 2, ATH5K_ANI_MODE_AUTO = 3 } |
enum ath5k_ani_mode |
enum ath5k_ani_mode - mode for ANI / noise sensitivity
: Turn ANI off. This can be useful to just stop the ANI algorithm after it has been on auto mode. : Manually set all immunity parameters to low, maximizing sensitivity. ANI will not run. : Manually set all immunity parameters to high, minimizing sensitivity. ANI will not run. : Automatically control immunity parameters based on the amount of OFDM and CCK frame errors (default).
ath5k_ani_calibration() - The main ANI calibration function : The &struct ath5k_hw
We count OFDM and CCK errors relative to the time where we did not send or receive ("listen" time) and raise or lower immunity accordingly. This is called regularly (every second) from the calibration timer, but also when an error threshold has been reached.
In order to synchronize access from different contexts, this should be called only indirectly by scheduling the ANI tasklet!
void ath5k_ani_init | ( | struct ath5k_hw * | ah, |
enum ath5k_ani_mode | mode | ||
) |
ath5k_ani_init() - Initialize ANI : The &struct ath5k_hw : One of enum ath5k_ani_mode
Initialize ANI according to mode.
ath5k_ani_mib_intr() - Interrupt handler for ANI MIB counters : The &struct ath5k_hw
Just read & reset the registers quickly, so they don't generate more interrupts, save the counters and schedule the tasklet to decide whether to raise immunity or not.
We just need to handle PHY error counters, ath5k_hw_update_mib_counters() should take care of all "normal" MIB interrupts.
void ath5k_ani_phy_error_report | ( | struct ath5k_hw * | ah, |
enum ath5k_phy_error_code | phyerr | ||
) |
ath5k_ani_set_cck_weak_signal_detection() - Set CCK weak signal detection : The &struct ath5k_hw : turn on or off
ath5k_ani_set_firstep_level() - Set "firstep" level : The &struct ath5k_hw : level between 0 and
DOC: Basic ANI Operation
Adaptive Noise Immunity (ANI) controls five noise immunity parameters depending on the amount of interference in the environment, increasing or reducing sensitivity as necessary.
The parameters are:
Basically we look at the amount of ODFM and CCK timing errors we get and then raise or lower immunity accordingly by setting one or more of these parameters.
Newer chipsets have PHY error counters in hardware which will generate a MIB interrupt when they overflow. Older hardware has too enable PHY error frames by setting a RX flag and then count every single PHY error. When a specified threshold of errors has been reached we will raise immunity. Also we regularly check the amount of errors and lower or raise immunity as necessary. ath5k_ani_set_noise_immunity_level() - Set noise immunity level : The &struct ath5k_hw : level between 0 and
ath5k_ani_set_ofdm_weak_signal_detection() - Set OFDM weak signal detection : The &struct ath5k_hw : turn on or off