커밋 그래프

231 커밋

작성자 SHA1 메시지 날짜
Edayilliam Jayadev
95bcc4cdfe qcacmn: Change the magic pattern to indicate the blanking
Change the magic pattern to indicate blanking from 0xdeadbeaf
to 0xc0debeaf.

Change-Id: Ifc72e0afe35e9f49fb27f4d5fb674af81231e196
CRs-Fixed: 3471929
2023-04-28 03:07:03 -07:00
Kannan Saravanan
e11f459ade qcacmn: Pebble bring-up changes in Umac and target_if layer
Add device Id and target type checks for qcn6432 target
compilation
Add CFR and spectral support for QCN6432

Change-Id: Ic908fa768aa1be7cfc40be7fcc7f9ca6aa85aaa6
CRs-Fixed: 3351747
2023-04-20 04:59:28 -07:00
Jhalak Naik
e7058a73c6 qcacmn: Fix invalid memory access
Fix the spectral mode check to avoid invalid memory access.

Change-Id: Id95cf19457aa2eddee90568fa567e5f7859a0a53
CRs-Fixed: 3452841
2023-04-04 19:51:50 -07:00
Jeff Johnson
abbb3f3b9d qcacmn: Fix target_if/spectral documentation
The kernel-doc script identified documentation issues in the
target_if/spectral folder, so fix them.

Change-Id: I0bb7d3632fd602450713d8521861d246ea5f33df
CRs-Fixed: 3417470
2023-03-07 14:49:59 -08:00
Edayilliam Jayadev
7f60898cfc qcacmn: Fill "blanking status" field of SAMP message
Extract the blanking status from Spectral reports and upload
it to user space via SAMP message.

CRs-Fixed: 3413925
Change-Id: Ib033b88190be6bca3dff903cf279a9883821fb10
2023-03-02 14:50:16 -08:00
Edayilliam Jayadev
bbede4e20d qcacmn: Add "blanking status" field in SAMP message
Add "blanking status" field in Spectral SAMP message.

CRs-Fixed: 3407155
Change-Id: I488a78cc06518a34b1adcf3db6ad4b3133115e9a
2023-02-21 23:59:59 -08:00
Linux Build Service Account
b6eaaa8940 Merge "qcacmn: Guard Spectral report processing with spinlock" 2023-02-09 16:44:04 -08:00
Jhalak Naik
40c8de4f24 qcacmn: Guard Spectral report processing with spinlock
There is a possibility of Spectral being stopped by user
while a report is being processed, this can lead to the data
structures becoming invalid leading to an error.
Guard API target_if_consume_spectral_report_gen3 with
spectral_lock to avoid this, and allow Spectral scan to stop
only when the ongoing report has been processed.

Change-Id: I617f66e3c5b45323f8c88e9e5e173b139a8a9241
CRs-Fixed: 3376179
2023-02-07 17:22:20 +05:30
Prakash Manjunathappa
3cde321196 qcacmn: Add PEACH device support
Add support for peach device. Add peach conditional statements.

Change-Id: Ia107e60fd00b4938984414fd92d6699d11fd3797
CRs-Fixed: 3394198
2023-02-07 00:54:44 -08:00
Edayilliam Jayadev
629e231541 qcacmn: Initialize detector id to mode table for QCA5332
Initialize Spectral Scan detector ID to Spectral mode table for
QCA5332. Detector ID 1 and 2 are not supported for QCA5332.

CRs-Fixed: 3366784
Change-Id: I7fe9b53819c649455a67957827e4f900e39257e0
2023-01-05 14:31:01 -08:00
Priyadarshnee Srinivasan
7ef4c7a634 qcacmn: Add input puncture bitmap to channel search API
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
2022-10-26 01:16:27 -07:00
Kannan Saravanan
a73234426a qcacmn: Initial changes for york bring-up in target_if layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: Ic28edc568c09aa5d43ba71393eca26479dd49463
CRs-Fixed: 3282639
2022-10-18 10:08:34 -07:00
Jeff Johnson
c359185095 qcacmn: target_if: Fix misspellings
Fix misspellings in target_if/...

Change-Id: I405f4c709ffd70b1927970ebd51a215c49f6dc88
CRs-Fixed: 3304693
2022-10-07 22:42:16 -07:00
Asutosh Mohapatra
9ab40cb89e qcacmn: Fix uninitialized var ptr issue and null check for num_pscos
1.This change fixes the use of uninitialized
variable in host driver.

2.Adds NULL check for num_psocs in mlo_peer_calculate_avg_rssi to
avoid undefined behaviour.

Change-Id: Ifbfef42b5930dfe15736a75a74e81155c5f1fbce
CRs-Fixed: 3297794
2022-10-06 00:22:18 -07:00
Shiva Krishna Pittala
2bef7708b1 qcacmn: Stop the spectral scan at the end of last report in finite scan
In the case of finite Spectral scan, the spectral scan will be stopped in
the target once the requested count of spectral reports got generated.
The Host will not be notified of this stop scan. To synchronize the Host
data structures in accordance with the target, we explicitly stop the scan
once the last report is received. In the current implementation, the
stop_scan() is called at the beginning of the last report processing and
we continue processing the last report. As part of the last report
processing, we could access the data structures that were reset during
the stop_scan(). To fix this, stop the spectral scan at the end of the
last report processing.

