提交線圖

55 次程式碼提交

作者 SHA1 備註 日期
Neha Bisht
466c04dee9 qcacmn: remove dependency of public files from wlan_objmgr_psoc_obj.h
Remove dependency of wlan_lmac_if_def headerfile from
wlan_objmgr_psoc_obj.h

Change-Id: Ida8472e6f05a90b3930b5a13a2bf89ea8b3e938f
2020-05-15 10:41:46 -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
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
Edayilliam Jayadev
01106d6458 qcacmn: Enable 165 MHz Spectral scan
QCN9000 has the capability to Spectral scan in 165 MHz/
restricted 80p80 mode of operation. Host filters the FFT bins
corresponding to the additional 5 MHz and exports to the
user space via SMAP message.

CRs-Fixed: 2630960
Change-Id: I54ec36968cb0c8d5a68ff39029004b08936cb91e
2020-03-21 02:03:45 -07:00
Edayilliam Jayadev
49de9e2d3c qcacmn: Handle 80p80 and 160 MHz separately
Currently 160 and 80+80 MHz modes are handled together in
Spectral module. Differentiate between 160 and 80+80 MHz
to support new features like restricted 80+80
which are applicable only with 80+80 MHz.

CRs-Fixed: 2630729
Change-Id: I3e9fdd0e2d22a0bca7d37445df7fb1f1bab023c8
2020-03-16 08:05:34 -07:00
Edayilliam Jayadev
4e5b760643 qcacmn: Enable 160 MHz Spectral scan in QCN9000
Till IPQ8074/IPQ8074_V2 each Spectral detector was capable of
doing scan up to 80 MHz. But in QCN9000 each Spectral detector
is capable of doing scan up to 160 MHz. As a result there will
be only one Spectral report in 160/80p80 MHz. Modify Spectral
Rx path to support single Spectral report in 160 MHz.

Change-Id: I9639cdc6adc6ad80e2769571b06d2a2021d699bc
CRs-Fixed: 2619544
2020-03-14 18:16:25 -07:00
Edayilliam Jayadev
ec5e46507e qcacmn: FFT size max based on band width
For QCN9000 max FFT size supported is 9 for 20 MHz and 10
for all other bandwidths. Add FFT bin size max based on
bandwidth to support this requirement.

Change-Id: If383dc914937d68c9f4781463a3a965c73bc78f1
CRs-Fixed: 2617674
2020-02-11 02:09:20 -08:00
Edayilliam Jayadev
d0113009aa qcacmn: Cleanup in Spectral time stamp WAR logic
Add a function to encapsulate Spectral time stamp WAR logic which corrects
the Spectral time stamp reported by target.

Change-Id: I490c9f2109f36831cd8de47b8165749e93d9b5cb
CRs-Fixed: 2600170
2020-02-01 09:08:25 -08: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
Edayilliam Jayadev
94e232827d qcacmn: Cleanup Spectral bin length WAR and FFT report logging
Modularise the logic of FFT bin length adjustment SWARs and
Spectral FFT report logging logic.

Change-Id: Ia1382e3bdd78589c5192263d23e31bc74e2bfbbd
CRs-Fixed: 2599080
2020-01-21 02:00:02 -08:00
Edayilliam Jayadev
b3a66311cc qcacmn: Add Agile channel width to SAMP message
Add a new member to SAMP structure describing the channel width of
Agile Spectral scan.

Change-Id: Ib27fe9ed63bf8f89c59762150fb58943e6bcf7ea
CRs-Fixed: 2582670
2019-12-12 18:14:27 +05:30
Hariharan Basuthkar
379ebfe4e3 qcacmn: Use channel frequency instead of channel number
1) Add the API wlan_reg_get_5g_bonded_channel_and_state_for_freq
   that returns  the state for a 5G or 6G channel frequency,
   based on the channel width and and state of the bonded channels.

2) In the API target_if_calculate_center_freq, remove the instances
of IEEE channel number, and provide regulatory support, with the
channel frequency based structure - bonded_channel_freq and the API -
wlan_reg_get_5g_bonded_channel_and_state_for_freq.

3) Remove the usage of band_info and replace it with reg_wifi_band within
the target_if of the spectral module.

Change-Id: If5108b55097208d33fafb48968ea8b6dc83011fa
CRs-Fixed: 2571906
2019-12-09 20:38:52 -08:00
Shwetha G K
7887593414 qcacmn: Log Spectral FFT timestamp WAR parametrs
Log Spectral FFT timestamp WAR related parameters

