/* * Copyright (C) 2010 Bruno Randolf <br1@einfach.org> * * 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.
*/ #ifndef ANI_H #define ANI_H
#include"../ath.h"
enum ath5k_phy_error_code;
/* these thresholds are relative to the ATH5K_ANI_LISTEN_PERIOD */ #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
/* maximum available levels */ #define ATH5K_ANI_MAX_FIRSTEP_LVL 2 #define ATH5K_ANI_MAX_NOISE_IMM_LVL 1
/** * enum ath5k_ani_mode - mode for ANI / noise sensitivity * * @ATH5K_ANI_MODE_OFF: Turn ANI off. This can be useful to just stop the ANI * algorithm after it has been on auto mode. * @ATH5K_ANI_MODE_MANUAL_LOW: Manually set all immunity parameters to low, * maximizing sensitivity. ANI will not run. * @ATH5K_ANI_MODE_MANUAL_HIGH: Manually set all immunity parameters to high, * minimizing sensitivity. ANI will not run. * @ATH5K_ANI_MODE_AUTO: Automatically control immunity parameters based on the * amount of OFDM and CCK frame errors (default).
*/ 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
};
/** * struct ath5k_ani_state - ANI state and associated counters * @ani_mode: One of enum ath5k_ani_mode * @noise_imm_level: Noise immunity level * @spur_level: Spur immunity level * @firstep_level: FIRstep level * @ofdm_weak_sig: OFDM weak signal detection state (on/off) * @cck_weak_sig: CCK weak signal detection state (on/off) * @max_spur_level: Max spur immunity level (chip specific) * @listen_time: Listen time * @ofdm_errors: OFDM timing error count * @cck_errors: CCK timing error count * @last_cc: The &struct ath_cycle_counters (for stats) * @last_listen: Listen time from previous run (for stats) * @last_ofdm_errors: OFDM timing error count from previous run (for tats) * @last_cck_errors: CCK timing error count from previous run (for stats) * @sum_ofdm_errors: Sum of OFDM timing errors (for stats) * @sum_cck_errors: Sum of all CCK timing errors (for stats)
*/ struct ath5k_ani_state { enum ath5k_ani_mode ani_mode;
/* state */ int noise_imm_level; int spur_level; int firstep_level; bool ofdm_weak_sig; bool cck_weak_sig;
int max_spur_level;
/* used by the algorithm */ unsignedint listen_time; unsignedint ofdm_errors; unsignedint cck_errors;
/* debug/statistics only: numbers from last ANI calibration */ struct ath_cycle_counters last_cc; unsignedint last_listen; unsignedint last_ofdm_errors; unsignedint last_cck_errors; unsignedint sum_ofdm_errors; unsignedint sum_cck_errors;
};
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.