Commit Graph

27 Commits

Author SHA1 Message Date
Edayilliam Jayadev
f76792f311 qcacmn: Add Spectral detector count in capability info
Populate number of Spectral detectors per BW in the
Spectral capability vendor command response.

CRs-Fixed: 2659587
Change-Id: I2eba5df02a5f70556d65e689aece1f0fbd8bba93
2020-04-09 11:31:53 -07:00
Alan Chen
31f4e86ecb qcacmn: Remove static from nla_policy spectral_scan_policy
Remove static from nla_policy spectral_scan_policy in correspondence to
the change to add policy attribute to SPECTRAL_SCAN vendor subcommand.

Change-Id: I764a51f5c1355cb0c3dd2096e6dc7ee332b2f3d6
CRs-Fixed: 2634075
2020-03-14 03:25:12 -07:00
Edayilliam Jayadev
17ecd7493a qcacmn: Enable Spectral feature for Pine
1) Enable DDMA support, FFT bin length adjustment SWARs
2) Skip 16 bytes of padding added after Spectral summary report.
3) FFT report header length is 24 instead of 16 in Pine.
4) Max FFT size is changed to 10.

CRs-Fixed: 2608215
Change-Id: If32a8995f814140f5b61041031fb842d01d24c94
2020-02-01 06:25:04 -08:00
Shwetha G K
6d85a9e8da qcacmn: Track netlink allocations
Track netlink allocations when mem debug is enabled.

Change-Id: Icba58f93cf0364678d730f32bd56645efab934e1
CRs-Fixed: 2588037
2020-01-09 04:51:33 -08: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
2afe8e48fd qcacmn: Populate aSpectral capability based on BW
Some chipsets don't have the capability to run agile Spectral with
160/80p80 modes. For this populate separate agile Spectral capability
for 160 MHz, 80p80 and non 160 MHz modes.

CRs-Fixed: 2549664
Change-Id: I7ae961d3f2bba33d1d3f73679f162823d54b6717
2019-10-26 11:55:36 -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
7c72252ec8 qcacmn: Free outstanding skbs on Spectral detach
While detach if there are any outstanding skbs free them.

CRs-Fixed: 2470780
Change-Id: Ic9ee568a1af96b2535cc2a30747ac8e5190e1be6
2019-06-14 12:58:27 -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
d4b7e3b572 qcacmn: Populate spectral capability and send via cfg80211
Populate Spectral capability structure with scaling parameters
from extended service ready event parameters. Send the spectral caps
via cf80211 interface.

CRs-Fixed: 2379652
Change-Id: Id0372bdd40843c2101df32d2e71920027a24909f
2019-02-05 04:02:20 -08: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
Debasis Das
c2af7e7648 qcacmn: Wrappers for OS API's used for device cfg
Use appropriate wrappers for OS API's used for
device configuration.

Change-Id: I6a8042175d1a5939742be077fa45e8b776eee180
CRs-Fixed: 2222560
2018-08-17 10:29:26 -07:00
Shiva Krishna Pittala
6db0dac5b6 qcacmn: Fix SKB leak in Spectral Netlink
Spectral allocates its nbuf using qdf_nbuf_alloc() and calls
Netlink functions to send the SKB to the application layer.
After sending SKB, the Netlink send functions free the SKB using
dev_kfree_skb(). As a result, QDF nbuf tracker treats this
an SKB leak and panics the system.
To avoid this leak, remove the SKB entry from QDF nbuf debug hash table
by calling qdf_net_buf_debug_release_skb() before handling
the SKB to Netlink send functions.

Change-Id: I62c7046d1481c2a38ef5321410ebca9f5f5f34ed
CRs-Fixed: 2285654
2018-08-08 09:12:00 -07:00
Edayilliam Jayadev
b3911b4c48 qcacmn: Initialize spectral samp message with zero
Initialize the spectral samp message structure to zero.

CRs-Fixed: 2278403
Change-Id: I5d36662db32820c40f7fb2eafb56942d8654e7f6
2018-07-25 01:24:29 -07:00
Chaoli Zhou
d519e6b287 qcacmn: Remove boring log of spectral scan
Such log will show once has the spectral scan result message
need to send to application, which is boring and delete it

Change-Id: I4e7fd8877b354d94022b65a8e43cc4ca3e285943
CRs-Fixed: 2274032
2018-07-13 06:42:57 -07:00
Sandeep Puligilla
6f083bace3 qcacmn: Fix spectral scan compilation issue
Forward declare 'struct wmi_spectral_cmd_ops' in
file wlan_spectral_utils_api.h to avoid
compilation issue when spectral feature flag
is disabled.

Change-Id: Iba8dfbb2007f20d409fbb2d67ee29f702264e50d
CRs-Fixed: 2269005
2018-07-11 23:36:30 -07:00
Sandeep Puligilla
0a341a5e92 qcacmn: Add spectral scan feature flag
Add spectral scan feature flag which can be
used to control the feature through build options.

Change-Id: Ic56416fc99b521174cccb3af27cc841bfb2ad27d
CRs-Fixed: 2244334
2018-06-06 23:49:17 -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
Manikandan Mohan
5bdb2fe470 qcacmn: Fix export symbol for multi drivers compilation
Update driver files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: Ic7d7f65b79e92957b02c0386ba98af2adf17506b
CRs-fixed: 2197751
2018-03-19 19:58:03 -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
Sandeep Puligilla
cd793f38a3 qcacmn: Configure spectral module for Gen2
-Initialize the default Configuration as
gen2 for spectral module on MCL.
-Add support to general netlink socket.

Change-Id: Iab06f66d18c4791f0ff5483781634df2a7268ddb
CRs-Fixed: 2183870
2018-02-09 09:21:02 -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
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