Commit Graph

72 Commits

Author SHA1 Message Date
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
Jeff Johnson
f3217146fa qcacmn: Fix misspelling "bandwitdth"
Fix misspelling: "bandwitdth" => "bandwidth"

Change-Id: I7fde29d0be481e6e4214a00d68ff4c468d03a322
CRs-Fixed: 3430187
2023-03-13 23:54:33 -07:00
Wu Gao
ebf01e75ce qcacmn: Set pdev id base on FW capability for CFR request
Host and FW have agreement about using fixed pdev id for CFR on HMT,
which required changes on both sides. In case only picked host
change with old FW, which will case device broken during booting up,
add this change to set pdev id base on FW capability for CFR request.

Change-Id: Iac82074228d42c6f51ea2024defdb0272e5cb396
CRs-Fixed: 3409616
2023-02-26 17:35:54 -08:00
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
Jeff Johnson
183cd295b8 qcacmn: Fix umac/cfr documentation
The kernel-doc script has identified multiple documentation issues in
umac/cfr, so fix them.

Change-Id: Ie459075a92719e4708021cb965fdbab1f682df24
CRs-Fixed: 3372808
2023-01-18 09:55:49 -08:00
Tiger Yu
8e2032cc6a qcacmn: Ensure the grp_id is not greater than MAX_TA_RA_ENTRIES
Ensure the grp_id is not greater than MAX_TA_RA_ENTRIES to avoid
potential out of array illegal memory access.

Change-Id: I343fffe6078b33d0ec618ea7b4abbfd17c4bb814
CRs-Fixed: 3340482
2022-11-21 02:59:31 -08:00
Nidhi Jain
d340e5bc02 qcacmn: Enable monitor mode flag for special vap
This change is to enable monitor mode flag is special vap is up.

Change-Id: Id7f169406e25f8f121f5e32074ac3c8049870e01
CRs-Fixed: 3326413
2022-11-07 00:45:03 -08:00
Kannan Saravanan
38f0453c6d qcacmn: Initial changes for york bring-up in umac layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: I2a26e1c45c61630594efd86466f19ea04300939f
CRs-Fixed: 3282641
2022-10-18 10:08:27 -07:00
Jeff Johnson
3363e11e08 qcacmn: umac: cfr: Fix misspellings
Fix misspellings in umac/cfr/...

Change-Id: If905cde07b8717407c716760d2badd4ddac4fed6
CRs-Fixed: 3304694
2022-10-11 02:30:52 -07:00
Wu Gao
94c1dac609 qcacmn: Check vdev id when get cfr rcc enabled params
Host stops cfr without vdev id check. In MLO case, the other link
stops firstly and it will get mac id base on wrong vdev id. Finallly,
it cause FW assert. This change adds vdev id check when getting cfr
rcc enabled params and trying to stop cfr.

Change-Id: I745ff5398b3f00fdb84b62b0835c1dd2ab75fae1
CRs-Fixed: 3296067
2022-10-05 21:11:55 -07:00
Sajini R
92163c7875 qcacmn: Initial changes in UMAC for IPQ5332 target compilation
Added device ID and target type checks in UMAC for IPQ5332 target
compilation.

CRs-Fixed: 3273861
Change-Id: I25f9f8bd6c23b361e3b425744839dce945036bd4
2022-09-16 11:52:51 -07:00
Nidhi Jain
1340f268c1 qcacmn: Remove puncture pattern from CFR
Removing additional puncture pattern parameter from CFR.

Change-Id: I2ed5a64d793946d3d96df847631c0fa0f8ac3274
CRs-Fixed: 3260286
2022-08-26 09:10:32 -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
Shwetha G K
2dc127f74b qcacmn: Periodicity check for waikiki
Add periodicity check for waikiki target.

CRs-Fixed: 3217706
Change-Id: I572d484f9767acfe86c204ee33eac53245f79bf0
2022-06-16 11:52:57 -07:00
Shwetha G K
6db4065f76 qcacmn: New metadata version for agc_gain_tbl index
Add new meta data version for agc gain table index

