Add a new API free_samp_msg_skb(), to free
SAMP msg buffer, if error in phyerr processing
for 160/80p80 MHz modes. Call this API from
reset_160mhz_delivery_state_machine(), to
avoid redundancy.
CRs-Fixed: 2961987
Change-Id: I3a0488997e474fef6f4f57e3fbfd1a163c91ac7b
Add API target_if_spectral_populate_samp_params_gen2() to
populate fields in target_if_samp_msg_params, using
search fft report and target_if_spectral_rfqual_info
fields.
CRs-Fixed: 2961986
Change-Id: Iad970483f6183d2e52d97e6c3ddf8f146845fbe4
Modify struct target_if_samp_msg_params to only include
fields to fill the new SAMP message format, which
are not present in the per-session report-level
info and detector map structures.
CRs-Fixed: 2961956
Change-Id: I54f69bb63c5b64a59cb83b9f205c74c83475fc14
Add sscan_detector_list struct to store the number
of detectors and detector list for a given Spectral
scan mode and channel width, based on the target type.
Initialize this struct during target_if_pdev_spectral_init.
CRs-Fixed: 2961954
Change-Id: Ia920438429579c096349a0170d15e288d46cf9a9
Add API target_if_spectral_get_start_end_freq to set
start and end frequencies in the per-session
detector level map, based on spectral scan
cfreq1/cfreq2 and operating BW.
API target_if_populate_detector_start_end_freqs handles
population of the start and end frequencies per-detector,
in a session.
CRs-Fixed: 2961957
Change-Id: I68a052db6643d92c22e7ee671f4e46af33c2fa08
Replace numerical values with macros, for indicating
position and size of Spectral FFT report fields, in
target_if_consume_sfft_report_gen3().
Change-Id: I81994ebb0d642bc4cbebe2b24aabcae567ae6a9c
CRs-Fixed: 2945319
Modify prev_tstamp variable in target_if_spectral
structure to an array and index it based on detector ID.
Also, modify target_if_spectral_verify_ts() to include
detector_id parameter and compare current timestamp with previously
received sample on per-detector level, to check discrepancy.
Change-Id: I9f6382909ac0661323db54f160f1350cb8bd8153
CRs-Fixed: 2945318
Add target_if_spectral_get_num_fft_bins() to find the
number of FFT bins, from the Spectral FFT size.
It will adjust the number of FFT bins according to
Spectral report mode.
Change-Id: I8f81f2b784d71387f951c38701af6cf4443246e0
CRs-Fixed: 2945316
Find the last_raw_timestamp and adjusted_timestamp
as part of the FFT report processing API.
Change-Id: Ibc7fd524ca897ead3b4b8ca25ba6e6487154305d
CRs-Fixed: 2945307
Add a new API target_if_fill_samp_msg, to populate
the Spectral SAMP message and detector level
information, using pdev_spectral_det_map
and per_session_report_info. Send the SAMP message
to upper layers when completely filled.
Change-Id: If43494fe4a09dbfeb9aea6cb0fa20b406d81e390
CRs-Fixed: 2945282
A state machine checks if spectral reports are
in order for gen3 spectral 160/80p80. Currently,
this state machine has four states.
Modify this state machine to have only two states and
change associated APIs accordingly.
Change-Id: I754758fdf0529394c63fe371f54db79d52459999
CRs-Fixed: 2945161
Define a map with per-detector information, that is
keyed by the detector ID from Spectral FFT report.
Use per-detector information from this map to fill
the Spectral SAMP message.
Define struct per_session_report_info, for per session
info that needs to be filled at report level within
SAMP message.
Change-Id: I9f73bd904cc3d4cac42d21b89b1ceb586da7f911
CRs-Fixed: 2945158
Modify the API to include Validation and
processing of Spectral search FFT report.
This will be under OPTIMIZED_SAMP_MESSAGE flag, which
is unset by default for all profiles, till
development is complete.
Change-Id: I250867e2c002f491f51a36416ea9ca5ae0bc5508
CRs-Fixed: 2945132
Modify target_if_consume_sscan_summary_report_gen3() to
include validation and processing of Spectral summary
report.
This will be under OPTIMIZED_SAMP_MESSAGE flag, which
is unset by default for all profiles, till
development is complete.
Change-Id: Ice88b8e74ed714515f21b9b232aa0088fbb54d1d
CRs-Fixed: 2945124
Change the get_target_if_spectral_handle_from_pdev() api to
non-inline for code size reduction.
CRs-Fixed: 2896467
Change-Id: Icb92643a9c0d85a1b4328cd0c516d6d771877a4f
If Spectral scan is disabled(agile and normal mode disabled)
skip init/deinit of Spectral module. Also avoid user requests
to configure/start/stop scan. If either agile or normal mode
is disabled block user requests for that mode alone.
CRs-Fixed: 2840335
Change-Id: I81148e5580fe4bf991b97cd086c8e3a9ca78e77d
Add utility APIs to check Spectral scan is disabled for
a given pdev/psoc/mode.
CRs-Fixed: 2840317
Change-Id: I6820cfc056c697434a138ddf9d8d93b5796a4722
Add APIs to check the agile and normal Spectral scan
capability of the target. This information is derived from
the advertisements from halphy via WMI events.
CRs-Fixed: 2840227
Change-Id: I2aae79b3342d8d74a1f4c00e813cae843a71106a
WLAN chip components are little-endian based. When such a chip is attached
to a big-endian Host platform, there will be a mismatch in the order of
bytes for the data that is transferred between the Host and target.
Spectral HW module transfers the Spectral report directly to the Host DDR.
This transfer doesn't go through any byte-order conversion at the HW side.
So, to avoid invalid reads at the Host side on a big-endian platform,
convert the Spectral report to the Host byte-order before using it.
Change-Id: I742537f3a95ffca2e12b83535e83e2870ad06b10
CRs-Fixed: 2838371
FFT bin values can span 10 bits for HKv1, HKv2 and Pine.
This change is to cap the values to 8 bits for such case
on these platforms.
Change-Id: I144b00b1ed21a3281f79050bb1ab63bd857e47b1
CRs-Fixed: 2804192
wmi_unified_register_event return QDF_STATUS
Handle same return type in caller function
CRs-Fixed: 2764185
Change-Id: I87b1e6ee5e06e4e6af81395d977595335fe0bc5c
When user programs a non-zero scan count(say N), after receiving N
samples Spectral scan is supposed to be stopped. This change keeps track
of number of Spectral reports received from target and stops the
Spectral scan when programmed number of samples arrives at host.
CRS-Fixed: 2764935
Change-Id: Ibea0eeece4577fd6e0da302716869b05c900f917
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
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
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
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
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
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
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
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
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
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
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
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
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
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