Commit Graph

89 Commits

Author SHA1 Message Date
Edayilliam Jayadev
7dacaff96d qcacmn: fftbin size WAR for HK V2
For HK V2 each fft bin is 2 bytes due to
some HW limitations. To fix this modify the
fftbin size WAR to convert 2 byte fft bins to 1 byte
and forward to applications via SAMP message.

CRs-Fixed: 2319415
Change-Id: I6c27d6804ddaf91ed9e6695e0b21a81115744fff
2018-10-24 08:17:42 -07:00
Krishna Rao
e4de76596e qcacmn: Add WAR to process Gen3 Spectral report mode 1
Add Gen3 Spectral host WAR to remove NULL FFT bins for report mode (1)
in which only summary of metrics for each completed FFT + spectral
scan summary report are to be provided. This would be required on some
Gen3 chipsets (starting with IPQ8074) under the following
circumstances: In report mode 1, HW reports a length corresponding to
all bins, and provides bins with value 0. This is because the
subsystem arranging for the FFT information does not arrange for DMA
of FFT bin values (as expected), but cannot arrange for a smaller
length to be reported by HW. In these circumstances, the host driver
would have to disregard the NULL bins and report a bin count of 0 to
higher layers.

Change-Id: If5fb72805dc80ada0ab617b4b1c2cc9ea497bcf8
CRs-Fixed: 2300251
2018-10-09 00:03:56 -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
Sathish Kumar
a8dcd50683 qcacmn: Featurize WMI APIs and TLVs that are specific to WIN
In the existing converged component, WMI TLV APIs are implemented in
a generic manner without proper featurization. All the APIs exposed
outside of WMI are implemented in wmi_unified_api.c and all the APIs
forming the CMD or extracting the EVT is implemented in wmi_unified_tlv.c.

Since WIN and MCL have a unified WMI layer in the converged component and
there are features within WIN and MCL that are not common, there exists a
good number of WMI APIs which are specific to WIN but compiled by MCL and
vice-versa. Due to this inadvertent problem, there is a chunk of code and
memory used up by WIN and MCL for features that are not used in their
products.

Featurize WMI APIs and TLVs that are specific to WIN
- Air Time Fareness (ATF)
- Direct Buffer Rx (DBR)
- Smart Antenna (SMART_ANT)
- Generic WIN specific WMI (AP)

Change-Id: I7b27c8993da04c9e9651a9682de370daaa40d187
CRs-Fixed: 2320273
2018-10-05 02:14:04 -07:00
Edayilliam Jayadev
1f91a239b6 qcacmn: Add fft bin size WAR check
Add the fft bin size WAR check in spectral
report processing routine.

CRs-fixed: 2300341
Change-Id: I662fb469cb3716287663bc6d94d4adccb01a83c4
2018-09-07 03:04:12 -07:00
Venkateswara Swamy Bandaru
4dd4a62272 qcacmn: Extend target type checks of qca8074v1 to qca8074v2
Extend target type checks of qca8074v1 to qca8074v2

Change-Id: Ie5eba980af03c87f0086ffe2c2c89d7dc86dc71f
CRs-Fixed: 2292315
2018-08-29 03:08:00 -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
Aditya Sathish
f78a3d8ca5 qcacmn: Clean up spectral, tif and umac component prints
Clean up spectral, tif and umac component prints by correcting trace
levels for regularly occurring prints and removing newlines from
converged print APIs since qdf_trace_msg appends them by default.

Change-Id: Ib10f1b1c54ecbcb9f4076be7c2c4708359d488e0
CRs-Fixed: 2243843
2018-08-10 18:11:18 -07:00
Shiva Krishna Pittala
fd7c31dc80 qcacmn: Fix Spectral priority value after stop_scan call
After stop_scan call, Spectral priority is being disabled.
Do not change the value of any spectral parameter unless the command is
configure_spectral.

Change-Id: I25d3458cd49e25533270f89df9f8f29a4b7da16d
CRs-Fixed: 2259952
2018-06-27 05:33:06 -07:00
Edayilliam Jayadev
3822826445 qcacmn: fix api for getting first vdev
As per the current design we are trying to take a ref
for the vdev even when there are no active vdev.
Fix this by adding a NULL check.

CRs-Fixed: 2262983
Change-Id: Iac62c9d0e1138c3d150a179546ad7793ff61e3db
2018-06-21 21:19:00 -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
Jeff Johnson
413b6224e7 qcacmn: spectral: Fix misspelling of 'transferred'
Address the following issue in the spectral folder:
CHECK: 'transfered' may be misspelled - perhaps 'transferred'?

Change-Id: I23b710b4462f3ecc6f14fab54689a1064a716bf7
CRs-Fixed: 2241583
2018-05-19 19:40:40 -07:00
Shiva Krishna Pittala
8884aeac63 qcacmn: Mark spectral cache valid after writing into it
Setting of any spectral parameter after 'wifi load',
before doing a get operation, is not getting affected.
This is because the current implementation marks the
spectral cache valid only during the read operation.
To fix this, mark the cache valid after write as well.

