Export the per-chain ctl/ext noise floor values, raw and uncut, to the
upper-level HAL. Right now the per-chain noise floor values aren't used anywhere in the upper-level HAL, so the driver currently has no real reference to compare the per-chain RSSI values to. This is needed before per-chain RSSI values (for ctl and ext radios) are can be thrown upstairs to the net80211 code.
This commit is contained in:
parent
8cc7d3572f
commit
f1ff114882
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=220442
@ -30,6 +30,14 @@
|
||||
|
||||
#include "ah_osdep.h"
|
||||
|
||||
/*
|
||||
* The maximum number of TX/RX chains supported.
|
||||
* This is intended to be used by various statistics gathering operations
|
||||
* (NF, RSSI, EVM).
|
||||
*/
|
||||
#define AH_MIMO_MAX_CHAINS 3
|
||||
#define AH_MIMO_MAX_EVM_PILOTS 6
|
||||
|
||||
/*
|
||||
* __ahdecl is analogous to _cdecl; it defines the calling
|
||||
* convention used within the HAL. For most systems this
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define AH_MAX(a,b) ((a)>(b)?(a):(b))
|
||||
|
||||
#include <net80211/_ieee80211.h>
|
||||
#include "opt_ah.h" /* needed for AH_SUPPORT_AR5416 */
|
||||
|
||||
#ifndef NBBY
|
||||
#define NBBY 8 /* number of bits/byte */
|
||||
@ -136,11 +137,16 @@ typedef struct {
|
||||
#define CHANNEL_IQVALID 0x01 /* IQ calibration valid */
|
||||
#define CHANNEL_ANI_INIT 0x02 /* ANI state initialized */
|
||||
#define CHANNEL_ANI_SETUP 0x04 /* ANI state setup */
|
||||
#define CHANNEL_MIMO_NF_VALID 0x04 /* Mimo NF values are valid */
|
||||
uint8_t calValid; /* bitmask of cal types */
|
||||
int8_t iCoff;
|
||||
int8_t qCoff;
|
||||
int16_t rawNoiseFloor;
|
||||
int16_t noiseFloorAdjust;
|
||||
#ifdef AH_SUPPORT_AR5416
|
||||
uint8_t noiseFloorCtl[AH_MIMO_MAX_CHAINS];
|
||||
uint8_t noiseFloorExt[AH_MIMO_MAX_CHAINS];
|
||||
#endif /* AH_SUPPORT_AR5416 */
|
||||
uint16_t mainSpur; /* cached spur value for this channel */
|
||||
} HAL_CHANNEL_INTERNAL;
|
||||
|
||||
|
@ -775,6 +775,7 @@ static int16_t
|
||||
ar5416GetNf(struct ath_hal *ah, struct ieee80211_channel *chan)
|
||||
{
|
||||
int16_t nf, nfThresh;
|
||||
int i;
|
||||
|
||||
if (ar5212IsNFCalInProgress(ah)) {
|
||||
HALDEBUG(ah, HAL_DEBUG_ANY,
|
||||
@ -806,6 +807,13 @@ ar5416GetNf(struct ath_hal *ah, struct ieee80211_channel *chan)
|
||||
} else {
|
||||
nf = 0;
|
||||
}
|
||||
/* Update MIMO channel statistics, regardless of validity or not (for now) */
|
||||
for (i = 0; i < 3; i++) {
|
||||
ichan->noiseFloorCtl[i] = nfarray[i];
|
||||
ichan->noiseFloorExt[i] = nfarray[i + 3];
|
||||
}
|
||||
ichan->privFlags |= CHANNEL_MIMO_NF_VALID;
|
||||
|
||||
ar5416UpdateNFHistBuff(AH5416(ah)->ah_cal.nfCalHist, nfarray);
|
||||
ichan->rawNoiseFloor = nf;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user