qcacmn: Enable 165 MHz Spectral scan

QCN9000 has the capability to Spectral scan in 165 MHz/
restricted 80p80 mode of operation. Host filters the FFT bins
corresponding to the additional 5 MHz and exports to the
user space via SMAP message.

CRs-Fixed: 2630960
Change-Id: I54ec36968cb0c8d5a68ff39029004b08936cb91e
This commit is contained in:
Edayilliam Jayadev
2020-03-17 19:48:28 +05:30
کامیت شده توسط nshrivas
والد 9def5df14a
کامیت 01106d6458
5فایلهای تغییر یافته به همراه236 افزوده شده و 18 حذف شده

مشاهده پرونده

@@ -86,6 +86,57 @@ enum spectral_params {
SPECTRAL_PARAM_MAX,
};
/**
* enum spectral_report_mode: Spectral report mode
* @SPECTRAL_REPORT_MODE_0: No FFT report (only spectral scan summary report)
* @SPECTRAL_REPORT_MODE_1: FFT report header + spectral scan summary report
* @SPECTRAL_REPORT_MODE_2: FFt report header + in-band bins per
* FFT (half of the number of FFT bins), where the
* FFT input is sampled at two times the channel
* bandwidth + spectral scan summary report
* @SPECTRAL_REPORT_MODE_3: FFT report header + all bins per FFT, where the FFT
* input is sampled at two times the channel bandwidth
* + spectral scan summary report
* @SPECTRAL_REPORT_MODE_MAX: Max number of report modes
*/
enum spectral_report_mode {
SPECTRAL_REPORT_MODE_0,
SPECTRAL_REPORT_MODE_1,
SPECTRAL_REPORT_MODE_2,
SPECTRAL_REPORT_MODE_3,
SPECTRAL_REPORT_MODE_MAX,
};
/**
* enum spectral_fft_size : FFT size values
* @SPECTRAL_FFT_SIZE_INVALID: Invalid FFT size
* @SPECTRAL_FFT_SIZE_1: FFT size 1
* @SPECTRAL_FFT_SIZE_2: FFT size 2
* @SPECTRAL_FFT_SIZE_3: FFT size 3
* @SPECTRAL_FFT_SIZE_4: FFT size 4
* @SPECTRAL_FFT_SIZE_5: FFT size 5
* @SPECTRAL_FFT_SIZE_6: FFT size 6
* @SPECTRAL_FFT_SIZE_7: FFT size 7
* @SPECTRAL_FFT_SIZE_8: FFT size 8
* @SPECTRAL_FFT_SIZE_9: FFT size 9
* @SPECTRAL_FFT_SIZE_10: FFT size 10
* @SPECTRAL_FFT_SIZE_MAX: Max number of FFT size
*/
enum spectral_fft_size {
SPECTRAL_FFT_SIZE_INVALID,
SPECTRAL_FFT_SIZE_1,
SPECTRAL_FFT_SIZE_2,
SPECTRAL_FFT_SIZE_3,
SPECTRAL_FFT_SIZE_4,
SPECTRAL_FFT_SIZE_5,
SPECTRAL_FFT_SIZE_6,
SPECTRAL_FFT_SIZE_7,
SPECTRAL_FFT_SIZE_8,
SPECTRAL_FFT_SIZE_9,
SPECTRAL_FFT_SIZE_10,
SPECTRAL_FFT_SIZE_MAX,
};
/**
* enum spectral_scan_mode - Spectral scan mode
* @SPECTRAL_SCAN_MODE_NORMAL: Normal mode
@@ -257,6 +308,7 @@ struct spectral_caps {
#define MAX_NUM_BINS (1024)
#define MAX_NUM_BINS_PRI80 (1024)
#define MAX_NUM_BINS_SEC80 (520)
#define MAX_NUM_BINS_5MHZ (32)
/* 5 categories x (lower + upper) bands */
#define MAX_INTERF 10
@@ -384,6 +436,10 @@ struct spectral_classifier_params {
* via direct DMA framework.
* @target_reset_count: Indicates the number of times target went through
* reset routine after spectral was enabled.
* @bin_pwr_count_5mhz: Indicates the number of FFT bins in the extra
* 5 MHz for 165 MHz/ Restricted 80p80 mode
* @bin_pwr_5mhz: Contains FFT magnitudes corresponding to the extra
* 5 MHz in 165 MHz/ Restricted 80p80 mode
*/
struct spectral_samp_data {
int16_t spectral_data_len;
@@ -450,6 +506,8 @@ struct spectral_samp_data {
uint32_t reset_delay;
uint32_t target_reset_count;
uint32_t agile_ch_width;
uint16_t bin_pwr_count_5mhz;
uint8_t bin_pwr_5mhz[MAX_NUM_BINS_5MHZ];
} __packed;
/**