Change-Id: I53df704e60e29cab7ce7afdd49b917e3482479e5
CRs-Fixed: 2238814
2018-05-18 12:14:48 -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
Akshay Kosigi
dbbf2c45da qcacmn: Replace ucfg prefix with lmac
Replace functions with ucfg as prefix in init_deinit_ucfg file with lmac as
prefix

Change-Id: I90d77dd5ddae4854ea68eeb67dc1b4fc356c2fe3
CRs-Fixed: 2182449
2018-05-11 22:40:16 -07:00
Edayilliam Jayadev
2874cca041 qcacmn: Adjust RSSI values for Spectral HW gen III
RSSI values are reported in 1/2 dBm steps for spectral HW gen III.
Convert the RSSI values to 1dBm scale.

CRs-Fixed: 2231546
Change-Id: I30962a95ba7a5f759d933e373c2b8708a98712fc
2018-04-27 09:47:37 -07:00
Edayilliam Jayadev
001d05b696 qcacmn: Use noise floor value from spectral report
Spectral module gets the noisefloor value from the meta data
info send by FW through direct dma framework. Copy the noise floor
value to SAMP message.

CRs-Fixed: 2219818
Change-Id: Icbd146875be668cdb99be20264e931040b670d5b
2018-04-25 23:49:05 -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
Krishna Rao
24a08f2ad9 qcacmn: Adjust FFT bin size for Spectral report mode 2
On IPQ8074, for report mode 2 only the in-band bins are DMA'ed.
Scatter/gather is used. However, the HW generates all bins, not just
in-band, and reports the number of bins accordingly. The subsystem
arranging for the DMA cannot change this value. The host driver needs
to check if report format is 2, and if so halve the number of bins
reported to get the number actually DMA'ed.

CRs-Fixed: 2218423
Change-Id: Ic0be87422c67110cf3595a4bea71dc872d5b2504
2018-04-06 13:25:39 -07:00
Arif Hussain
958e7515b2 qcacmn: spectral: Replace instances of unadorned %p
Replace instances of unadorned %p in
target_if_spectral_process_phyerr_gen3.

Change-Id: I1f70e613885780b71aa69cd12b61e9d24415b333
Crs-Fixed: 2213177
2018-04-05 11:04:32 -07:00
Edayilliam Jayadev
bf873df722 qcacmn: Fix API for getting first vedv of pdev
Since vdev_id is globally unique across multiple pdev,
assuming vdev_id 0 to find the first vdev of a pdev wouldn’t work.
Fix this issue by getting the first vdev from the head of vdev
linked list maintained per pdev.

CRs-Fixed: 2211742
Change-Id: I5a7b5436cff363d5470fb600cca54f587a7d683e
2018-04-03 01:42:58 -07:00
Manikandan Mohan
56a2bf8921 qcacmn: Fix export symbol for multi drivers compilation
Update target_if module files to use qdf_export_symbol to facilitate
multiple driver module compilation support.

Change-Id: I83b2d79a96909a2661a89a1129e17c291e9a2e03
CRs-fixed: 2197751
2018-03-19 19:58:10 -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
4d3daf5cf0 qcacmn: Fix static analysis
Fix static analysis issues on spectral modules.

CRs-Fixed: 2196066
Change-Id: I7588a26108ff3c0b01f480007ffe3d3b91c29b8e
2018-03-02 23:45:16 -08:00
Shiva Krishna Pittala
cd67294973 qcacmn: Fix configuration of Spectral module for Gen2
Spectral module configuration is failing on Gen2, fix it.

CRs-Fixed: 2187148
Change-Id: I424512d181e70d300a71210cf3e0593b2ddbf24f
2018-02-12 06:45:43 -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
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
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
Srinivas Pitla
9af4f65f61 qcacmn: Spectral changes for target_if
Use new structures to get target_type and revision

Change-Id: Ic7cb70711b9c747159440638877a6d8c7bd46d92
CRs-Fixed: 2177109
2018-02-03 15:11:05 -08:00
Shiva Krishna Pittala
e37387598e qcacmn: Fix the coding convention issues in Spectral simulation
Current target_if Spectral simulation layer code is not following
coding convention rules in some places.

Change-Id: I0bf0f0514b65e17ddce9fb803c647448ee4b5b3a
CRs-Fixed: 2151555
2018-02-02 14:48:12 -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
Sandeep Puligilla
f484c2b0da qcacmn: update logic to get wmi_handle from pdev
Update the target if interface api to get the wmi
handle.

Change-Id: Ifb31f6fc11ac3e86d003342ef8e4d4af29a0b170
CRs-Fixed: 2168264
2018-01-22 12:08:17 -08:00
Pratik Gandhi
034cb7cb60 qcacmn: Define Host based TARGET_TYPE
fwhdr_abstrct: Use Host based TARGET_TYPE instead of firmware
defined TARGET_TYPE. It will abstract dependency on bmi_msg.h.

Change-Id: I76d744db27df730a3a91a243adfc07fc17d77487
CRs-Fixed: 2140921
2018-01-03 20:09:46 -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