Commit Graph

70 Commits

Author SHA1 Message Date
Shwetha G K
cce26132ef qca-wifi: Add additional CFR parameters to metadata
Populate CFO, agc_gain_db and rx start timestamp params
from tx_peer_event to CFR host meta data.

Change-Id: Id299ea4bc44e58f2b954c953504d0a1df3937b6f
2021-01-04 16:11:49 +05:30
Adwait Nayak
e7c648c24b qca-wifi: Change return type to QDF_STATUS
Maintain harmony in return type as "QDF_STATUS"
for CFR related APIs.

Change-Id: I02378c9818b4282f8d874d8655bc9e2178a2479c
2020-10-19 08:17:09 -07:00
Shwetha G K
9671977820 qca-wifi: Relay failure status to userspace
Relay failure status as well to userspace

Change-Id: I5b96122da285eabc1a3ad96655461be9e8d29bee
2020-09-17 05:41:35 -07:00
Neha Bisht
51208bccfa qca-wifi: Remove Wno-format flag while compilation of driver
To get formating errors at compile time, removing Wno-format flag
while compilation of driver and also handling associated errors.

Change-Id: I6e99385b583fb1e5e15e7d1aab0fcd8eede08b3c
2020-09-06 20:39:04 -07:00
Adwait Nayak
c6fd0e790d qcawifi : Allocate lut based on number of DBR entry
In case of low memory, it could be difficult to allocate luts at
once. So, allocate lut based on number of DBR entry and
split memory allocation.

Change-Id: Ib9d3940147f2adc2a22d0cc7a82210e29c9cd7d7
2020-05-18 07:18:05 -07:00
Neha Bisht
bf71699302 qca-wifi: 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 in component_dev

Change-Id: I5aa8f43845538e65d25c14776ec4ec9db174f0a8
CRs-Fixed: 2643301
2020-05-13 11:56:40 -07:00
Padma Raghunathan
98590966d5 qca-wifi: Skip handling CFR HTT event when feature is disabled
When CFR feature is disabled through INI, skip handling of HTT
event indicating the DMA completion of CFR data.

Change-Id: Ia1aafc57866eb11a952cedfbe3a00fec201e0ee0
2020-05-02 05:01:43 -07:00
Padma Raghunathan
a3ca2ef7b7 qca-wifi: CFR: Remove CFR files in component_dev
Remove CFR files from comp_dev

Change-Id: I4fcb34e5f31a4df7098cc52516257fdc89848839
2020-04-09 20:34:28 -07:00
Linux Build Service Account
f11e1ef511 Merge "qca-wifi: Keep the default subtype as 0 for default RCC config" 2020-03-24 00:13:58 -07:00
Linux Build Service Account
a9c8286741 Merge "qcacmn: Add protection while accessing cfr lookup table" 2020-03-23 10:40:55 -07:00
Linux Build Service Account
f3eddffec8 Merge "qca-wifi: CFR: Report correct values for RSSI and cfr_timer_enable" 2020-03-21 10:39:06 -07:00
Adwait Nayak
d1df58c0a0 qca-wifi: Keep the default subtype as 0 for default RCC config
1. MAC does not really consider the expect TA and the
expect RA when the expect TA mask and expect RA mask is 0.
Basically, it checks for the subtype, bandwidth and NSS
as the filter criteria.

2. In the other scenario, if the RA matches with expect
RA and TA matches with expect TA then it does not really
consider the expect TA MASK and expect RA MASK.
With the current default config, since the expect address
mask is 00:00:00:00:00:00 it falls under case 1 and it is
written based on the MAC recipe.

But actual MAC logic is different from what is mentioned
in the recipe. MAC works on below logic:
TA & TA MASK = Expect TA & expect TA mask
RA & RA MASK = Expect RA & expect RA mask

As an additional precaution, we need to modify default
subtype as 0 so that if user enables any group by mistake
and does not give any input for the other RCC
configurations, we can block the RCC to capture CFR data.

Change-Id: Ic79fde2a23126b6cdca84df0091e1df23fb487e4
2020-03-20 14:20:57 -07:00
Padma Raghunathan
850074ac63 qcacmn: Add protection while accessing cfr lookup table
Protect access to cfr lookup table, since error handling
mechanism attempts to cleanup CFR entries in timer context,
this leads to contention between bottom-half and timer.

Change-Id: I6a414e0da883250a90451824367c12fcca33c27e
2020-03-20 13:42:36 +05:30
Padma Raghunathan
151a83c1c9 qca-wifi: CFR: Report correct values for RSSI and cfr_timer_enable
1. Clear cfr_timer_enable flag during wifi down
2. Similar to one-shot capture, report RSSI in metadata for RCC.
   Convert SNR in rxtlv to RSSI.

