Commit Graph

29 Commits

Author SHA1 Message Date
Jeff Johnson
9c3acb0121 qcacmn: spectral: Fix misspellings
Fix misspellings in spectral/...

Change-Id: I2477dbd5ecccc508d5dfdfc8006fe2255ba0dda8
CRs-Fixed: 3304692
2022-10-06 21:31:52 -07:00
Sreeramya Soratkal
fd8b102007 qcacmn: Validate status of spectral control request processed
Validate the result of spectral specific ucfg control operation
after processing the control request to get the spectral system
capability information and the spectral diag status.

Throw error if it is an invalid operation.

CRs-Fixed: 3272699
Change-Id: Iba1b165caa41a7b4a133e9d9f3df7203a60a2b75
2022-09-21 09:34:44 -07:00
Jhalak Naik
055dfbe881 qcacmn: Add Host support for Spectral FFT recapture
Add support to receive the fft_recapture arg value
from spectraltool, handle the FFT recapture config and
pass this to FW. The recapture feature must be
enabled only for spectral scan period > 52 us and
Normal Spectral scans.

Change-Id: Ied637704d25bb15bff2139a215da7481d4f80e4f
CRs-Fixed: 3140890
2022-03-09 06:51:27 -08:00
Shiva Krishna Pittala
aead8c4d39 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
2021-09-28 03:43:21 -07:00
Edayilliam Jayadev
80a12b81ed qcacmn: Skip init/deinit/config if Spectral is disabled
If Spectral scan is disabled(agile and normal mode disabled)
skip init/deinit of Spectral module. Also avoid user requests
to configure/start/stop scan. If either agile or normal mode
is disabled block user requests for that mode alone.

CRs-Fixed: 2840335
Change-Id: I81148e5580fe4bf991b97cd086c8e3a9ca78e77d
2020-12-30 07:06:29 -08:00
Edayilliam Jayadev
8f57245a44 qcacmn: Add Spectral feature capabilities
Add the following Spectral scan capabilities at the pdev level.
 a) Normal Spectral scan capability
 b) Agile Spectral scan capability for 20/40/80 MHz
 c) Agile Spectral scan capability for 160 MHz
 d) Agile Spectral scan capability for 80+80 MHz

Also change the definition of existing Spectral scan capability
at psoc level.

CRs-Fixed: 2840144
Change-Id: I18be48ec4095fa29b62800a9df58b72295747547
2020-12-30 07:06:08 -08:00
suresh
a8d0770765 qcacmn: Remove direct attach reference in makefile
Remove direct attach directory references in Kbuild
of spectral source code.

Also, remove DA_SUPPORT macro specific code changes

Change-Id: I5a06e9bd3f40ee6d177951562836c4ea7647f98b
2020-09-03 01:58:36 -07:00
Edayilliam Jayadev
6c76bce586 qcacmn: Modify vendor command handler to accept vdev
The Spectral module uses the first vdev of a pdev for scanning.
For MCL platforms all the vdevs are associated with a single pdev
and this may cause a mismatch between the vdev intended by user and
the vdev used by driver. To avoid this MCL platforms pass a reference
to vdev on which Spectral scan is triggered. WIN platforms
can continue to use the old approach of using the first vdev of a
pdev by passing NULL for vdev to vendor command handlers.

CRS-Fixed: 2725777
Change-Id: I1a7278bdcbcc2b706aa292b33c17546190dac082
2020-07-24 02:01:11 -07:00
Wu Gao
b43c68dedf qcacmn: Gets vdev by id in spectral component
It starts spectral scan without vdev object, and uses the first vdev
as current vdev. which cause vdev mismatch in some platforms. So pass
vdev object or id when finding current vdev.

Change-Id: Iab55afbe2c98906021a008918f186d3d2dce5871
CRS-Fixed: 2716460
2020-07-24 02:01:08 -07:00
Edayilliam Jayadev
abdb33bb00 qcacmn: Add start scan response WMI event
Add support for processing the start scan response
WMI event. FW provides the necessary information to
segregate FFT bins to pri80, 5 MHz and sec80 in
160/165 MHz. Also, cfreq2 and the channel width is
provided to FW via WMI command.

