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
a. Enable DDMA support and FFT bin length adjustment SWARs
b. Similar to QCN9000,
Skip 16 bytes of unused padding added after Spectral summary report
FFT report header length is 24
Change-Id: I870f198511771dccbb0300ff62fc15ab0d64ee7f
Host maintains a flag variable for ensuring that the start scan
response WMI event is received from FW before the spectral reports.
Following are the expected sequence of operations.
1) is_resp_event_received = false
2) start scan WMI command
3) start scan response WMI event
(is_resp_event_received is set to true here)
Current sequence of operations are the following.
a) start scan WMI command
b) is_event_received = false
If the start scan response WMI event is received in between a) and b)
there is a possibility that the flag is_resp_event_received is overwritten
to false by b). This can lead to an assert during the spectral
report processing.
CRs-Fixed: 2708320
Change-Id: I18020bf866b9cb3a3cc64df56398d751c91dd2f2
For agile scan request in 80 + 80 MHz check whether the user given
agile frequency forms a valid 80+80 channel.
CRs-Fixed: 2690964
Change-Id: Ia374333118d4f06861a1cfe0a75db349bca9e879
spinlock is not released in one of the exit paths
of target_if_start_spectral_scan function.
Fix it by releasing the spinlock before return.
CRs-Fixed: 2699762
Change-Id: I012c4151b3968ffbedb68eba64b30bc4c08cf44f
Add sanity check in function target_if_init_spectral_capability
to avoid null-ptr-deref read issue.
Change-Id: Iccd79051ee8294f421704eadbedf6c9d9bf9a7b9
CRs-Fixed: 2692688
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
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
Populate number of Spectral detectors per BW in the
Spectral capability vendor command response.
CRs-Fixed: 2659587
Change-Id: I2eba5df02a5f70556d65e689aece1f0fbd8bba93
Initialize FFT bin boundaries of primary 80 MHz, 5 MHz
and secondary 80 MHz based on the relative position of
primary 80 MHz and secondary 80 MHz segment.
CRs-Fixed: 2653675
Change-Id: I0c9f1fbb55d1023b437c9787e753f3e154b5e08e
When 'err' is null pointer, QDF_ASSERT(0) will not return
directly, then null pointer reference will occur. To fix this
issue, return failure when 'err' is null pointer.
Change-Id: I5912571795ae55c6729ae06d5e06496598c21fbb
CRs-Fixed: 2642581
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
Initial changes for ipq5018 compilation.
Added device ID and target type checks for ipq5018 traget.
Change-Id: Ib86a371fbe66749fcb6d114e7a4a9931b684e03d
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
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
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
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
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
Modularise the logic of FFT bin length adjustment SWARs and
Spectral FFT report logging logic.
Change-Id: Ia1382e3bdd78589c5192263d23e31bc74e2bfbbd
CRs-Fixed: 2599080
Add a new member to SAMP structure describing the channel width of
Agile Spectral scan.
Change-Id: Ib27fe9ed63bf8f89c59762150fb58943e6bcf7ea
CRs-Fixed: 2582670
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
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
Till a FW advertisement which specifies the properties of
Spectral parameters is in place hard code these values
in driver.
CRs-Fixed: 2569385
Change-Id: I02c042946ff30771df6a66f49004c01aa5d53ac0
Reject Agile Spectral scan request if the current chainmask
doesn't have Agile capability.
CRs-Fixed: 2565027
Change-Id: I0ac79f9846ef015ec16500ae29528c8e5d03da3e
1) Add Spectral scan mode and agile center frequency in WMI
commands to indicate the current mode.
2) Obtain the Agile Spectral capability from the chain mask table.
CRs-Fixed: 2455967
Change-Id: I88ba6fc1ecf9b530a6b516d0c1e4ce88702c6d1f
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
Validate user provided agile center frequency and throw
an error if it is invalid.
CRs-Fixed: 2529280
Change-Id: Ibb43dda98d29d8bc8360d1a204c67b64ca987ca6
Reject Agile Spectral start scan request from user
space if Agile DFS is running on one of the pdev.
CRs-Fixed: 2517517
Change-Id: If648c53946d1bca1de07a335db67f204de41ba5f
Check whether Agile span overlaps with the current
operating span. This check is done at the time of
start scan and Spectral parameter setting.
CRs-Fixed: 2521554
Change-Id: I9f28ca0a02bd5abf6acdff89301a0c9343e34887
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
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
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
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
Add device ID change and target type checks for pine.
Also remove memory war added for Hk emulation.
Change-Id: Idf531a48a03202d4fb241a92a1d671ee2b94cfbd
CRs-fixed: 2453899
Add Spectral frequency to functions which log read and write of
Spectral parameters.
Change-Id: I7c66676df4667d1a7b7b46fcf33e4c10815c4b28
CRs-Fixed: 2502703
Spectral scan for QCA6018 failed due decoding the FFT bin in 2 bytes.
HWS team confirmed that for QCA6018, the FFT bin is in 4 bytes
representation.
Fixing this by modify the fftbin size WAR for QCA6018 to decode
4 bytes FFT bins.
Change-Id: I60e07370f7191544269d52640ae072f2a41f3833
CRs-Fixed: 2487055
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
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
Before sending Spectral stop WMI to FW check whether Spectral
scan is in progress. When all vdevs are in down state host driver
will send a stop Spectral scan command to FW. In that scenario there
is a possibility that stop Spectral scan WMI message may go to FW
even though Spectral scan is not active. To prevent this we add a check
in stop Spectral scan routine to send WMI message only if
scan is in progress.
CRs-Fixed: 2424020
Change-Id: I2119935759c40f62df75574b6a29174973f2703f