Change-Id: Ib7c9875049f4cf3114bbb8b0851a35ad5928325c
2020-03-20 12:59:52 +05:30
Adwait Nayak
a529bf6e13 qca-wifi: CFR: Retrieve TA from Freeze TLV
TA retrieved from freeze TLV was being over-written by macaddr
from AST search during RXTLV processing.

MACADDR from AST search is essential only for MU PPDUs.

Change-Id: If38fd198fb196397298ed4ab646eb3257b1113b0
2020-03-05 21:09:21 -08:00
Surya Prakash Raajen
fd031702cf qca-wifi: Disable CFR RCC for QCA6018 in 512M profile
Disable CFR RCC for QCA6018 in 512M profile
CRs-Fixed: 2631752

Change-Id: I80cc46f128b30211e9704adc7adaa53084c98c7c
2020-03-03 13:10:46 +05:30
Adwait Nayak
06c298a95d qca-wifi: CFR: Update RCC specific debug counters
RCC specific debug counters has been moved to DP layer.

Update capture BW from RXTLV instead of VDEV
Capture BW is the bandwidth at which Station operates.

Error handling for pdev referencce count.
Add support to clear CFR ppdu counters
Use same event ENUM for HKV2 and Cypress.

Change-Id: Ic1f5da16c5c1ac5893dce1023eb57f96d78d4cfa
2020-02-25 12:17:35 +05:30
Adwait Nayak
60b5c01e9d qca-wifi: CFR: Fixes during initial WMI being sent to FW
1. Change the default values of TA\RA entries

Host sends out one default RCC setting to FW during
the initialization of target specific CFR component.

Change the default setting of TA, RA address from
00:00:00:00:00:00 to FF:FF:FF:FF:FF:FF and TA_MASK and RA_MASK
should be 00:00:00:00:00:00. This will avoid
the scenario where the system will allow all packets
irrespective of the filter settings provided by the user.

2. In case default configuration is being sent to the FW
successfully during CFR init, those configurations will
be updated as part of global config. So that it can be
reflected as part of rcc_config_details command.

3. Code clean up

Change-Id: I719ddeee48f14992b2210562596b1ea3d61fcc1c
2020-02-20 17:51:08 +05:30
Padma Raghunathan
f71643b376 qca-wifi: CFR: Fix NULL check before invoking DBR unregister handler
In HKV2/Cypress, check if DBR unregister handler is non-null before
invoking the same.

Change-Id: If22eac6e0005b9aa8887888b8070c884ec52d40f
2020-02-17 19:32:47 -08:00
Linux Build Service Account
186f1f6ff0 Merge "qca-wifi: CFR: Change format-specifiers while printing CFR metadata" 2020-02-17 03:53:37 -08:00
Adwait Nayak
09a69c160a qca-wifi: CFR: Introduction of new flag to enable RCC
A new flag "is_cfr_rcc_capable", is introduced to enable RCC.
Currently, this flag is enabled only for QCA6018.

Change-Id: Ifdd1922c655c0bb743147e3f51d3ca32cac3dd2e
2020-02-12 10:13:48 +05:30
Adwait Nayak
c8d6343788 qca-wifi: CFR: Add enhanced debug counters
Add counters for following scenarios -

1. Ucode aborts DMA of CFR data when a higher priority TX/RX activity
needs to be scheduled, add counters in host to identify the no. of
aborts.

2. Add counters to track the total no. of TX-based CFR captures since
wifi up.

Change-Id: I3c0e0e68651348c3484a14dfcd1f664962c8647f
2020-02-12 10:12:53 +05:30
Padma Raghunathan
54592ae83a qca-wifi: CFR: Cleanup unused code/datastructures
1. Remove the handler that flushes all pending DBR and txrx
events, since that is not being used.
2. PPDU TLV subscribe logic is integrated with ol stats layer,
remove redundant subscriber alloc.
3. Downgrade debug level of timer prints, as error handling timer
fires every 3 secs.

Change-Id: I2a5d2ae10ebee069dd30c1ed87d6560b30f77427
2020-02-12 10:08:14 +05:30
Padma Raghunathan
c13faa564f qca-wifi: CFR: LUT ageout timer fixes
In CFR error handling lut ageout timer, following fixes are made -
1. Fire error handling timer every 3 secs
2. Start/Stop timer only when pdev->cfr_rcc_mode transitions from enable
to disable and vice versa
3. Stop/Free timer during deinit of pdev, incase user issues wifi down
without disabling cfr

Change-Id: I2f9819706d1440d675edfdd933839dbc3ebddbb0
2020-02-12 09:20:00 +05:30
Padma Raghunathan
1c23f4700a qca-wifi: Fix sanity check of total_bytes in CFR header
CFR max payload length = 16064(16016 + 48 bytes for 64-bit alignment)

