diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2010-06-12 00:33:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-14 15:39:29 -0400 |
commit | e36b27aff1b10c81c53990b28da4ab6ab0ed0761 (patch) | |
tree | fa2642ea274398ccaac4b9e03efecc766030409b /drivers/net/wireless/ath/ath9k/hw.h | |
parent | 40346b66799b7d382e61bbb68a6b6bbdd20f320e (diff) |
ath9k: add new ANI implementation for AR9003
This adds support for ANI for AR9003. The implementation for
ANI for AR9003 is slightly different than the one used for
the older chipset families. It can technically be used for
the older families as well but this is not yet fully tested
so we only enable the new ANI for the AR5008, AR9001 and AR9002
families with a module parameter, force_new_ani.
The old ANI implementation is left intact.
Details of the new ANI implemention:
* ANI adjustment logic is now table driven so that each ANI level
setting is parameterized. This makes adjustments much more
deterministic than the old procedure based logic and allows
adjustments to be made incrementally to several parameters per
level.
* ANI register settings are now relative to INI values; so ANI
param zero level == INI value. Appropriate floor and ceiling
values are obeyed when adjustments are combined with INI values.
* ANI processing is done once per second rather that every 100ms.
The poll interval is now a set upon hardware initialization and
can be picked up by the core driver.
* OFDM error and CCK error processing are made in a round robin
fashion rather than allowing all OFDM adjustments to be made
before CCK adjustments.
* ANI adjusts MRC CCK off in the presence of high CCK errors
* When adjusting spur immunity (SI) and OFDM weak signal detection,
ANI now sets register values for the extension channel too
* When adjusting FIR step (ST), ANI now sets register for FIR step
low too
* FIR step adjustments now allow for an extra level of immunity for
extremely noisy environments
* The old Noise immunity setting (NI), which changes coarse low, size
desired, etc have been removed. Changing these settings could affect
up RIFS RX as well.
* CCK weak signal adjustment is no longer used
* ANI no longer enables phy error interrupts; in all cases phy hw
counting registers are used instead
* The phy error count (overflow) interrupts are also no longer used
for ANI adjustments. All ANI adjustments are made via the polling
routine and no adjustments are possible in the ISR context anymore
* A history settings buffer is now correctly used for each channel;
channel settings are initialized with the defaults but later
changes are restored when returning back to that channel
* When scanning, ANI is disabled settings are returned to (INI) defaults.
* OFDM phy error thresholds are now 400 & 1000 (errors/second units) for
low/high water marks, providing increased stability/hysteresis when
changing levels.
* Similarly CCK phy error thresholds are now 300 & 600 (errors/second)
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.h')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 790a4572270f..009f0fafee5d 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -266,6 +266,7 @@ struct ath9k_ops_config { | |||
266 | int spurmode; | 266 | int spurmode; |
267 | u16 spurchans[AR_EEPROM_MODAL_SPURS][2]; | 267 | u16 spurchans[AR_EEPROM_MODAL_SPURS][2]; |
268 | u8 max_txtrig_level; | 268 | u8 max_txtrig_level; |
269 | u16 ani_poll_interval; /* ANI poll interval in ms */ | ||
269 | }; | 270 | }; |
270 | 271 | ||
271 | enum ath9k_int { | 272 | enum ath9k_int { |
@@ -520,6 +521,8 @@ struct ath_gen_timer_table { | |||
520 | * few dB more of noise immunity. If you have a strong time-varying | 521 | * few dB more of noise immunity. If you have a strong time-varying |
521 | * interference that is causing false detections (OFDM timing errors or | 522 | * interference that is causing false detections (OFDM timing errors or |
522 | * CCK timing errors) the level can be increased. | 523 | * CCK timing errors) the level can be increased. |
524 | * @ani_cache_ini_regs: cache the values for ANI from the initial | ||
525 | * register settings through the register initialization. | ||
523 | */ | 526 | */ |
524 | struct ath_hw_private_ops { | 527 | struct ath_hw_private_ops { |
525 | /* Calibration ops */ | 528 | /* Calibration ops */ |
@@ -567,6 +570,7 @@ struct ath_hw_private_ops { | |||
567 | /* ANI */ | 570 | /* ANI */ |
568 | void (*ani_reset)(struct ath_hw *ah, bool is_scanning); | 571 | void (*ani_reset)(struct ath_hw *ah, bool is_scanning); |
569 | void (*ani_lower_immunity)(struct ath_hw *ah); | 572 | void (*ani_lower_immunity)(struct ath_hw *ah); |
573 | void (*ani_cache_ini_regs)(struct ath_hw *ah); | ||
570 | }; | 574 | }; |
571 | 575 | ||
572 | /** | 576 | /** |
@@ -959,9 +963,12 @@ void ar9003_hw_attach_ops(struct ath_hw *ah); | |||
959 | * ANI work can be shared between all families but a next | 963 | * ANI work can be shared between all families but a next |
960 | * generation implementation of ANI will be used only for AR9003 only | 964 | * generation implementation of ANI will be used only for AR9003 only |
961 | * for now as the other families still need to be tested with the same | 965 | * for now as the other families still need to be tested with the same |
962 | * next generation ANI. | 966 | * next generation ANI. Feel free to start testing it though for the |
967 | * older families (AR5008, AR9001, AR9002) by using modparam_force_new_ani. | ||
963 | */ | 968 | */ |
969 | extern int modparam_force_new_ani; | ||
964 | void ath9k_hw_attach_ani_ops_old(struct ath_hw *ah); | 970 | void ath9k_hw_attach_ani_ops_old(struct ath_hw *ah); |
971 | void ath9k_hw_attach_ani_ops_new(struct ath_hw *ah); | ||
965 | 972 | ||
966 | #define ATH_PCIE_CAP_LINK_CTRL 0x70 | 973 | #define ATH_PCIE_CAP_LINK_CTRL 0x70 |
967 | #define ATH_PCIE_CAP_LINK_L0S 1 | 974 | #define ATH_PCIE_CAP_LINK_L0S 1 |