CRs-Fixed: 3155335
Change-Id: If058afd39207b89f6e523073d80ece4155cc03b8
2022-03-28 10:47:59 -07:00
Shwetha G K
3de51ff2c5 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: 3156826
Change-Id: Ie77d5e433346f21c3876930a2b8cbfa528affb20
2022-03-24 04:11:42 -07: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
Shwetha G K
9c320060ac qcacmn: Waikiki CFR changes
Add CFR support inclusing 240MHz & 320MHz for
Waikiki Chip.

CRs-Fixed: 3057992
Change-Id: I87499369a076ca561fea066ebbfc2ebeab854868
2021-11-03 12:54:38 -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
1d2aaa5602 qcacmn: Report per chain AGC gain table index
Report the per chain AGC gain table index used as
part of cfr_meta_data. Add new fields in metadata
accordingly.

Change-Id: I40673f856b1a1ebb0a4a69bf44d4e0817db9cd6f
2021-10-18 06:13:25 -07:00
Shwetha G K
43a0ba24ca qcacmn: Rename leg_cfr_metadata to legacy_cfr_metadata
Change the naming convention of the leg_cfr_metadata to
legacy_cfr_metadata

Change-Id: I059bcec1075e0e49350c2eb12990ec33a59cc1fd
CRs-Fixed: 2997916
2021-08-02 01:59:10 -07:00
Shwetha G K
5986e5eeee qcacmn: Support AoA with RCC
Changes to derive AoA phase values in RCC mode.
Add AoA phase calibration parameters to pdev_cfr. These
gets filled upon FW WMI event for every channel change.
HW reported AGC gain & these values are used to derive per
chain phase values.
FW to advertise support of this via service flag.

Change-Id: Ie239b939e50c60c5658ed0a82bae3243e5028e77
2021-07-14 13:12:26 -07:00
Wu Gao
0971daad9f qcacmn: Add wakelock for enhanced CFR
There is potential risk when starting CFR and resume happens at same
time, so this change adds wake lock for enhanced CFR.

Change-Id: Ifbde12cb73092b7fc4ef517e57051af4ffe7a79f
CRs-Fixed: 2974733
2021-06-28 19:25:58 -07:00
Shwetha G K
dc84b3c88f qcacmn: Add mcs, gi and sig info to metadata
Add MCS, gI, and other SU sig information to CFR metadata

CRs-Fixed: 2966860

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

CRs-Fixed: 2966842
Change-Id: I81a4f780ffc70be266fbcaa43ff739c544a49c02
2021-06-16 16:51:08 -07:00
Abhishek Ambure
606c708af6 qcacmn: Add support for nl callback for cfr data
Host add support to send cfr data via nl events to userspace
applications. Host registers callback when user send vendor
command to set transport mode.

Change-Id: Ieed3b6e09d871639af58336074313120d51762e2
CRs-Fixed: 2952096
2021-06-04 00:28:44 -07:00
Wu Gao
e52b8c8067 qcacmn: Set MAX_RESET_CFG_ENTRY to 0xF for QCA6490 and QCA6750
Host sets num_grp_tlvs based on modified_in_curr_session, which uses
default value - MAX_RESET_CFG_ENTRY. MAX ta ra entries changed from 16
to 4 for QCA6490 and QCA6750, so change MAX_RESET_CFG_ENTRY from
0xFFFF to 0xF here.

Change-Id: Ie057b8763c0126bd0cacab4fd21da9df0d5e71f2
CRs-Fixed: 2957324
2021-06-01 21:48:55 -07:00
Wu Gao
803ffc9308 qcacmn: Set max ta ra entries to 4 for QCA6490 and QCA6750
This is about CFR feature, set max ta ra entries to 4 for QCA6490 and
QCA6750 base on HW design.

