svn commit: r344841 - head/sys/dev/ath/ath_hal
Adrian Chadd
adrian at FreeBSD.org
Wed Mar 6 07:54:30 UTC 2019
Author: adrian
Date: Wed Mar 6 07:54:29 2019
New Revision: 344841
URL: https://svnweb.freebsd.org/changeset/base/344841
Log:
[ath_hal] [ath_hal_ar9300] ANI fixes and preparation for userland control.
* The ani function bitmap was being badly used when determining if a command
could be used. In hostap modes only a couple of the ANI control parameters
are enabled.
* The ani function bitmap was not being reset to HAL_ANI_ALL if transitioning
from AP -> STA.
* Change mrcCckOff to mrcCck - 1 == on, rather than 1 == off. This matches
the API used to set the value from userland via the diagnostic API.
* Handle OFDM/CCK noise immunity level commands in ar9300_ani_control().
These will only come from userland and it will go and program the rest of
the ANI control parameters with the values in the ANI table.
* Ensure all of the ANI parameters can be tweaked at runtime, even if they're
disabled.
Tested:
* carambola2 (AR9331), STA/AP modes
Modified:
head/sys/dev/ath/ath_hal/ah.h
Modified: head/sys/dev/ath/ath_hal/ah.h
==============================================================================
--- head/sys/dev/ath/ath_hal/ah.h Wed Mar 6 06:39:42 2019 (r344840)
+++ head/sys/dev/ath/ath_hal/ah.h Wed Mar 6 07:54:29 2019 (r344841)
@@ -893,13 +893,13 @@ typedef struct {
} HAL_ANI_STATS;
typedef struct {
- uint8_t noiseImmunityLevel; /* OFDM */
- uint8_t cckNoiseImmunityLevel;
+ uint8_t noiseImmunityLevel; /* Global for pre-AR9380; OFDM later*/
+ uint8_t cckNoiseImmunityLevel; /* AR9380: CCK specific NI */
uint8_t spurImmunityLevel;
uint8_t firstepLevel;
uint8_t ofdmWeakSigDetectOff;
uint8_t cckWeakSigThreshold;
- uint8_t mrcCckOff;
+ uint8_t mrcCck; /* MRC CCK is enabled */
uint32_t listenTime;
/* NB: intentionally ordered so data exported to user space is first */
@@ -958,7 +958,7 @@ typedef struct {
*/
typedef enum {
HAL_ANI_PRESENT = 0, /* is ANI support present */
- HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level */
+ HAL_ANI_NOISE_IMMUNITY_LEVEL = 1, /* set level (global or ofdm) */
HAL_ANI_OFDM_WEAK_SIGNAL_DETECTION = 2, /* enable/disable */
HAL_ANI_CCK_WEAK_SIGNAL_THR = 3, /* enable/disable */
HAL_ANI_FIRSTEP_LEVEL = 4, /* set level */
@@ -966,6 +966,7 @@ typedef enum {
HAL_ANI_MODE = 6, /* 0 => manual, 1 => auto (XXX do not change) */
HAL_ANI_PHYERR_RESET = 7, /* reset phy error stats */
HAL_ANI_MRC_CCK = 8,
+ HAL_ANI_CCK_NOISE_IMMUNITY_LEVEL = 9, /* set level (cck) */
} HAL_ANI_CMD;
#define HAL_ANI_ALL 0xffffffff
More information about the svn-src-all
mailing list