Change-Id: I11e3107f41049e9fb05c3f9f7960279b88392598
CRs-Fixed: 2556803
2019-12-03 04:52:57 -08:00
Shwetha G K
389eae6224 qcacmn: Check discrepancies in Spectral timestamps
If the timestamp field in the current Spectral report is equal to the
timestamp field in the previous report, assert the FW.

Change-Id: Idb32807f0cdd59a2eaab5dd6c1e62567fd5a45d0
CRs-Fixed: 2478593
2019-12-03 03:26:32 -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
Shwetha G K
0c000df15e qcacmn: Add poisoning support for Spectral DDMA buffers
All gen III chipsets use DDMA method to copy the spectral reports to
the Host. It is possible that the buffers can be improper/incompletely
DMAed, which leads to wrong values being present in the Spectral report.
To detect improper DMA, the DBR framework has the support to poison the
buffers before handing them over to the target. This framework expects
the buffer owner modules to check for poison values in key fields.
So, validate the Spectral reports and assert the target upon failure.

Change-Id: I519bf8abd87cfc9758fe7d126a195f39656d8ecc
CRs-Fixed: 2478592
2019-12-02 00:43:04 -08:00
Krishna Rao
5304724e59 qcacmn: Add Agile Spectral frequency to Spectral SAMP message
Add Agile Spectral frequency to Spectral SAMP message and populate the
same. This coexists with the pre-existing operational frequency in
SAMP message for the sake of flexibility.

Change-Id: Iadb8efeaac924df5b0ac9a83f630206b2ef93052
CRs-Fixed: 2545763
2019-10-27 17:28:49 -07:00
Edayilliam Jayadev
454c6d7be3 qcacmn: Restrict Agile Spectral start scan in SBS mode
Ensure that at a time only one Agile Spectral scan is
happening across all the 5G pdevs in SBS mode.

CRs-Fixed: 2517522
Change-Id: If31a4451b82ce1d7d8a46bc604ca91bf4b6dac29
2019-10-06 23:54:53 -07:00
Krishna Rao
54a3931f9f qcacmn: Add and populate Spectral pri80 indication
Spectral generation III hardware sets the Spectral primary 80 MHz
(pri80) indication in Spectral Summary reports to inform software
whether the Spectral sample was gathered on the primary 80 MHz
segment. But this may also be set in the case of Spectral scans
intended to be carried out on the Agile frequency or secondary 80 MHz,
due to a channel switch of the Spectral chain from Agile/secondary 80
MHz to primary 80 MHz. Software can ignore samples for which the pri80
indication is set for Agile mode or for secondary 80 MHz in normal
mode.

Add and populate fields for pri80 indication, one intended for primary
80 MHz/Agile and the other for secondary 80 MHz.

CRs-Fixed: 2524733
Change-Id: If592d664cebfe1e08026e55d4031c74d9a9db2e0
2019-09-28 23:41:01 -07:00
Edayilliam Jayadev
499d29e713 qcacmn: Add API to get center frequency of sec80 seg
Add helper API to get the center frequency of secondary 80 MHz
segment. Make this API available to Spectral target if layer
via rxops.

CRs-Fixed: 2523690
Change-Id: If1cad90d9b27d1461e802b921aecda07031b1e0b
2019-09-11 18:40:28 -07:00
Krishna Rao
851c69d5bb qcacmn: Rename and use macros for operations on sscan summary
Rename some of the functions and structures related to Gen3 Spectral
summary report to clarify which type of Spectral report they operate
on. Use macros instead of hard coded values to specify size and
position of some fields while extracting them from Gen3 Spectral
summary report.

CRs-Fixed: 2518700
Change-Id: I9d646b60bc5314b408b39a7a118162af8d8fc7b2
2019-09-06 10:19:30 -07:00
Edayilliam Jayadev
f2ae8b7e11 qcacmn: Add Spectral parameter properties
For each parameter for each mode add a flag which
indicates whether that parameter is supported.
Similarly one more flag which indicates whether a
parameter needs to have same value for all the modes.

CRs-Fixed: 2500514
Change-Id: I37099bb622d7d6ccf823f78f6d119b9abf78ec21
2019-08-29 12:51:40 -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
Shiva Krishna Pittala
71bc664165 qcacmn: Add a callback to the FW assert function in Spectral module
As Spectral module is loaded before qca_ol module and the FW assert
function is compiled in qca_ol module, FW assert function will be an
unknown symbol when used inside Spectral module.
To fix this, register a callback to the FW assert function and
use that callback in Spectral module.

