Commit Graph

26 Commits

Author SHA1 Message Date
Shiva Krishna Pittala
aeb2ffde14 qcacmn: Add stats in Spectral report processing path
Add the following stats.
 - Number of Spectral events received from the target
 - Number of consume_spectral_report() invocations
 - Number of fill_samp_msg() invocations
 - Number of SAMP messages that are ready to be sent to the user-space
 - Number of SAMP messages queued to the user-space

Change-Id: I53fda4b309620043a77bc2bc87573941d7fb0bcb
CRs-Fixed: 3156151
2022-03-23 13:01:40 -07:00
Jhalak Naik
24174b7be8 qcacmn: Add support for Spectral FFT recapture config
Add support to 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 scan.

Change-Id: I6b92fcd674ae95bcd0a23892ef9ccc6ba487d6ad
CRs-Fixed: 3140890
2022-03-04 13:45:00 -08:00
Jhalak Naik
b65b4ae703 qcacmn: APIs to convert phy_ch_width to nl80211_chan_width and vice-versa
Add Spectral APIs to convert channel width values
from enum phy_ch_width to nl80211_chan_width and
vice-versa.

CRs-Fixed: 3029184
Change-Id: I60fb7fb04b943b0d70c569ff6587e5e8efd7722b
2021-09-29 15:05:37 -07:00
Harsh Kumar Bijlani
a496f14ebe qcacmn: Add forward declaration of structures to fix warnings
Add forward declaration of structures wlan_objmgr_pdev and
wlan_objmgr_vdev in file wlan_spectral_public_structs.h in
order to fix compiler warnings.

Change-Id: Ida73f3d3d808977ba1e813de3dd85e329fc13cd4
CRs-Fixed: 2907580
2021-06-02 06:58:26 -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
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
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
Edayilliam Jayadev
b292dd7b1a qcacmn: Use common Spectral config definition
Today Driver and applications maintain a separate copy of
spectral config definitions, which is error prone. Solution is to
expose the definitions via a header file from driver and include
them in all applications using Spectral.

CRs-Fixed: 2432011
Change-Id: I107c2db05e1cb71b379d6f15a282a889882da2f8
2019-05-01 00:39:58 -07:00
Edayilliam Jayadev
f6e599fbad qcacmn: Use common Spectral SAMP message definition
Today Driver and applications maintain a separate copy of SAMP
message definitions, which is error prone. Solution is to
expose the definitions via a header file from driver and include
them in all applications using Spectral.

CRs-Fixed: 2431820
Change-Id: Icf7e6d6bfa1e7bfaa1f2cb4756e69edbac6bfb33
2019-04-30 20:45:20 -07:00
Edayilliam Jayadev
2256850e61 qcacmn: 160 MHz/80p80 support for gen III Spectral
For generation 3 spectral reports for the 80 MHz segments
come as part of different events. To deal with this a
state machine is added to report handler. Noise floor
value of the lowest chain in the chain mask is populated
in the SAMP message.

CRs-Fixed: 2236331
Change-Id: Ie24426449cf8503c9d7f7c30ca617a6697ca2b5e
2018-10-05 02:14:07 -07:00
Krishna Rao
3fa42be5d4 qcacmn: Add definitions for Spectral linear bin scaling
Add definitions for Spectral linear bin scaling, including conversion
functions, RF parameter definitions, and hardware generation
specifiers.

CRs-Fixed: 2294176
Change-Id: I6e1eb2ce3ec19d8734facb88c6329fe0026ecce0
2018-10-01 02:37:18 -07:00
Edayilliam Jayadev
8e3eb14984 qcacmn: Add more fields to SAMP message
Add new fields such as agc_total_gain, sscan_gainchange
to the Spectral SAMP message.

CRs-Fixed: 2291499
Change-Id: Ia6a9fd742c2ee98fd9d7102f0d8c66dcd22a1614
2018-08-14 05:01:16 -07:00
Edayilliam Jayadev
05f1b59642 qcacmn: Sync Spectral header files
Sync the Spectral header files used by driver and Spectral related
applications.

CRs-Fixed: 2258823
Change-Id: I9a4fb89e9327fffb7478619e63788a1d284f49b5
2018-06-21 21:18:57 -07:00
Edayilliam Jayadev
df3100c157 qcacmn: Share Spectral HW gen as part of capability exchange
Spectral scan period is not in terms of tclk periods for
generation 3 Spectral HW. It is directly in micro seconds.
Default value is 224 us. Driver needs to use 224 us as
default value. Application needs to display the unit as
tclk period till generation II and micro second for
generation III. For this driver will be sharing the
Spectral HW generation info to application as part of
the capability exchange.

CRs-Fixed: 2225740
Change-Id: Iaeda8ebb77c2a39824b5f919e8578ff4d56c1aa5
2018-05-14 11:39:29 -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
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
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
318d20fc69 qcacmn: Fix the coding convention issues in Spectral target_if layer
Current target_if spectral layer code is not following coding
convention rules in some places.

Change-Id: I1c0e78c6cdbe97db657c341d74582567a29a86b0
CRs-Fixed: 2151555
2018-02-02 14:48:09 -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