Commit Graph

36 Commits

Author SHA1 Message Date
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
Uraj Sasan
4e893b176b qcacmn: Support WIN WLAN Single module
QCA_SINGLE_WIFI_3_0 directive is used to build
single wifi module, it is disabled by default.
This is intended for used in whunt case,the default
driver still uses separate spectral modules.

Change-Id: I6d0d66ade3784f7f4c0a3f322db2e79cbc246d56
2019-11-26 23:19:53 -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
cd6f190963 qcacmn: Make RX path changes for Agile Spectral
Change Spectral report processing logic to handle
Agile Spectral reports. 160 MHz state machine is not
affected by Agile Spectral reports.

CRs-Fixed: 2458359
Change-Id: Iead6427f57edddd61f7d64a961cc6d936d54ab9e
2019-06-21 03:09:19 -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
Krishna Rao
964b395409 qcacmn: Add rate limited variants of Spectral logging functions
Add the rate limited variants of the QDF trace based logging functions
for Spectral. These include the sub-variants with and without
file/line information.

Change-Id: I56be5dcdfb070e8212c4e9a7e1c1140bfdfaae05
CRs-Fixed: 2426985
2019-04-27 13:07:43 -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
Shiva Krishna Pittala
8512b848a6 qcacmn: Use QDF trace APIs for Spectral logging
Component level logging functions of Spectral module are calling
vprintk internally, change them to use QDF trace APIs
so that Spectral logging can be controlled at run time from qdf_cv_lvl.

Change-Id: I8244a29918718c70a8f384ea8df2d5c2ad5bfad2
CRs-Fixed: 2369842
2018-12-21 10:05:25 -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
Edayilliam Jayadev
01b4921127 qcacmn: Enable spectral registration to direct dma
Enable registration of spectral feature to direct dma

CRs-Fixed: 2219121
Change-Id: I483e87b9a6c7dcd297bc8b88d24c49e8d80ed547
2018-04-06 13:25:41 -07:00
Shiva Krishna Pittala
a143f83a27 qcacmn: Add Netlink deinit functionality in Spectral
Define os_if_spectral_netlink_deinit to close the Spectral socket and
de-register the os_if callbacks

Change-Id: I3d054c2a2d630d4d959861d3620592010d04c09a
CRs-Fixed: 2186113
2018-03-06 03:53:47 -08:00
Edayilliam Jayadev
f01a81b79f qcacmn: spectral changes for gen3 HW
Process spectral summary and search fft report for
gen3 spectral HW. Add the frame work to register to
Direct dma module.

CRs-Fixed: 2184019
Change-Id: I4e2869d9c2887767d58685533265cc93c908b697
2018-02-09 09:21:04 -08:00
Shiva Krishna Pittala
101778698b qcacmn: Move Spectral Netlink APIs to os_if layer
Spectral Netlink related APIs are currently present in
target_if layer, move them to os_if layer.

Change-Id: I86a5495f6ec8aa85a2e9639902503a522b023f8e
CRs-Fixed: 2151548
2018-02-09 09:21:00 -08:00
Shiva Krishna Pittala
82032dd2a4 qcacmn: Move the spectral tgt layer functionality to tgt file
If the definition of an API in umac layer is same for
both OL and DA chipsets, it is better to have a single
implementation of that API for maintainance pursposes.
tgt file is the placeholder for such APIs.

CRs-Fixed: 2151543
Change-Id: I3ae969452b10f6d81e46351a74ed9d4c3f5ea96c
2018-02-09 09:20:58 -08: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