Change-Id: I6ca18b151e86b93de9988bc6026894617f2168a2
CRs-Fixed: 2507522
2019-08-14 14:30:26 -07:00
Edayilliam Jayadev
151c4bb3d6 qcacmn: Extend timestamp WAR for agile mode
Target will be sharing the time taken for reset in the
first Spectral report after reset. The reset delay value
is common for all the Spectral modes. Host updates
the timestamp WAR offset variable for all the Spectral modes.

CRs-Fixed: 2504798
Change-Id: If7d47a434054f220b0717f7d8939f9f8922af30f
2019-08-11 02:11:44 -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
Himanshu Batra
29bc991911 qcacmn: Replace void * wmi_hdl with abstract type (2/10)
Replace void * wmi handle with abstract type handles
provided by wmi component.

Change-Id: Id12d6446aed8fd389b8677f08765bb31cabf2fb0
CRs-Fixed: 2475444
2019-07-18 01:07:23 -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
64e320b697 qcacmn: Bound check while setting Spectral params
Do bounds check for some Spectral params and throw an
error in case of any out of bound inputs.

CRs-Fixed: 2449740 2449704
Change-Id: Ibc3159267076fa355ab3e50f2d8b0b1524ae444c
2019-05-21 16:45:23 -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
Dustin Brown
340c627dcf qcacmn: Remove os_timer_t
os_timer_t is a legacy wrapper around the kernel's timer_list type, and
is incorrectly used directly with qdf_timer APIs. Remove os_timer_t,
replacing instances with qdf_timer_t instead.

Change-Id: I410b7fafad18be01141008b6220fbe34ab07601e
CRs-Fixed: 2388575
2019-02-01 20:11:54 -08:00
Shiva Krishna Pittala
66ae9bef51 qcacmn: Check whether Spectral is disabled upon setting rxchainmask
When Spectral is disabled via INI and the rxchainmask is set for
the radio via iwpriv/cfg80211tool, it results in null pointer access
of target_if_spectral pointer. To fix this, add Spectral feature check
inside target_if_spectral_set_rxchainmask.

Change-Id: Ibd43d3bbc8622d4b8502653b55511bb4667cec7a
CRs-Fixed: 2380653
2019-01-23 21:46:39 -08:00
Edayilliam Jayadev
4c002343ad qcacmn: Time stamp WAR for spectral
Spectral HW time stamp gets reset when a reset happens in
within target. This can potentially result in unpredictable
behaviour during classification. To mitigate this calculated
offset is added to the time stamp value in the FFT report.

HT = Spectral HW timer
AT = Actual time stamp in spectral report
CF = Time stamp correction factor
CT = Corrected time stamp
L = Time stamp in the last FFT report before reset
F = Time stamp in the first FFT report after reset
D = Time gap between the last spectral report before reset
    and the end of reset(This is provided by FW via direct
    DMA framework)

                         ***Target Reset***
                                 ^
                                 |
                            |<---D---->|           time line--->
       _______________________________________________________
       ^                    ^          ^  ^
       |                    |          |  |

HT --> 0                    L          0  F

AT --> 0                    L             F

CF --> 0                    0           (L+D)

CT --> 0                    L          (F+L+D)

Spectral driver corrects the time stamp received from target
using the following formula and sends upwards.

CT(Corrected time stamp) = AT(Actual time stamp) +
                           CF(Correction Factor)

Calculation of Correction factor (CF):-
---------------------------------------
Initialization : CF = 0
CF += (L + D) (Done only for the first spectral report after reset)

This scheme takes care of the wrap around in the 32 bit time stamp
which would have occurred if the timer was not restarted due to
target reset.

CRs-Fixed: 2356382 2355486
Change-Id: I17b55d39eb91eb03b867bcfddaf3eb03d1fc5d1b
2018-12-24 03:32:52 -08:00
Edayilliam Jayadev
db29e57ef8 qcacmn: remove CONFIG_WIN from Spectral module
Remove CONFIG_WIN macro from Spectral module.

CRs-Fixed: 2369720
Change-Id: I67154341497230c66b3c3f5a09894c8b2eff8bff
2018-12-21 10:05:32 -08:00
Edayilliam Jayadev
919727378d qcacmn: Remove duplicate assignment of default values to Spectral params
Remove duplicate assignment of default values
to Spectral params.

CRs-Fixed: 2364567
Change-Id: I77d69c2707ca4295bfdac0ebdb49883c4544f61f
2018-12-13 16:45:58 -08:00
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
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
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
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
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
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
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