Change-Id: Iecfa4e72ccbedae77ee2a57e9283910e980121d5
CRs-Fixed: 3287136
2022-09-19 01:49:32 -07:00
Sajini R
7c7742990b qcacmn: Initial changes for IPQ5332 target compilation
Added device ID and target type checks for IPQ5332 target
compilation.

CRs-Fixed: 3273865
Change-Id: I98a768394cc539549fc41d756c9c9d90034627f5
2022-09-16 11:52:44 -07:00
Sreeramya Soratkal
057bd5f570 qcacmn: Remove unused local variables in spectral module
Remove unused local variables in the Spectral module to
address the compiler warnings.

CRs-Fixed: 3272706
Change-Id: I91c806a9bd6413eb559992a0b184d8bd9c4ea4d0
2022-08-26 14:21:26 -07:00
Naveen S
e86fc7ebe9 qcacmn: Removing error value return on event registration failure
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
2022-08-03 01:34:40 -07:00
Shiva Krishna Pittala
caa7965659 qcacmn: Update the Detector ID to mode table based on FW_PARAMS event
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
2022-07-27 01:59:24 -07:00
Shiva Krishna Pittala
98b4eee3ac qcacmn: Add support to build Spectral detector list for split-PHY mode
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
2022-07-27 01:59:16 -07:00
Shiva Krishna Pittala
3567bb3b57 qcacmn: Add support to process Spectral capabilities event
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
2022-07-22 07:00:18 -07:00
Srinivas Girigowda
6d056b9959 qcacmn: Add support for Mango device id
Add support for Mango device id.

Change-Id: I2b32a39e258caab408723db77f132af364dc6b04
CRs-Fixed: 3232512
2022-07-02 09:55:56 -07:00
Divya R
33e3e1d6a8 qcacmn: Initialize the chan_params structure
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
2022-06-01 01:45:37 -07:00
Shiva Krishna Pittala
80edcddb01 qcacmn: Spectral init path changes for QCN9224
Add the Spectral init path changes required for Waikiki.

Change-Id: I6c6bb826ff4ce02988560100b187fe1acffa3f7d
CRs-Fixed: 3160798
2022-05-05 01:21:04 -07:00
Shiva Krishna Pittala
eb29b7fac2 qcacmn: Don't use packmode_fftbin_size_adj WAR for QCA9574
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
2022-04-22 06:10:19 -07:00
Bing Sun
37a48b157f qcacmn: provide is_create_punc_bitmap when generateing puncture
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
2022-04-08 01:57:29 -07:00
Shiva Krishna Pittala
aeb2ffde14 qcacmn: Add stats in Spectral report processing path
Add the following stats.
 - Number of Spectral events received from the target
 - Number of consume_spectral_report() invocations
 - Number of fill_samp_msg() invocations
 - Number of SAMP messages that are ready to be sent to the user-space
 - Number of SAMP messages queued to the user-space

Change-Id: I53fda4b309620043a77bc2bc87573941d7fb0bcb
CRs-Fixed: 3156151
2022-03-23 13:01:40 -07:00
Jhalak Naik
055dfbe881 qcacmn: Add Host support for Spectral FFT recapture
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
2022-03-09 06:51:27 -08:00
Jhalak Naik
24174b7be8 qcacmn: Add support for Spectral FFT recapture config
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
2022-03-04 13:45:00 -08:00
Abhijit Pradhan
3f95481d0e qcacmn: Add powermode APIs under a new macro
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
2022-02-28 12:57:10 -08:00
Hariharan Basuthkar
e7b559d010 qcacmn: Replace reg curchan with 6g ap power based chan list
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
2022-02-28 12:57:03 -08:00
Shiva Krishna Pittala
0878b6eaf9 qcacmn: Fix FFT bin values for pack mode 0
While copying FFT bins from the target, Spectral Host driver reads
one DWORD (32-bits) at a time and extracts FFT bins out of those DWORDs.
This extraction uses standard bit shift and mask operations as below.

    #define QDF_GET_BITS(_val, _index, _num_bits) \
                    (((_val) >> (_index)) & ((1 << (_num_bits)) - 1))

For a chipset that uses pack mode 0 i.e., packs 1 FFT bin per DWORD,
_num_bits in the above operation will be 32. So, we try to left shift the
integer constant '1' by 32. If the integer constant is represented by
32-bit integer, we could have issues in the result of shift operation.
As per C standard, the result of shifting an operand by a count greater
than or equal to width (in bits) of the operand is undefined.
This is because some platforms could optimize the shift operation by
masking the shift count to 5 bits. That means, the shift actually
performed is 32 & 31, which is 0.

Fix this by using 64-bit integer constant '1' in the above operation.

Change-Id: Ic7fe4de7917f3069d78a2ff29d86009cbf381e3f
CRs-Fixed: 3125158
2022-02-14 12:46:05 -08:00
Jhalak Naik
2588f440fb qcacmn: Fix synchronisation between process and tasklet contexts
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
2022-02-13 22:01:54 -08:00
Wu Gao
8d1d470a91 qcacmn: Enable spectral scan support for HMT
This change enables spectral scan support for HMT.

