Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2111ac0d authored by Bruno Randolf's avatar Bruno Randolf Committed by John W. Linville
Browse files

ath5k: Adaptive Noise Immunity (ANI) Implementation



This is an Adaptive Noise Imunity (ANI) implementation for ath5k. I have looked
at both ath9k and HAL sources (they are nearly the same), and even though i
have implemented some things differently, the basic algorithm is practically
the same, for now. I hope that this can serve as a clean start to improve the
algorithm later.

This also adds a possibility to manually control ANI settings, right now only
thru a debugfs file:
  * set lowest sensitivity (=highest noise immunity):
	echo sens-low > /sys/kernel/debug/ath5k/phy0/ani
  * set highest sensitivity (=lowest noise immunity):
	echo sens-high > /sys/kernel/debug/ath5k/phy0/ani
  * automatically control immunity (default):
	echo ani-on > /sys/kernel/debug/ath5k/phy0/ani
  * to see the parameters in use and watch them change:
	cat /sys/kernel/debug/ath5k/phy0/ani

Manually setting sensitivity will turn the automatic control off. You can also
control each of the five immunity parameters (noise immunity, spur immunity,
firstep, ofdm weak signal detection, cck weak signal detection) manually thru
the debugfs file.

This is tested on AR5414 and nearly doubles the thruput in a noisy 2GHz band.

Signed-off-by: default avatarBruno Randolf <br1@einfach.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent bc53e512
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,5 +12,6 @@ ath5k-y += attach.o
ath5k-y				+= base.o
ath5k-y				+= led.o
ath5k-y				+= rfkill.o
ath5k-y				+= ani.o
ath5k-$(CONFIG_ATH5K_DEBUG)	+= debug.o
obj-$(CONFIG_ATH5K)		+= ath5k.o
+744 −0

File added.

Preview size limit exceeded, changes collapsed.

+104 −0

File added.

Preview size limit exceeded, changes collapsed.

+6 −3

File changed.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
	ah->ah_software_retry = false;
	ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT;
	ah->ah_noise_floor = -95;	/* until first NF calibration is run */
	sc->ani_state.ani_mode = ATH5K_ANI_MODE_AUTO;

	/*
	 * Find the mac version
Loading