FreeBSD kernel ATH device code
ar5416_spectral.c File Reference
#include "opt_ah.h"
#include "ah.h"
#include "ah_internal.h"
#include "ah_devid.h"
#include "ah_desc.h"
#include "ar5416/ar5416.h"
#include "ar5416/ar5416reg.h"
#include "ar5416/ar5416phy.h"
Include dependency graph for ar5416_spectral.c:

Go to the source code of this file.

Macros

#define AR5416_SPECTRAL_SCAN_ENA   0
 
#define AR5416_SPECTRAL_SCAN_ACTIVE   0
 
#define AR5416_SPECTRAL_SCAN_FFT_PERIOD   8
 
#define AR5416_SPECTRAL_SCAN_PERIOD   1
 
#define AR5416_SPECTRAL_SCAN_COUNT   16
 
#define AR5416_SPECTRAL_SCAN_SHORT_REPEAT   1
 
#define MAX_RADAR_RSSI_THRESH   0x3f
 
#define MAX_RADAR_HEIGHT   0x3f
 
#define ENABLE_ALL_PHYERR   0xffffffff
 

Functions

static void ar5416DisableRadar (struct ath_hal *ah)
 
static void ar5416PrepSpectralScan (struct ath_hal *ah)
 
void ar5416ConfigureSpectralScan (struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
 
void ar5416GetSpectralParams (struct ath_hal *ah, HAL_SPECTRAL_PARAM *ss)
 
HAL_BOOL ar5416IsSpectralActive (struct ath_hal *ah)
 
HAL_BOOL ar5416IsSpectralEnabled (struct ath_hal *ah)
 
void ar5416StartSpectralScan (struct ath_hal *ah)
 
void ar5416StopSpectralScan (struct ath_hal *ah)
 
uint32_t ar5416GetSpectralConfig (struct ath_hal *ah)
 
void ar5416RestoreSpectralConfig (struct ath_hal *ah, uint32_t restoreval)
 

Macro Definition Documentation

◆ AR5416_SPECTRAL_SCAN_ACTIVE

#define AR5416_SPECTRAL_SCAN_ACTIVE   0

Definition at line 35 of file ar5416_spectral.c.

◆ AR5416_SPECTRAL_SCAN_COUNT

#define AR5416_SPECTRAL_SCAN_COUNT   16

Definition at line 38 of file ar5416_spectral.c.

◆ AR5416_SPECTRAL_SCAN_ENA

#define AR5416_SPECTRAL_SCAN_ENA   0

Definition at line 34 of file ar5416_spectral.c.

◆ AR5416_SPECTRAL_SCAN_FFT_PERIOD

#define AR5416_SPECTRAL_SCAN_FFT_PERIOD   8

Definition at line 36 of file ar5416_spectral.c.

◆ AR5416_SPECTRAL_SCAN_PERIOD

#define AR5416_SPECTRAL_SCAN_PERIOD   1

Definition at line 37 of file ar5416_spectral.c.

◆ AR5416_SPECTRAL_SCAN_SHORT_REPEAT

#define AR5416_SPECTRAL_SCAN_SHORT_REPEAT   1

Definition at line 39 of file ar5416_spectral.c.

◆ ENABLE_ALL_PHYERR

#define ENABLE_ALL_PHYERR   0xffffffff

Definition at line 44 of file ar5416_spectral.c.

◆ MAX_RADAR_HEIGHT

#define MAX_RADAR_HEIGHT   0x3f

Definition at line 43 of file ar5416_spectral.c.

◆ MAX_RADAR_RSSI_THRESH

#define MAX_RADAR_RSSI_THRESH   0x3f

Definition at line 42 of file ar5416_spectral.c.

Function Documentation

◆ ar5416ConfigureSpectralScan()

◆ ar5416DisableRadar()

static void ar5416DisableRadar ( struct ath_hal ah)
static

◆ ar5416GetSpectralConfig()

uint32_t ar5416GetSpectralConfig ( struct ath_hal ah)

Definition at line 223 of file ar5416_spectral.c.

References AR_PHY_SPECTRAL_SCAN, and OS_REG_READ.

◆ ar5416GetSpectralParams()

◆ ar5416IsSpectralActive()

HAL_BOOL ar5416IsSpectralActive ( struct ath_hal ah)

Definition at line 173 of file ar5416_spectral.c.

References AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ACTIVE, MS, and OS_REG_READ.

Referenced by ar5416InitState().

Here is the caller graph for this function:

◆ ar5416IsSpectralEnabled()

HAL_BOOL ar5416IsSpectralEnabled ( struct ath_hal ah)

Definition at line 182 of file ar5416_spectral.c.

References AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ENA, MS, and OS_REG_READ.

Referenced by ar5416InitState().

Here is the caller graph for this function:

◆ ar5416PrepSpectralScan()

static void ar5416PrepSpectralScan ( struct ath_hal ah)
static

Definition at line 78 of file ar5416_spectral.c.

References ar5416DisableRadar(), AR_PHY_ERR, ENABLE_ALL_PHYERR, and OS_REG_WRITE.

Referenced by ar5416ConfigureSpectralScan(), ar5416RestoreSpectralConfig(), and ar5416StartSpectralScan().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416RestoreSpectralConfig()

void ar5416RestoreSpectralConfig ( struct ath_hal ah,
uint32_t  restoreval 
)

Definition at line 232 of file ar5416_spectral.c.

References ar5416PrepSpectralScan(), AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_SHORT_REPEAT, OS_REG_READ, and OS_REG_WRITE.

Here is the call graph for this function:

◆ ar5416StartSpectralScan()

void ar5416StartSpectralScan ( struct ath_hal ah)

Definition at line 191 of file ar5416_spectral.c.

References ar5416PrepSpectralScan(), AR_PHY_ERR_MASK_REG, AR_PHY_ERR_RADAR, AR_PHY_SPECTRAL_SCAN, AR_PHY_SPECTRAL_SCAN_ACTIVE, AR_PHY_SPECTRAL_SCAN_ENA, OS_REG_READ, and OS_REG_WRITE.

Referenced by ar5416InitState().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ar5416StopSpectralScan()

void ar5416StopSpectralScan ( struct ath_hal ah)

Definition at line 208 of file ar5416_spectral.c.

References AR_PHY_ERR_MASK_REG, AR_PHY_SPECTRAL_SCAN, OS_REG_READ, and OS_REG_WRITE.

Referenced by ar5416InitState().

Here is the caller graph for this function: