Commit Graph

71 Commits

Author SHA1 Message Date
Shwetha G K
91fd67b612 qcacmn: Update cfr metadata version for Pine & HKv2
Update cfr metadata version for Pine and HKv2 as agc gain
table index is reported newly on these targets.

CRs-Fixed: 3158325
Change-Id: I17fe5a78ec44e1528e6187535a803c729734dd18
2022-03-28 10:48:05 -07:00
Shwetha G K
5672e51446 qcacmn: Add host timestamp to cfr header
Include a UTC timestamp when constructing the CFR header,
represented as a 64-bit nanoseconds value. This will allow
for better correlation with ground truth data.

CRs-Fixed: 3156846
Change-Id: Ic5308bcd591d641e715ded8e4b75d447160dbbce
2022-03-26 09:11:59 -07:00
Wu Gao
a6d46ebc8b qcacmn: Populate additional params to CFR info for QCA6750
HAL changes to populate agc gain, CFO, rx_start_ts, mcs_rate and
gi_type to CFR info for QCA6750.

Change-Id: I164324b1e929399a8dacf88f3012970c65d5d653
CRs-Fixed: 3115256
2022-01-27 03:12:49 -08:00
Wu Gao
cf7bae960f qcacmn: Add CFR supports for KIWI
This change adds CFR supports for KIWI.

Change-Id: I895eeae41c7f8bba4a35ee46a2ad6a1eadf82f9b
CRs-Fixed: 3114230
2022-01-27 00:53:46 -08:00
narayan
1a3cc5efc1 qcacmn: Legacy CFR code cleanup
Remove legacy CFR routines and code as part of legacy
CFR code cleanup.

Change-Id: I652da06ea7813013f46d509981e83c4b3581074c
CRs-Fixed: 3113932
2022-01-24 14:41:07 -08:00
sandhu
ad2829718c qcacmn: Remove IP from files
remove IP from code

Change-Id: If119a4af213b10aadb9f1344e50b0342e72405c2
CRs-Fixed: 3073864
2021-12-29 04:28:58 -08:00
Wu Gao
28ed233c3c qcacmn: Populate additional params to CFR info for QCA6490
HAL changes to populate agc gain, CFO, rx_start_ts, mcs_rate and
gi_type to CFR info for QCA6490.

Change-Id: I6f6f47c87d40bd661162f764fb3a360230a56457
CRs-Fixed: 3086667
2021-12-14 15:13:42 -08:00
Wu Gao
8a7de8863d qcacmn: Add chip type QCA6490 & QCA6750 in cfr meta data header
There is wrong chip type in cfr meta data header if run CFR/CSI with
HSP since doesn't fill it for QCA6490 & QCA6750.

Change-Id: I932c065d33c5eaa33f66ec8a92470f5820472d7b
CRs-Fixed: 3073865
2021-11-17 00:42:48 -08:00
Shwetha G K
0d831d42c4 qcacmn: Waikiki CFR changes
Waikiki CFR changes

CRs-Fixed: 3057989
Change-Id: Ib2028ecede35cc2e531a394f5229a71b84757b9f
2021-11-03 12:54:43 -07:00
narayan
70ade22606 qcacmn: Enable CFR support for QCA9574
Enable CFR host support for QCA9574.

Change-Id: I8d6a0f5b59715f244256854fc2132f33f841f316
CRs-Fixed: 3062447
2021-10-29 08:46:33 -07:00
Shwetha G K
a731de3964 qcacmn: Report agc tain table index as metadata
Changes to report agc gain table index as part of
CFR meta data to the userspace.

Change-Id: I318c3db2eff7be8b63ce6aaa544f75fe065fb230
2021-10-18 06:13:29 -07:00
Wu Gao
64da7093a2 qcacmn: Not change RSSI of cfr meta data to dBm
Since target already converts RSSI from SNR to dBm for QCA6490 and
WCN7850, so don't convert them again in host side.

Change-Id: Ie35f3821a802f2e65b61f4891f2ca9c632fa1477
CRs-Fixed: 3024119
2021-08-31 20:04:45 -07:00
Shwetha G K
9a723da9a5 qcacmn: Fix CFR pdef ref leak issue
Fix the CFR pdev ref leak issue

Change-Id: I6ba9068ae395fdbab8af4f6117dd31c72281ca5d
CRs-Fixed: 3008801
2021-08-06 14:08:51 -07:00
Shwetha G K
0df8d9a55a qcacmn: Split extract phase tlv functionality
Split the extract phase tlv functionality into two
seprate APIs for code readability. Also add sanity check
for max_aoa_chains.

Change-Id: I2d73ee99cff37872191f8a9258a561d7dbd01808
CRs-Fixed: 2997020
2021-08-02 04:07:10 -07:00
Shwetha G K
8c35189d7f qcacmn: Rename leg_cfr_metadata to legacy_cfr_metadata
Change the naming convention of the leg_cfr_metadata to
legacy_cfr_metadata

CRs-Fixed: 2997929

Change-Id: I0f04459d53130b0338316a6b0d01152c536e1c64
2021-08-02 01:59:15 -07:00
Shwetha G K
ac4740da88 qcacmn: Derive phase from agc gain & phase delta
Changes to derive chain phase values out of Hardware
reported agc gain and target reported AoA phase calibration
values. AoA for RCC to be supported based on target shared
capability. AoA phase delta & ibf cal values are shared by
target upon every channel change via WMI event.

Change-Id: Ic4fca3731b795e07a511388f6dbb15a46d676a77
2021-07-16 06:19:55 -07:00
Shwetha G K
54f6e60a7c qcacmn: Add mcs, gI & sig info to cfr metadata
Add mcs rate, gI type and other SU sig info to cfr metadata.
For Tx based capture mcs rate & gI type is applicable
MCS For legacy mode
      0: 48 Mbps
      1: 24 Mbps
      2: 12 Mbps
      3: 6 Mbps
      4: 54 Mbps
      5: 36 Mbps
      6: 18 Mbps
      7: 9 Mbps
      8: invalid entry
MCS for HT, 0-7: MCS0-MCS7,
MCS for VHT, 0-9: MCS0-MCS9,
MCS for HE, 0-11 MCS0-MCS11, 12-13: 4096QAM
GI:
     0: 0.8 us
     1: 0.4 us
     2: 1.6 us
     3: 3.2 us
ltf_size:
     0: he_ltf_1_x
     1: he_ltf_2_x
     2: he_ltf_4_x
dcm: Indicates if DCM set
     0: No DCM
     1: DCM
sgi: Indicates if short gI used
     0: No short gI
     1: short gI
beamformed: Is packet beamformed
     0: non-beamformed
     1: beamformed
stbc: Indicates if stbc applied
     0: No STBC
     1: STBC
Coding:
     0: BCC
     1: LDPC

Change-Id: If6ab4b4878ab24406aba0e890ec08a2dae2b4634
2021-06-16 16:51:17 -07:00
Shwetha G K
e0b5142fdc qcacmn: Cleanup CFR meta version structures
Cleanup CFR metadata version structures to avoid redundant
& unused definitions

Change-Id: Ia8b8234a38455f8c976600ef40c0a56c7bf66a53
2021-06-16 16:51:12 -07:00
Rakesh Pillai
34b6af18a4 qcacmn: Init-Deinit changes for WCN7850
Add Init-Deinit changes for WCN7850 support
in datapath

Change-Id: I7f9850ee41f4638c6a28b5313549c67876c5f810
CRs-Fixed: 2888556
2021-06-05 15:10:50 -07:00
Shwetha G K
6f88e8eede qcacmn: Fix build error post CFR movement to cmndev
Fix the compilation error post movement of CFR files to
cmndev and rename cfr init deinit APIs to be chip
independent. Also port fixes from component_dev.

CRs-Fixed: 2938886
Change-Id: I2f5637f5717ce5154e3b642c3ade646794e99602
2021-05-31 03:25:07 -07:00
Shwetha G K
550f97cf8a qcacmn: Move CFR to common project
Move CFR to common project and rename the files as it will
be shared with other targets as well. Fix checkpatch errors
too.

Change-Id: I66481848036212aedab74c9c18848070ac1a3511
2021-05-31 03:25:03 -07:00
Wu Gao
672bbe5490 qcacmn: Get vdev based on vdev id
Driver gets vdev by wlan_objmgr_pdev_get_first_vdev and returns wrong
vdev in some platforms, and then gets wrong channel/phy_mode. This
change gets vdev by id and fix this issue.

Change-Id: I814d516361238afbd0345bc362c286d1cb55a7d4
CRs-Fixed: 2933525
2021-04-30 16:51:06 -07:00
Shwetha G K
8159fecc91 qcacmn: Update cfr metadata len calculation logic
Separate the common fields of csi_cfr_header and update
the logic of calculating the cfr_metadata_len.
Move cmn header update code to single place.

CRs-Fixed: 2916901
Change-Id: I97d99df45f667f4ed3b80264b12d3d09a3bcae95
2021-04-27 09:14:16 -07:00
Chaoli Zhou
bbccf20880 qcacmn: Correct the WMI command id for CFR
Fix the wmi command id is not right issue for
enable/disable periodic peer CFR capture if
ENABLE_HOST_TO_TARGET_CONVERSION not enabled.

Change-Id: I82ba6c781f67aa73f373a0a914838f482d86f165
CRs-Fixed: 2865389
2021-03-04 21:23:52 -08:00
Shashikala Prabhu
6dac66bcbf qcacmn: Fix compilation error when DIRECT_BUF_RX is disabled
Fix compilation errors when DIRECT_BUF_RX_ENABLE compile-time flag is
disabled.

Change-Id: I2bbce6eb8838ecab02b6462c1c0ee28877accdb4
CRs-Fixed: 2883310
2021-03-02 05:36:48 -08:00
Pavankumar Nandeshwar
ff041723c7 qcacmn: change qcn9100 to qcn6122 in target_if
Change the name of target type qcn9100
to qcn6122 target_if.

Change-Id: Icfdcd2c8d872b5305687884b7d9186fb85274bd4
CRs-Fixed: 2849577
2021-01-18 21:45:42 -08:00
Adwait Nayak
2a0231fa54 qcacmn: Add dma length sanity check
Add sanity check for CFR payload length in case of QCA5018
before relaying CFR data buffers to user space.

Change-Id: I81f37bebd3b9372606906fc87ce8ee90fe4809a1
CRs-Fixed: 2855173
2021-01-16 12:57:35 -08:00
Adwait Nayak
c2a2145497 qcacmn: Modify number of buffers in Relay FS
Bring down number of sub buffers in Relay FS from
470 to 255. Earlier 470 buffers were introduced to
maintain 2MB uniformity across platform for relayfs.
But, as IPQ5018 is 512M platform and having 255
buffers is sufficient enough to hold CFR data,
we have brought down the number to 255.

This saves 1MB memory.

Change-Id: Ibbd6926c6712b871e8174e44bd24abf703a8e736
CRs-Fixed: 2855173
2021-01-16 12:57:29 -08:00
Shwetha G K
42a2faa714 qcacmn: Extract additional info to cfr metadata
Extract agc gain information, CFO & rx_start_ts from
rx status and cfr peer capture event to CFR host metadata

Change-Id: Id896554f1da6920bd3eeced1298b07857d41a68b
2021-01-07 08:17:56 -08:00
Pavankumar Nandeshwar
37a9d7cf5c qcacmn: add CFR changes for QCN9100
Add CFR related changes for target type
QCN9100

Change-Id: I44f7a521fb38f883b6e1a6a71e39805a1da69687
2020-12-17 03:05:28 -08:00
Adwait Nayak
b081974d4d qcacmn: Change return type to QDF_STATUS
Maintain harmony in return type as "QDF_STATUS"
for CFR related APIs.

CRs-Fixed: 2767660
Change-Id: Ie35c104d32452d01d3c05b5059ee1b1bfe535a58
2020-10-28 11:30:14 -07:00
Shwetha G K
bc3e92d1d6 qcacmn: Print oneshot/periodic CFR failure stats
Print oneshot/periodic CFR failure stats as well during CFR stop

Change-Id: Id81f0b79fd59e11c8170855aded88af7870162b3
2020-09-28 03:35:03 -07:00
Pavankumar Nandeshwar
42c974a68d qcacmn: Target_if changes for QCN9100 bringup
Initial changes for bring up of QCN9100 in
target_if layer

Change-Id: I216cb52001b6e0c87a1c4b45990aad0ea83b4933
2020-09-01 01:49:54 -07:00
Abhishek Ambure
fb27821b98 qcacmn: Enable CFR support for target QCA6750
Host enables CFR support for QCA6750 target.

Change-Id: I3e68d3984eef7faa94739a71124315336922e417
CRs-Fixed: 2754922
2020-08-24 12:40:16 -07:00
Srinivas Girigowda
40f652caf5 qcacmn: target_if: Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF
Change %pM/QDF_MAC_ADDR_STR/ARRAY to QDF_MAC_ADDR_FMT/REF.

CRs-Fixed: 2760938
Change-Id: Ic2a0a703210bb64aee57e5e3edb4028906f62dc9
2020-08-23 23:09:44 -07:00
Paul Zhang
1123940de7 qcacmn: Fix bitwise comparison issue
When the option -Werror=tautological-compare is enabled, the compiler
reports error because bitwise comparison always evaluates to false.

Change-Id: I7532dc9bccb69e02be5f04897a6ecaff44e84a0d
CRs-Fixed: 2734883
2020-08-21 04:46:43 -07:00
Adwait Nayak
5e8254061e qcacmn: Modify data type of timestamp
The 'timestamp' field in CFR meta data corresponds to TSF
at the reception of PPDU in micro second unit. To capture
timestamp for one shot, periodic and repetitive channel
capture, this field is being used.

case 1:
For one shot and periodic capture, the clock used for
timestamp is private to the target and not visible to host.
So it is being passed by FW to host and the placeholder
being exchanged between Host and target is of 32 bit.

case 2:
In case of repetitive channel capture, the
timestamp is being populated from the received PPDU,
which is 64bit.

To accommodate the timestamp, in both above cases, change
the data type to u_int64_t from u_int32_t

Change-Id: Ifa612bd97dc4f597368daefcd4224b84f2484c03
CRs-Fixed: 2751408
2020-08-18 14:43:35 -07:00
Adwait Nayak
9b8183fef6 qcacmn: Enable CFR support for IPQ5018
Enable CFR support for IPQ5018.
Calculate stream FS buffer length based on CFR payload,
CFR uCode header and CSI metadata.

Change-Id: Idd903ead75d635ce87ffc0df80e5c32fb62d15aa
CRs-Fixed: 2751408
2020-08-18 14:43:27 -07:00
Adwait Nayak
a265096932 qcacmn: Change data type of modified_in_curr_session
Repetitive channel capture configurations usually support
16 groups to be confugured. To check if a particular group
is enabled by user, qdf_test_bit is being used here.

qdf_test_bit usually operates with uint32_t and it takes
the argument as unsigned long type. Since,
modified_in_curr_session is declared as uint16_t, and then
typecasted into unsigned long.

Change the data type of modified_in_curr_session
from uint16_t to 'unsigned long' to avoid compiler
issues.

Change-Id: Iec778dc36d5671f2cfb643c9ced1bd2a6104de2b
CRs-Fixed: 2753267
2020-08-18 11:01:05 -07:00
Shwetha G K
31533ab3d9 qcacmn: Update signal strength calculation logic to consider -ve SNR
Update the signal strength calculation logic in CFR to consider
negative SNR i.e., a signal below the noise floor.

CRs-Fixed: 2753751
Change-Id: I2e2b95cc2ac2cf50ad5b7e38977ab971ddeb1ecf
2020-08-13 10:33:13 -07:00
Shwetha G K
5ae97cd65b qcacmn: Add freeze_tlv_version in cfir_enh_dma_hdr
Add freeze_tlv_version in cfir_enh_dma_hdr where,
    version 1: Cypress/HastingsPrime which supports single user
               channel capture
    version 2: Maple/Spruce/Moselle which supports MU channel
               capture for up to 4 users
    version 3: Pine which supports MU channel capture for up to
               37 users

CRs-Fixed: 2741027
Change-Id: Iadd6dc2ff82030f502776ce35988b4472450337e
2020-08-12 19:53:23 -07:00
Shwetha G K
282b71f640 qcacmn: Support CFR capture_count and MO marking requirement
Support a new capture_interval_mode: capture_count, where after
capture_count+1 number of frames, MAC stops channel capture and
waits for capture_interval duration before enabling again.

Add nob(capture_intervalmode_sel) to switch to capture_count or
capture_duration mode in wlanconfig application, where
capture_intervalmode_sel=0 indicates the old capture_durarion
mode where MAC stops channel capture after capture_duration
instead of capture_count. capture_intervalmode_sel=1 indicates
the capture_count mode.

Support MO marking: Current ENH CFR uses the existing MD/MO,
type/subtype filters to filterin the packets with programmed
type/subtype as either MD/MO. But for m_TARA it is also required
to consider the bw/nss/ta/ra setting. Therefore, it is possible
that not all the filtered-in PPDUs have channel capture and lead
to processing of packets which does not have captured data.
To overcome this issue, from QCN9000 onwards, MAC has MO marking
feature added for M_TARA filter mode, where MAC will consider
all TARA group configuration as filterin criteria & provides
an option to HOST to choose either filterin mode as FP or MO.
en_ta_ra_filter_in_as_fp is added to support MO marking.
Based on the discussion between HOST, FW & MAC teams, 0 is the
recommended & default setting for en_ta_ra_filter_in_as_fp.
Add nob to configure en_ta_ra_filter_in_as_fp but do not expose
to user.

Change-Id: I790d7ce500a7d779ea571635690f73dbc582cf33
2020-07-29 09:39:51 -07:00
Shwetha G K
a87d0fe709 qcacmn: freeze_tlv changes due to 37 UL-MU users in Pine
Add freeze_tlv changes due to 37 UL-MU users in Pine

Change-Id: Ibe794b83e7d8722b5ea8709fa23d33fb823bd992
2020-07-22 07:45:19 -07:00
Shwetha G K
5ebf659ba8 qcacmn: Enhanced CFR code cleanup
Enhanced CFR code cleanup

Change-Id: Ie27a0523c8216fc12f24ba6c707ce45cc61fb5c8
2020-07-20 19:26:40 -07:00
Surabhi Vishnoi
bb9b9ec907 qcacmn: Compilation fixes when WLAN_CFR_ENABLE config is enabled
For adrastea targets, enhanced CFR is not supported. When only
CONFIG_WLAN_CFR_ENABLE is set, some compilation errors are
observed as CONFIG_WLAN_ENH_CFR_ENABLE is not set true.

Fix these compilation errors when only CONFIG_WLAN_CFR_ENABLE
is set for targets which do not support enhanced CFR.

Change-Id: I96a769d8f10144033e48e123bb68d48a54cdf8ab
CRs-Fixed: 2706904
2020-07-17 17:23:23 -07:00
Surya Prakash Raajen
7e56ece9a9 qcacmn: Decouple legacy FW headers
Decouple legacy FW headers for lithium builds since
its not required for the same

CRs-Fixed: 2719782
Change-Id: Ibdfdec51c5379fe42e23bf04a228ae6fb1a3eac9
2020-07-07 07:25:03 -07:00
Surabhi Vishnoi
d2c2a6aec6 qcacmn: Add support for CFR in adrastea target
Add the init and deinit CFR pdev api for adrastea target type.
cfr_adrastea_init_pdev api enables the CFR feature if both host and
firmware supports the feature, initialises the cfr pdev structure
and streamfs.

Also during allocation of memory requested by firmware, skip smaller
chunks memory allocation for CFR capture requested memory as firmware
expects contiguous memory.

Change-Id: Ib893dc8a845fea990a11e95e98d8a656f7df12ba
CRs-Fixed: 2687057
2020-06-29 19:15:56 -07:00
Shwetha G K
2846a3c308 qcacmn: Capture tx status error as well in CFR stats
Capture tx status errors & cookie lookup failure under CFR stats

Change-Id: I546b70424f5fe5fafde36da3cdf587cb7ab29856
2020-05-20 23:47:41 -07:00
Shwetha G K
1347c3ab9c qcacmn: Update Pine specific CFR changes
Update Pine specific CFR changes

Change-Id: Ibdd33e458cd058f6db94de5165df31d25d97eebb
2020-05-20 00:09:20 -07:00
Shwetha G K
3b989e01df qcacmn: Add CFR Pine support
Add CFR Pine support

Change-Id: Id81df0e3e36725e4fc15e92c1ac5a967cf4883f7
2020-05-20 00:09:16 -07:00