CRs-Fixed: 2672081
Change-Id: I666b6c18a63d5d01117aa9cbd611691c6f8b2793
2020-05-13 01:30:40 -07:00
Edayilliam Jayadev
1de47959b6 qcacmn: Enable Agile Spectral in single synth targets
Some targets have a single synthesizer and it allows
a single Spectral detector to scan in 160 MHz /165 MHz.
Enable Agile Spectral scanning in 160 MHz / 165 MHz for
such targets. Agile creq2 will be populated in the WMI
command after WMI interface changes are merged.

CRs-Fixed: 2648480
Change-Id: I8522cbeeab29ac41479e3041eea376b081c0758a
2020-04-30 01:51:14 -07:00
Shwetha G K
8db4b4ac32 qcacmn: Control path support for Spectral DMA debug
All gen III chipsets use Direct-DMA mechanism to copy Spectral reports to
the Host for further processing. This mechanism involves ring and buffer
management in the Host, FW, and uCode, where improper/incomplete DMA and
improper tail update issues are seen. DBR framework provides support to
debug such issues. Add Spectral control path support to facilitate the
configuration of these debug options.

CRs-Fixed: 2478596 2478595
Change-Id: I094616c4137145389b6984ccab933e5ebd0aa1ab
2019-12-03 03:26:22 -08:00
Edayilliam Jayadev
b38cb7a8f0 qcacmn: validate user given agile center frequency
Validate user provided agile center frequency and throw
an error if it is invalid.

CRs-Fixed: 2529280
Change-Id: Ibb43dda98d29d8bc8360d1a204c67b64ca987ca6
2019-10-03 12:34:44 -07:00
Edayilliam Jayadev
9217a212bb qcacmn: Add error handling in the Spectral control path
Add an attribute which describes the error code
in the response to set config, start scan and stop
scan.

CRs-Fixed: 2500481
Change-Id: I491cd6e061d2d08ceb4d9af2a7de5223e229c280
2019-08-29 12:51:37 -07:00
Edayilliam Jayadev
8e74a62e72 qcacmn: Change Spectral control path to support Agile mode
Modify Spectral control path APIs to support Agile mode.

CRs-Fixed: 2450620
Change-Id: Id6cf48c1288b157932ab5ce0535293e466a87783
2019-07-27 00:31:31 -07:00
Edayilliam Jayadev
14f9bd4194 qcacmn: Spectral control path changes
Add a new request structure for Specteral control path.
This structure packages all the commands and their
required inputs. Response to the commands are filled
in this structure by the command handlers in lower
layers.

CRs-Fixed: 2446466
Change-Id: I3113e8721382d284b4e03e0f8fdab1e68d5cfaa1
2019-06-08 06:29:44 -07:00
Wu Gao
da8a7e60e5 qcacmn: Cleanup CONFIG_MCL in spectral scan
Use new macro "SPECTRAL_MODULIZED_ENABLE" to replace "CONFIG_MCL" and
"CONFIG_WIN" in spectral scan component.

Change-Id: Ib0167fa7b7cb08efde8d690f24eff85dd21897a1
CRs-Fixed: 2444204
2019-05-20 22:15:52 -07:00
Madhvapathi Sriram
65c8e4be73 qcacmn: Remove error log for qdf_mem_malloc in spectral files
qdf layer already has the error trace

Change-Id: Ia8314900f564369f51fd79cd97f3a9dba5d54a1b
CRs-Fixed: 2376437
2019-02-09 09:45:25 -08:00
Shashikala Prabhu
7eb2d08e3b qcacmn: Add INI support to disable spectral feature
Add INI support to disable spectral feature and do not process the spectral
user commands if spectral feature is  disabled.