Change-Id: Ief62ac394e3991a896d9bb954289e63ac105e74e
CRs-Fixed: 2939149
2021-05-17 18:56: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
Shwetha G K
a48ce19f53 qcacmn: Validate the periodicity based on target
Allow cfr period to be multiples of 1ms for targets like
qcn9000, qca6018, qca8074v2 and qca5018.

For other targets, restrict it to be multiples of 10ms.

CRs-Fixed: 2878062
Change-Id: I7f5638adf8ef39f7b8b681ae6693f5f032217e88
2021-03-02 10:10:04 -08:00
Shwetha G K
363cc4acca qcacmn: Change dev_sanity_check as non-inline function
Change dev_sanity_check API as non-inline function to
optimize the code size.

Change-Id: Ice0b589b7303317ed3a402605949050d2af4820a
2021-02-10 03:29:43 -08:00
Shwetha G K
40b24b9e5d qcacmn: Ensure the CFR period is multiple of 2ms
Change the minimum CFR periodicity from 0 / 10ms to 0 / 2ms,
and ensure that the period value is multiples of 2ms.

Change-Id: I9112e47d21cbb40c83852e404bac3ce1b48897a4
CRs-Fixed: 2862591
2021-01-27 19:11:41 -08:00
Shwetha G K
44d132cc27 qcacmn: Add additional parameters to CFR meta data
Add per chain agc gain in dB information, CFO & rx_start_ts
fields to CFR metadata

Change-Id: I6af9c4212fe5a0bed6e51516d1c446155cea63aa
2021-01-07 08:17:52 -08:00
Shwetha G K
d11c7baf48 qcacmn: Update the cfr_metadata_len of cfr header
Update the cfr_metadata_len of cfr header

Change-Id: I85f0d4c1637b93608cebb77d6e8ea41b3d1cb713
2021-01-07 08:17:48 -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
Srinivas Girigowda
99cdc9aeff qcacmn: umac: Remove redundant __func__ from the logs
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.

Change-Id: Ife4d1dbb9bfafa4381f1017e331ddef247c649c2
CRs-Fixed: 2774457
2020-09-15 02:45:50 -07:00
Srinivas Girigowda
6ad9002f62 qcacmn: umac: Replace %pM/QDF_MAC_ADR_STR/ARRAY with proper macros
For kernel and driver logs, replace %pM and QDF_MAC_ADDR_STR/ARRAY
with QDF_MAC_ADDR_FMT.
For tx/rx mask, use QDF_FULL_MAC_FMT.

CRs-Fixed: 2763028
Change-Id: I6c56c2040967b279dd31100c4f376f2452146742
2020-08-28 02:01:02 -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
a4bf024bf1 qcacmn: umac: 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: I78b072b5cc623477135823512f9b8e7ef7ef4309
2020-08-23 23:09:36 -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
9472bdfb6c 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: I75cd3218fa4308afad21052e4535ef9b8e5a5869
2020-07-29 09:39:48 -07:00
Manoj Ekbote
181194b1ea qcacmn: Check period while getting CFR capture status
When a one-shot capture is triggered with CFR, the state is not
reset to DISABLED after capture has completed. This affects HW mode
switch behavior because if CFR capture is ongoing (ENABLED), mode
switch is not allowed. This change checks for period to return DISABLED
or ENABLED. Period is 0 in case of one-shot capture.

Change-Id: Iae8727959a1becd3b5f4da166e868c1592910b84
CRs-Fixed: 2735166
2020-07-23 01:57:46 -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
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
Surabhi Vishnoi
9762d883bc qcacmn: Add ucfg_cfr_capture_data api in CFR component
This API is used to parse the cfr capture metadata received in HTT msg
HTT_T2H_MSG_TYPE_CFR_DUMP_COMPL_IND from firmware. It reads the cfr dumps
from host allocated mem chunks for CFR using offset index received in
HTT msg, populates the CFR dumps into streamfs and updates the read
index of memory chunks allocated for CFR during init.

Change-Id: I2f49e308c3659779b8da7ae1baaceb5bfa968b4e
CRs-Fixed: 2687062
2020-07-02 05:55:48 -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