Change-Id: I031dd2392b39aebb9281e7dbf42132b5dc150f25
CRs-Fixed: 3118332
2022-02-01 08:55:51 -08:00
Shiva Krishna Pittala
a9948f7e23 qcacmn: Fix fft end bin index for Spectral report modes 0 and 1
For reports modes 0 and 1, the number of FFT bins in a detector will be 0.
We calculate end_bin_idx as start_bin_idx + num_bins - 1.
When start_bin_idx is 0 for these report modes, end_bin_idx will be -1.
Since bin indices are unsigned integers, end_bin_idx becomes a very big
value and we will try to copy unintended large number of bytes.
Fix this by forcing end_bin_idx to start_bin_idx when num_bins is 0.

Change-Id: I11e5dd673fc95a1ce3823ef977fd70c34a4ec67e
CRs-Fixed: 3096955
2022-01-28 00:54:00 -08:00
Jhalak Naik
8f5372788b qcacmn: Add the spectral detector map valid flag per scan mode
For per-session detector map, maintain a different
det_map_valid flag for Normal and Agile spectral scan
mode.

Change-Id: I5a2a0253624a393feba966641d518e59a48f4a8a
2022-01-26 23:23:12 -08:00
Shiva Krishna Pittala
a739a0cabb qcacmn: Add support to extract FFT size capabilities
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
2022-01-09 23:10:04 -08:00
Shiva Krishna Pittala
861c4e29aa qcacmn: Add support to extract sscan bandwidth capabilities
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
2022-01-06 10:40:06 -08:00
Shiva Krishna Pittala
a9547b0f25 qcacmn: Add support to extract fixed params from Spectral Caps event
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
2021-12-28 06:43:12 -08:00
Edayilliam Jayadev
31da41ae4e qcacmn: Clamp the FFT bin values before filling SAMP message
Each FFT bin value is represented as an 8 bit integer
in SAMP message. But depending on the configuration,
the FFT bin value reported by HW might exceed 8 bits.
Clamp the FFT bin value between the min and max value
which can be represented by 8 bits. For linear mode,
min and max FFT bin value which can be represented by
8 bit is 0 and U8_MAX respectively. For dBm mode,  min
and max FFT bin value which can be represented by 8 bit
is S8_MIN and S8_MAX respectively.

CRs-Fixed: 3056458
Change-Id: I9ec75f781a130d3ed0d0d9393975fd5874961ce0
2021-11-02 14:56:21 -07:00
Wu Gao
9fba485d3c qcacmn: Check function pointer to avoid NULL point dereference
It calls spectral_process_phyerr of spectral operations without any
check. Which cause null point dereference potentially. So, check this
pointer before calling.

Change-Id: Iae246f847dd41e62b628223652a9527a65b43799
CRs-Fixed: 3055246
2021-10-15 15:32:08 -07:00
Shiva Krishna Pittala
de13832745 qcacmn: Populate and expose 320MHz spectral capabilities
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
2021-10-13 02:57:24 -07:00
Shiva Krishna Pittala
409ffbfda0 qcacmn: Pass report parameters to FFT bin byte swap function
Pass report parameters to FFT bin byte swap function instead of
FFT bin length adjustment WAR.

Change-Id: I02a280bc4e8e0839c894a70258e1f16a784c08a6
CRs-Fixed: 3051559
2021-10-11 02:35:48 -07:00
Shiva Krishna Pittala
61f4418d7a qcacmn: Add support to process spectral scan detector info tlv
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
2021-09-30 18:16:42 -07:00
Shiva Krishna Pittala
e991ce3cdd qcacmn: Add support to process spectral scan chan info TLV
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
2021-09-30 18:16:37 -07:00
Shiva Krishna Pittala
d36115b849 qcacmn: Big-endian mode changes for Beryllium Spectral
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
2021-09-30 06:27:26 -07:00
Jhalak Naik
b65b4ae703 qcacmn: APIs to convert phy_ch_width to nl80211_chan_width and vice-versa
Add Spectral APIs to convert channel width values
from enum phy_ch_width to nl80211_chan_width and
vice-versa.

CRs-Fixed: 3029184
Change-Id: I60fb7fb04b943b0d70c569ff6587e5e8efd7722b
2021-09-29 15:05:37 -07:00
Shiva Krishna Pittala
8e8df4a411 qcacmn: Populate the list of supported sscan bandwidths and detectors
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
2021-09-29 12:42:32 -07:00
Debasis Das
db135c6eac qcacmn: Fix use of uninitialized variable in phyerr processing
Initialize the variable "segid" to prevent the usage of junk value.
Dont dereference the spectral-lmac object if the same is NULL.

Change-Id: I5206a99017f77e5c94368d91171a7eb05745933c
2021-09-29 08:59:22 -07:00
Shiva Krishna Pittala
e5255c7253 qcacmn: Populate supported FFT sizes for Beryllium Spectral
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
2021-09-28 03:43:28 -07:00