Date: Sun, 30 Dec 2012 06:48:12 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244854 - head/sys/dev/ath/ath_hal Message-ID: <201212300648.qBU6mCGt045050@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sun Dec 30 06:48:12 2012 New Revision: 244854 URL: http://svnweb.freebsd.org/changeset/base/244854 Log: Add the initial HAL glue for the spectral analysis support. * Finish adding the HAL capability to announce whether a NIC supports spectral scan or not; * Add spectral scan methods to the HAL structure; * Add HAL_SPECTRAL_PARAM for configuration of the spectral scan logic. The capability ID and HAL_SPECTRAL_PARAM struct are from Qualcomm Atheros. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Sun Dec 30 06:46:11 2012 (r244853) +++ head/sys/dev/ath/ath_hal/ah.c Sun Dec 30 06:48:12 2012 (r244854) @@ -734,6 +734,8 @@ ath_hal_getcapability(struct ath_hal *ah return HAL_OK; case HAL_CAP_BT_COEX: return pCap->halBtCoexSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_SPECTRAL_SCAN: + return pCap->halSpectralScanSupport ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_HT20_SGI: return pCap->halHTSGI20Support ? HAL_OK : HAL_ENOTSUPP; case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */ Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sun Dec 30 06:46:11 2012 (r244853) +++ head/sys/dev/ath/ath_hal/ah.h Sun Dec 30 06:48:12 2012 (r244854) @@ -156,6 +156,7 @@ typedef enum { HAL_CAP_RXBUFSIZE = 81, /* Receive Buffer Length */ HAL_CAP_NUM_MR_RETRIES = 82, /* limit on multirate retries */ HAL_CAP_OL_PWRCTRL = 84, /* Open loop TX power control */ + HAL_CAP_SPECTRAL_SCAN = 90, /* Hardware supports spectral scan */ HAL_CAP_BB_PANIC_WATCHDOG = 92, @@ -930,6 +931,20 @@ typedef struct { #define HAL_PHYERR_PARAM_NOVAL 65535 +typedef struct { + u_int16_t ss_fft_period; /* Skip interval for FFT reports */ + u_int16_t ss_period; /* Spectral scan period */ + u_int16_t ss_count; /* # of reports to return from ss_active */ + u_int16_t ss_short_report;/* Set to report ony 1 set of FFT results */ + u_int8_t radar_bin_thresh_sel; /* strong signal radar FFT threshold configuration */ + u_int16_t ss_spectral_pri; /* are we doing a noise power cal ? */ + int8_t ss_nf_cal[AH_MAX_CHAINS*2]; /* nf calibrated values for ctl+ext from eeprom */ + int8_t ss_nf_pwr[AH_MAX_CHAINS*2]; /* nf pwr values for ctl+ext from eeprom */ + int32_t ss_nf_temp_data; /* temperature data taken during nf scan */ +} HAL_SPECTRAL_PARAM; +#define HAL_SPECTRAL_PARAM_NOVAL 0xFFFF +#define HAL_SPECTRAL_PARAM_ENABLE 0x8000 /* Enable/Disable if applicable */ + /* * DFS operating mode flags. */ @@ -1433,6 +1448,17 @@ struct ath_hal { const char *buf, HAL_DFS_EVENT *event); HAL_BOOL __ahdecl(*ah_isFastClockEnabled)(struct ath_hal *ah); + /* Spectral Scan functions */ + void __ahdecl(*ah_spectralConfigure)(struct ath_hal *ah, + HAL_SPECTRAL_PARAM *sp); + void __ahdecl(*ah_spectralGetConfig)(struct ath_hal *ah, + HAL_SPECTRAL_PARAM *sp); + void __ahdecl(*ah_spectralStart)(struct ath_hal *); + void __ahdecl(*ah_spectralStop)(struct ath_hal *); + HAL_BOOL __ahdecl(*ah_spectralIsEnabled)(struct ath_hal *); + HAL_BOOL __ahdecl(*ah_spectralIsActive)(struct ath_hal *); + /* XXX getNfPri() and getNfExt() */ + /* Key Cache Functions */ uint32_t __ahdecl(*ah_getKeyCacheSize)(struct ath_hal*); HAL_BOOL __ahdecl(*ah_resetKeyCacheEntry)(struct ath_hal*, uint16_t);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212300648.qBU6mCGt045050>