Change-Id: I56f783f8d92079577503b5848303ed0d990924e5
2020-02-12 09:19:38 +05:30
Padma Raghunathan
2684905be5 qca-wifi: CFR: Change format-specifiers while printing CFR metadata
Print magic_num, vendor_id and timestamp in hex.

Change-Id: I7b77dfe458bad423e77dcf82df6374e484bb457c
2020-02-08 05:30:37 -08:00
Linux Build Service Account
269e875088 Merge "qca-wifi: CFR: Fix cookie lookup failure during RXTLV processing" 2020-02-08 00:36:24 -08:00
Adwait Nayak
4bdb1a9564 qca-wifi: CFR: Fix cookie lookup failure during RXTLV processing
37th bit is being set as an exchange between FW and ucode
to indicate that it is a DDR address to PCSS module.
As a result of which Cookie lookup fails while comparing
all 40 bits, since the physical address of DBR buffer 
does not match with the physical address of the received
buffer.

Since lower 36bits represents physical address,
Use only 4 least significant bits from higher 32bits along
with lower 32 bits while programming the physical address in
DBR SRNG. Format: ( low32 + 4 bits of high32 ).

Change-Id: I2cb09c00a9942966266ba81f56f0c6c173671e2f
2020-02-06 10:39:57 -08:00
Adwait Nayak
30b056b940 qca-wifi: CFR: Fix in flush pending DBR event logic
Do not flush the DBR event for which the corresponding
TX/RX event is yet to be received.
Once the new PPDU TLV is received, flush the previous
pending DBR events.

Change-Id: I4495a45db139128d2af01f79744021c6ad6bf322
2020-02-06 14:43:26 +05:30
Linux Build Service Account
0673042975 Merge "qca-wifi: Correct the condition for dump_lut in CFR" 2020-01-23 10:29:28 -08:00
Linux Build Service Account
ed268557f6 Merge "qca-wifi: CFR: Update channel capture status counters" 2020-01-13 13:39:06 -08:00
Linux Build Service Account
f4f87613b2 Merge "qca-wifi: Display CFR debug counters in default loglevel of CFR module" 2020-01-13 13:39:05 -08:00
Adwait Nayak
a80072e82a qca-wifi: CFR: Fixes in error handling path
1. In CFR RCC mode, when ucode aborts DMA of CFR data, 2 (or)
more PPDU status TLVs are likely to have same phy_addr+cookie in
RX location TLV, so the host will be flushing out the older PPDU
status TLV events instead of DBR events in LUT table,
since DBR events signify the actual DMA completion.

2. Same fix has been made for LUT entry ageout logic.

Change-Id: Ifc0717e97d21ba3463cc2f5ceb2f22a657177002
2020-01-10 12:54:25 +05:30
Padma Raghunathan
881f7dae00 qca-wifi: Display CFR debug counters in default loglevel of CFR module
Change log level of CFR debug counters from QDF_TRACE_LEVEL_INFO to
QDF_TRACE_LEVEL_ERROR

Change-Id: Ib0d36ec458de2d8d562d34a80ab8128f934ad459
2020-01-10 11:38:16 +05:30
Abhiram Jogadenu
ab7d2910af qca-wifi: Correct the condition for dump_lut in CFR
Earlier, CFR's LUT was dumped when difference between dbr count
and release count is greater than 1. This might be agrressive.
Modified the condition to reflect the worst case where LUT has
no empty entry.

Change-Id: I010431b446ddb66364505f0c8d9a70dd181eb8b1
2020-01-09 10:44:27 +05:30
Padma Raghunathan
61da1ed876 qca-wifi: CFR: Update channel capture status counters
PHY may not be able to capture the CFR data in certain cases.
Ucode will update the reason due to which CFR capture did not
happen in PHYRX_PKT_END TLV.

Channel capture status -
	0 - CAPTURE_IDLE
	1 - CAPTURE_BUSY
	2 - CAPTURE_ACTIVE
	3 - CAPTURE_NO_BUFFER

Originally, ucode updated channel capture status only for PPDUs,
for which PHY was able to capture CFR data successfully. Ucode is
making a change to report channel capture status in PPDUs for which
PHY was unable to capture CFR data.

Re-positioning the counters in host to handle this new change in
ucode.

Change-Id: I915fe7c4969649754936cab624343e044b397a0c
2020-01-07 23:57:04 +05:30
Adwait Nayak
0aa6b1747b qca-wifi: Enhanced channel capture UCFG framework
Framework to accumulate RCC configurations until user issues commit
command. Once commit command is issued, all the gathered configurations
are sent to FW through WMI fixed and variable TLVs.

