Add input_punc_bitmap to struct ch_params.
Add input puncture bitmap to regualtory channel search APIs.
The non-SP channels will be punctured by ACS module so that AP
can come up in highest possible BW in Standard Power mode
with the given primary frequency. These punctured channels are not
validated (whether supported in the given power mode of operation) by
the regulatory.
CRs-Fixed: 3278013
Change-Id: I56b0495be902fd92fc6da26e1007d60f930ba687
Remove unused local variables in the Spectral module to
address the compiler warnings.
CRs-Fixed: 3272706
Change-Id: I91c806a9bd6413eb559992a0b184d8bd9c4ea4d0
WMI_SPECTRAL_CAPABILITIES_EVENTID registration returns QDF_STATUS_E_FAILURE
on failure which is not required as it is causing crash on failure where
event registration is failing i.e., Hawkeye + Swift
Change-Id: Id11d76941b12d0ee249d8f6e86612b351b732d78
CRs-Fixed: 3255827
Currently, we are hardcoding the detector ID to mode table for different
chipsets. Starting QCN9224, the target sends information regarding the
detectors participating in that Spectral session in the FW_PARAMS event.
Use that to update the Detector ID to mode table.
Change-Id: Ic09358e0c3b9ac0166b39f5ce445a83697146d4a
CRs-Fixed: 3253076
Currently, the Spectral detector list building logic assumes that only
5 GHz or 6 GHz participates in SBS modes. With Split-PHY mode in QCN9224,
even a 2.4 GHz radio can participate in SBS mode.
So, consider this case as well while building the detector list.
Change-Id: I99c841584c52785e94c8ee1b0d59494cbdd37f42
CRs-Fixed: 3252986
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the target SW to
indicate the different capabilities of the Spectral HW.
Add support to process this event and extract the capabilities.
Change-Id: I03b3236b6def98d24e77b2a9ea51ee866e62e6fe
CRs-Fixed: 3238450
chan_params structure is uninitialized, due to which variables
inside the chan_params structure have garbage values.
To avoid this, initialize the chan_params structure.
Change-Id: Ic09c0a2d24c2a1eac8f076c7bbd4d25d147370fd
CRs-Fixed: 3205502
packmode_fftbin_size_adj is used when the reported FFT bin length from
HW is twice the actual size. This issue is fixed in HW from Pine onwards.
So, don't use this WAR on QCA9574.
Change-Id: I43a4bcb6f238fac6a14c1f6459d7ad24a7a99b2d
CRs-Fixed: 3165085
Puncture is one of 11be feature. Even 11be compile macro is defined,
Dut can start AP with non-11be mode. Regulatory component has no idea
whether it should consider puncture or not. Puncture should be a
configurable parameter from caller.
When updating channel state, puncture should be considered for 11BE
AP. is_create_punc_bitmap should be set in struct ch_params and pass
it to reg_get_5g_bonded_channel_state_for_pwrmode.
Change-Id: I96fb131f2df201a827ab7d98ca099a38b008e0d3
CRs-Fixed: 3160259
Add support to receive the fft_recapture arg value
from spectraltool, handle the FFT recapture config and
pass this to FW. The recapture feature must be
enabled only for spectral scan period > 52 us and
Normal Spectral scans.
Change-Id: Ied637704d25bb15bff2139a215da7481d4f80e4f
CRs-Fixed: 3140890
Add support to handle the FFT recapture config and
pass this to FW. The recapture feature must be
enabled only for spectral scan period > 52 us and
Normal Spectral scan.
Change-Id: I6b92fcd674ae95bcd0a23892ef9ccc6ba487d6ad
CRs-Fixed: 3140890
Use CONFIG_REG_ 6G_PWR_MODE for the new API.
Use "_for_pwrmode" as suffix for the new functions.
Change-Id: I9b84944a59062277b76bc48877c47ea5afada0ec
CRs-Fixed: 3133023
The consumers of the current channel list may want to search through 6G
channels that are not part of current channel list and belong to channel
list of different power mode.
Therefore, replace the regulatory current channel list with that of 6G
power based channel list.
Change-Id: Ie2ff8bbfb50a5f95f584b134b18246cb28b1c406
CRs-Fixed: 3110987
Currently, qdf_spin_lock/qdf_spin_unlock is used to protect
spectral_lock. This can lead to a deadlock when the process
context is holding the lock and gets pre-empted by the tasklet.
To avoid this use qdf_spin_lock_bh/qdf_spin_unlock_bh.
Change-Id: Ibd2be7b7f3faf2dea9d7df8d6468c7a8fda512f2
CRs-Fixed: 3124199
For per-session detector map, maintain a different
det_map_valid flag for Normal and Agile spectral scan
mode.
Change-Id: I5a2a0253624a393feba966641d518e59a48f4a8a
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicate different capabilities of the Spectral HW.
Add support to extract the FFT size capabilities from this event.
Change-Id: I9640fa51e4249b9d1c2d9d3ac5da7f1d56c9d006
CRs-Fixed: 3098880
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicate different capabilities of the Spectral HW.
Add support to extract the sscan bandwidth capabilities from this event.
Change-Id: I6ff6e5a8d80271fa62a430c986f53a321d46c66b
CRs-Fixed: 3098832
WMI_SPECTRAL_CAPABILITIES_EVENTID event will be sent by the FW to
indicated the different capabilities of the Spectral HW block.
Add support to extract the fixed parameters from this event.
Change-Id: Ib13108f078de008b6a76a25a010e85a7fdb6f5fe
CRs-Fixed: 3098203
Populate and expose the following 320MHz spectral capabilities.
- Agile spectral scan support for 320MHz mode.
- Number of detectors used for spectral scan in 320MHz mode.
Change-Id: Ibea77d4ec8b1d9322ef82d1d48236836ffad24ec
CRs-Fixed: 3053059
FW sends Spectral scan detector info TLV in WMI_PDEV_SSCAN_FW_PARAM
event to indicate the information of a detector participating in a sscan
session. FW sends one TLV of this type for each detector participating
in a spectral scan session. Add support to process the TLV and update
the spectral host data structures accordingly.
CRs-Fixed: 3044193
Change-Id: Ie17b6ea9336ada7a00e4594fa2f7f49ef3d443e5
FW sends Spectral scan chan info TLV in WMI_PDEV_SSCAN_FW_PARAM_EVENTID
event to indicate the channel information for a spectral scan session.
Add support to process the TLV and update the spectral host data structures
accordingly.
CRs-Fixed: 3044162
Change-Id: Ibbf7f6bbbb267123bbdf44bcfffa2cfb1c2926df
On Beryllium architecture, PHY DMA applies a 32-bit byte swap to assist
in efficient Host reads when connected to a big-endian Host.
This is done to avoid byte swapping at the Host.
So, if the Host reads this data 32-bit word at a time, the byte order
would be intact. Report headers are not a problem because as they are
composed of 32-bit words. For FFT bins, read each DWORD at a time and
extract FFT bins out of that DWORD. Make this change in a generic way to
keep the design uniform across different chipsets and endian modes.
CRs-Fixed: 3042188
Change-Id: Idff1ac7eb5e18c692c9ee8b19b9ae9e6b962d486
Populate the list of supported spectral scan bandwidths for different
targets and use that in populating the detector list.
CRs-Fixed: 3042448
Change-Id: I5dac2c845843698bbafac64a01517acfbe120180
Beryllium chipsets support FFT sizes as follows for different sscan widths.
20MHz:- Min FFT size: 5, Max FFT size: 9
40MHz:- Min FFT size: 5, Max FFT size: 10
> 40MHz:- Min FFT size: 5, Max FFT size: 11
Populate these FFT sizes for Beryllium targets.
CRs-Fixed: 3042443
Change-Id: Id7052e3513b29789e96c351aa4cdede499ef2578
Add support to configure spectral scan bandwidth as provided by the user.
Validate the user configured value before applying it. As the spectral scan
bandwidth is an optional parameter, when the user doesn't configure it, use
configure the spectral scan bandwidth to the maximum value supported by the
target for the current operating bandwidth.
Also, populate the spectral scan bandwidths supported for different
operating bandwidths on different targets.
CRs-Fixed: 3042424
Change-Id: I266aa5489b0ce5c149968067a06e1cc65bb4e3b7
Add locks for detector list, per-session report info
and per-session detector map, to avoid inconsistent
concurrent accesses.
Using spin_lock_bh for locking between Process and
Tasklet context.
CRs-Fixed: 2983801
Change-Id: If709fd91f193072f07b9dae19bf48e6da2d369d3
It doesn't check smode before used as array index, the potential risk
is that OOB read or write once get invalid value from target. So, this
change checks smode value before using.
Change-Id: Ibc0625f43e31bc8b49694cca778726c6528290a8
CRs-Fixed: 3034136
As part of Spectral init, the Host sends DMA ring init command to
HALPHY. QCN9224 M2M emulation setups don't have HALPHY subsystem and
the WMI command need to be cleanly stubbed out in emulation FW image.
Until then, revert this Spectral init change.
Change-Id: I88e3e3995ee1b7103a03e4b6a38ff4117044c63c
CRs-Fixed: 3016633
In SBS modes, there are 3 detectors shared between 2 pdevs that are operate
in 5GHz band. Global number space is used for detectors across these pdevs.
Detector list should be following in SBS modes.
For the pdev that use PHYA0:
detector 0 for normal mode
detector 2 for agile mode
For the pdev that use PHYA1:
detector 1 for normal mode
detector 2 for agile mode
There is no direct way of knowing which pdevs are using PHYA0 or PHYA1.
We need to look at the phy_id of a given pdev and compare against other
pdevs on the same psoc to figure out whether the given pdev is operating
using PHYA1. Add the necessary support for the same.
CRs-Fixed: 2993772
Change-Id: I034fe64a7a8988e327a60684a0d008f4b22ef395
The per-session detector map is keyed by detector ID
from the Spectral FFT report and is only valid for one
session, ie. start scan to stop scan.
There is a possibility of receiving FFT report with
an invalid detector ID, for a particular session.
Due to this, invalid detector map information may get
accessed.
Verify that detector ID received in Spectral report is
valid for given spectral scan mode and channel width,
by checking the detector list.
Add a validity flag to the per_session_det_map, and check
whether detector map is valid for the detector ID used to
access it.
CRs-Fixed: 2998410
Change-Id: I1f38ae22b458bb1fea62b99422ec60095071b3c6
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
Fill per-session information in per_session_det_map and
per_session_report_info, with per-report and per-detector
level information, respectively.
These intermediate structures help in filling the
SAMP message.
Change-Id: Ib194fde3567ce76710e010febf729746fedf7a2c
CRs-Fixed: 2945297
Agile scans (preCAC/RCAC) use the Agile Engine which is also needed
for the Agile spectral scan. Hence, both cannot run at the same time.
Currently, if Agile preCAC is enabled, Agile spectral scan is not
started. Do not start the spectral scan if either RCAC is enabled or
preCAC is enabled.
Change-Id: I242c28c2c3f8872ceab6314dde80361c283d3ac1
CRs-Fixed: 2922250
When agile spectral frequency is 0 and user tries to start agile spectral
scan, 'A parameter is not initialized' message is thrown from user space
but that message is not enough to identify that agile spectral frequency
is not initialized. To address this, print an error message from driver
when Agile spectral frequency is 0.
CRs-Fixed: 2921000
Change-Id: Ibbb144a57774ad274b31015c7a04aa6097daf09f
In agile spectral scan scenario, if there is a chan switch,
it is possible for the new operating span to overlap with
the agile frequency, which results in erroneous outcome.
Make agile center freq 0 as part of every stop agile
scan. This ensures that a new frequency is mandated
as part of every agile scan.
Change-Id: I4531aa0636a62b918bace66098c2c287e72d55d3
CRs-Fixed: 2910449
Change the get_target_if_spectral_handle_from_pdev() api to
non-inline for code size reduction.
CRs-Fixed: 2896467
Change-Id: Icb92643a9c0d85a1b4328cd0c516d6d771877a4f
TLV targets advertises the agile Spectral capability in the
chain mask table of extended service ready event.
For legacy targets, mac phy capabilities, which holds the
chain mask table is null. This leads to a load time crash
for some legacy platforms. To fix this, initialize
agile Spectral as disabled for the targets which doesn't
support extended service ready message.
CRs-Fixed: 2854348
Change-Id: I09a64259b31e3e5eb0441f35dbb9451dec001780
Return type of "target_if_is_spectral_active" and
"target_if_is_spectral_enabled" is bool. Wrong return values
are send for this APIs in case of errors.
CRs-Fixed: 2845250
Change-Id: I2344676a1ada51e041bb5f7acac8aa22847bee5c
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