Change-Id: Id353131675454652d59fd5d5f8fd3d732a07b777
Acked-by: Shashikala Prabhu <pshashik@codeaurora.org>
CRs-Fixed: 2343947
2018-12-27 13:28:00 -08:00
Edayilliam Jayadev
780b60ea90 qcacmn: Remove CONFIG_WIN from spectral
Remove CONFIG_WIN from spectral module to achieve maximum
possible convergence.

CRs-Fixed: 2354105
Change-Id: I59e4d8029fcf096042741573cf020136747e7367
2018-12-11 06:11:13 -08:00
Visudha Sathurappan
7a1c814bc7 qcacmn: Move out spectral DA files
* Move spectral DA files to a DA specific directory.
   The new DA specific directory will be under a new git root.
 * DA:- Direct Attach

Change-Id: Ifd1325bd822015a894ff2a67ed4b53dae24e4a28
2018-10-11 08:56:46 -07:00
Edayilliam Jayadev
8e9eb4f27d qcacmn: Add API to get first vdev of given pdev
Add API to get first vdev of any given pdev.
Change spectral module's API accordingly.

CRs-Fixed: 2234801
Change-Id: I6c5f0aefad4a71610300810531b8c893471306ad
2018-05-14 12:50:52 -07:00
Shiva Krishna Pittala
71155a3e48 qcacmn: Use module level logging in Spectral
Current Spectral module uses qdf_print. To improve the control over
logging, use module level logging

CRs-Fixed: 2165341
Change-Id: I205991347453c4dcc424ba1958e309b7c5fb71a0
2018-02-09 09:20:56 -08:00
Shiva Krishna Pittala
f57c0b6262 qcacmn: Fix the coding convention issues in Spectral core
Current Spectral core functionality is not following coding
convention rules in some places.

Change-Id: I2109e510351d254652cbab16f09e52ec463abebb
CRs-Fixed: 2151550
2018-02-02 14:48:03 -08:00
Sandeep Puligilla
4fe1d4b0ee qcacmn: Fix spectral scan compilation errors
Fix spectral scan component compilation errors
on MCL build system.

Change-Id: I903431fba923859e796e0786354608cac2841b0c
CRs-Fixed: 2160819
2017-12-21 01:39:17 -08:00
Edayilliam Jayadev
e0c7fbdb93 qcacmn: Callback functions for legacy spectral apis
Use table of function pointers for legacy api calls
instead of calling legacy apis directely

CRs-Fixed: 2146231
Change-Id: Ia5840208d0de5bd4e78c1d27b8ffdc0cf6cbf298
2017-11-30 05:27:58 -08:00
Edayilliam Jayadev
d8c6a467dd qcacmn: Add QCA vendor commands for spectral scan
Add following vendor commands and their handlers.

 1) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_START
        Set the spectral parameters and start scan.
 2) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Stop spectral scan.
 3) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CONFIG
        Get current values of spectral parameters.
 4) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_DIAG_STATS
        Get stats for spectral scan debug.
 5) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_CAP_INFO
        Get the spectral hardware capability.
 6) QCA_NL80211_VENDOR_SUBCMD_SPECTRAL_SCAN_GET_STATUS
        Get the current status of spectral scan.

CRs-Fixed: 2146272
Change-Id: I8e048d6c21e9fb1ed286c19df0edcad46f6e6414
2017-11-30 05:27:57 -08:00
Shiva Krishna Pittala
a3d50e8a85 qcacmn: Removing WIN specific structures from spectral
Removing WIN specific structures 'scn' and 'ic'
from the spectral module in cmn_dev

CRs-Fixed: 2146258
Change-Id: Ie4def4dfb401f4b1a5920277f8fa79acb67dd46b
2017-11-30 05:27:55 -08:00
Shiva Krishna Pittala
de0cb20d07 qcacmn: Moving spectral module to cmn_dev
As part of second phase of Spectral Analysis(SA)
convergence [WIN & MCL], spectral module code is being moved to cmn_dev.
Also includes fixes for checkpatch.

CRs-Fixed: 2146231
Change-Id: I939509193786b0bd2cbd5f1af64d4a94739a2af5
2017-11-30 05:27:54 -08:00