Change-Id: I84fec42d22a3b4eceb710b72d89a7c3047fed1f6
CRs-Fixed: 2582833
2019-12-26 20:14:00 -08:00
Padma Raghunathan
f0290f4c79 qca-wifi: CFR: Implementation of CFR for QCA6018 platforms
Channel Frequency Response(CFR) captures FFT bins corresponding to a PPDU
received and this is relayed to user space application along with
additional information about the PPDU gathered in the host. Usecases of
this feature include location sensing, motion detection.

Change-Id: If0da492bc1fcc0fc2b6e42339c56f9a54ee813f7
CRs-Fixed: 2541307
2019-12-26 20:13:08 -08:00
Uraj Sasan
cc8adb9b65 qca-wifi: Converge qdf_export symbols
Converges EXPORT_SYMBOL() to qdf_export_symbol(),
this ensures easy enabling and disabling of exports

Change-Id: I5724a618c9dff7a30b9d314906fbabca943bded8
2019-11-12 11:16:03 +05:30
Linux Build Service Account
d825201347 Merge "qca-wifi: Reduce log level for dumping lut" 2019-10-18 09:57:45 -07:00
Abhiram Jogadenu
1eab6b5e00 qca-wifi: Reduce log level for dumping lut
There seems to be a case where difference between DBR event count
and release count for CFR events is more than 1, which will dump
CFR's look-up-table. As the exact reason for this is not known yet,
we are reducing the log level for these prints to not be enabled
by default

Change-Id: I503f6423f08e6faa84b45747a28ec1a7de4724fc
2019-10-17 15:47:01 +05:30
Debasis Das
d8a16fe0d7 qca-wifi: Fix format string related warnings
Fix format string related compilation warnings:
format string should match the datatype

Change-Id: I521cb95f0442c445e0e358d383a8ae58d3003be4
2019-10-15 11:40:17 +05:30
Vikram Kandukuri
81f26b56c0 qca-wifi: Report CFR failed status to application
Report CFR failed status to application by sending CFR header with
error status.

Change-Id: I67e370bbbd8294a14c32567922861a0b5226b0ea
CRs-Fixed: 2538596
2019-10-05 00:54:50 -07:00
Vikram Kandukuri
0978b878ca qca-wifi: Correct meta data version for CFR captures wiht AoA
For new CFR captures with AoA data, Meta data version is 2.
Updating meta data version to 2.

CRs-Fixed: 2537866

Change-Id: I4c6cb9775e5a9760630b1f28d61fb4bdfd084c6c
2019-10-03 23:50:53 -07:00
Linux Build Service Account
ff0dd6b599 Merge "qca-wifi: Reset unassoc entries for every cfr_pdev_open" 2019-09-25 22:38:13 -07:00
Abhiram Jogadenu
22a844a816 qca-wifi: Reset unassoc entries for every cfr_pdev_open
After every wifi up/down or load/unload, it is expected that
cfr enabled entries should be reset. Earlier, associated clients'
entires are cleared by FW. Unassociated entries are maintained by
host and were not cleared. This change clears them properly at
cfr_pdev_open level

Change-Id: I2dd7ce861901ccca72bc987c2f91677a481d401e
CRs-Fixed: 2531961
2019-09-23 16:07:37 +05:30
Shiva Krishna Pittala
3d1bae3723 qca-wifi: Adjust CFR as per multi srng support per pdev in DBR
Signatures of target_if_dbr_buf_release and
target_if_dbr_cookie_lookup got updated as part of multi srng
support per pdev in DBR. Update the same in CFR.

CRs-Fixed: 2528137
Change-Id: If53fd9a1a4e4a30b8d9ba3eda9ade887e2c3322b
2019-09-16 11:22:08 +05:30
Abhiram Jogadenu
8be4461102 qca-wifi: Correct CFR data version
Correct the version where CFR data is being populated.

Change-Id: I4c55b5beefb2f93e09df47162406876a1861fa00
2019-08-29 02:02:03 -07:00
Abhiram Jogadenu
1fb9ce28cb qca-wifi: Fill extracted phase information in CFR header
As part of FR 56301, phase data is being captured in CFR.
Fill the extracted information in CFR header.

Change-Id: Ia1f6245a1a18d1d11b266328b17e6506bd8439f4
CRs-Fixed: 2501944
2019-08-24 07:41:19 -07:00
Abhiram Jogadenu
b613622d32 qca-wifi: Add support for CFR capture on unassociated clients
As part of FR 56301, add support to capture CFR data for
unassociated clients on its Probe response's ACK

Change-Id: I14a4eead4ceeb3eb21d8f2bdf76007f873db1f4e
CRs-Fixed: 2501938
2019-08-22 11:48:38 +05:30