1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-15 15:06:42 +00:00

[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
This commit is contained in:
Adrian Chadd 2019-03-06 07:54:29 +00:00
parent 13ea0450a9
commit 7fbcfe69e7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344841

View File

@ -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