qcacmn: Add support to configure spectral scan bandwidth

Add support to configure spectral scan bandwidth as provided by the user.
Validate the user configured value before applying it. As the spectral scan
bandwidth is an optional parameter, when the user doesn't configure it, use
configure the spectral scan bandwidth to the maximum value supported by the
target for the current operating bandwidth.
Also, populate the spectral scan bandwidths supported for different
operating bandwidths on different targets.

CRs-Fixed: 3042424
Change-Id: I266aa5489b0ce5c149968067a06e1cc65bb4e3b7
This commit is contained in:
Shiva Krishna Pittala
2021-09-25 18:31:15 +05:30
committed by Madan Koyyalamudi
parent 697dce6937
commit aead8c4d39
5 changed files with 548 additions and 108 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011,2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2011,2017-2021 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@@ -343,6 +343,15 @@ spectral_control_cmn(struct wlan_objmgr_pdev *pdev,
goto bad;
}
if (sp_in->ss_bandwidth != SPECTRAL_PHYERR_PARAM_NOVAL) {
param.id = SPECTRAL_PARAM_CHAN_WIDTH;
param.value = sp_in->ss_bandwidth;
ret = sc->sptrlc_set_spectral_config
(pdev, &param, smode, err);
if (QDF_IS_STATUS_ERROR(ret))
goto bad;
}
break;
case SPECTRAL_GET_CONFIG:
@@ -373,6 +382,7 @@ spectral_control_cmn(struct wlan_objmgr_pdev *pdev,
spectralparams->ss_dbm_adj = sp_out.ss_dbm_adj;
spectralparams->ss_chn_mask = sp_out.ss_chn_mask;
spectralparams->ss_frequency = sp_out.ss_frequency;
spectralparams->ss_bandwidth = sp_out.ss_bandwidth;
break;
case SPECTRAL_IS_ACTIVE:

View File

@@ -309,6 +309,7 @@ struct spectral_config_frequency {
* span of interest or center frequency (in MHz) of
* any WLAN channel in the secondary 80 MHz span of
* interest.
* @ss_bandwidth: Spectral scan bandwidth
*/
struct spectral_config {
uint16_t ss_fft_period;
@@ -336,6 +337,7 @@ struct spectral_config {
int8_t ss_nf_pwr[AH_MAX_CHAINS * 2];
int32_t ss_nf_temp_data;
struct spectral_config_frequency ss_frequency;
uint16_t ss_bandwidth;
};
/**