Commit Graph

48 Commits

Author SHA1 Message Date
Chaithanya Garrepalli
4fa2c22c80 qcacmn: Add ini param for reo dest ring
Add ini param for reo destination ring size and
cleanup usage of emulation macro

Change-Id: I6e8e0c2d8f57469289eccd3c12c07f3bf6b47c04
2021-09-16 05:09:44 -07:00
Chaithanya Garrepalli
d5006a849b qcacmn: Add support for Waikiki HAL Tx
Added HAL Tx specific function to support Waikiki Tx.

Change-Id: I7ded253739c91ab19490425b3ddd333a86f237c8
2021-08-13 12:04:17 -07:00
Chaithanya Garrepalli
49e18cfe2a qcacmn: DP Tx changes for QCN9224
Changes for DP tx for QCN9224

Change-Id: I7010aef55dc6e8bedfa1c44fe6baa1baa55c32c9
2021-08-13 12:04:02 -07:00
Jia Ding
ffcab816e9 qcacmn: Get buffer_timestamp from wbm release ring
Upon TX completion, get buffer_timestamp from wbm release
ring descriptor.

Change-Id: I0203b51c52a265711e62afc3a940392674ac014a
CRs-Fixed: 2978492
2021-07-14 20:14:36 -07:00
nobelj
25acb759bf qcacmn: Fixes to enable LI & BE in a build
Changes to build Lithium and Beryllium together.
This is needed for WIN

Change-Id: I74c86803ea99fb17d1f73e8b9c4e7cf59751a707
2021-06-07 01:51:15 -07:00
Rakesh Pillai
0e23220e33 qcacmn: HAL TX API changes for beryllium
Add changes to HAL TX APIs for WCN7850

Change-Id: I65f6417c66449fcd57df30ddb4194dc7a34c4722
CRs-Fixed: 2891049
2021-06-05 15:10:50 -07:00
Jia Ding
ebe1849453 qcacmn: Add WBM2SW4 support
To support IPA TX two pipes, WBM2SW4 is added as second WBM2IPA TX
transfer ring.

Change-Id: Id0762003c1d91e3614b15df2bc51f90e27add43c
CRs-Fixed: 2750073
2021-03-23 23:43:37 -07:00
Nandha Kishore Easwaran
1a0bc1efc4 qcacmn: Data path changes for big endian platform
Add reo ring descrptor swap in case of big endian platform.
Convert msi_data into little endian format before writing into
MSI_DATA register. Also change into little endian format while accessing
the shared LMAC registers.

Change-Id: I07f4ae4e6df4608201b63d325c2cbc37436d1592
2020-11-20 08:35:22 -08:00
Radha Krishna Simha Jiguru
41c0716617 qcacmn: Add a change to do fast transmit completion
Lot of checks in Tx completion path are for special handlings
such as when ol stats are enabled some protective debug checks etc..
Add a logic to fast free of buffer at transmit completion.
If extended stats not enabled(Typically needed for enterprise cases)
do the buffer free faster. This is controlled through a flag.

Change-Id: I04873b5e3643d8e93e5b248fcaf23504dcb7624f
2020-04-30 01:51:07 -07:00
Radha Krishna Simha Jiguru
d78c96c67c qcacmn: Restrict lock hold time in tx path
Restrict lock hold time in transmit path to only ring access time.
Also store lmac_id in vdev to avoid multi indirection.
Arrange fields in data structure for better alignment in data path access.

Change-Id: I1d32880ed88be486171be46281ec180d2a4906bf
2020-03-24 02:41:07 -07:00
Tallapragada Kalyan
fa6f80fcad qcacmn: use proper HAL abtraction APIs to get WBM internal error
the current HAL API is to read the WBM internal error
bit from the wbm release ring descriptor is always taking
HKv1 HW structure. But the wbm_internal_error bit
placement has changed from HKv2, for this reason we have
to use target specific HAL API.

Change-Id: I44789180754ca21ae59650b6d8620321a1f12569
2020-01-15 01:30:23 -08:00
Pavankumar Nandeshwar
b86ddaf205 qcacmn: Handle wbm_internal_error in tx completions
Handle wbm_internal_error in tx completions by releasing
associated descriptors and buffers.

Change-Id: I94d334c90c0514674323430fe53da72fb5424576
2019-10-23 10:32:33 -07:00
Venkata Sharath Chandra Manchala
38e84d2722 qcacmn: Add hal_tx_desc_set_mesh_en API
Implement hal_tx_desc_set_mesh_en API
based on the chipset as
the macro to set mesh_en value is
chipset dependent.

Change-Id: I43c85e4ed6fd4f9992de5b71857cdb8becd1dd36
CRs-Fixed: 2522133
2019-10-17 15:10:04 -07:00
Ruben Columbus
da4d1b37e3 qcacmn: tx completion handler with invalid release source
added stats counter to check invalid release reason other than
FW and TQM in tx completion path.
added assert to make sure host is not releasing descriptors with NULL
address.

Change-Id: I3a30bd0f0c3954ed6435489d9b21f16201d1b840
2019-09-29 04:50:13 -07:00
Subhranil Choudhury
4ee1b5e28d qcacmn: Add cache-set-num in HKv2 Tx path
Add the infrastructure to add cache-set-num field in
tx descriptor of HKv2.

Change-Id: Iec9423c3c90f868341b56ced795cd0bb73c9766a
2019-09-15 22:48:47 -07:00
Mainak Sen
f3053eb1d1 qcacmn: Add fields for Tx TQM and FW exception drops
VoW stats should contain fields to count TQM and FW exception
drops

Change-Id: I71a81b8e9cc9428b5c727d77c0eeec5bb23a2b42
2019-09-09 07:08:34 -07:00
Akshay Kosigi
8eda31cab3 qcacmn: Remove void ptr usage in HAL
Add code to replace usage of void pointers from
HAL layer and instead use appropriate opaque pointers

Change-Id: Id950bd9130a99014305738937aed736cf0144aca
CRs-Fixed: 2487250
2019-07-27 13:43:07 -07:00
Akshay Kosigi
0bca9fb200 qcacmn: Change to remove void pointer usage for HAL SRNG
Add code to remove void pointer usage for hal_srng
and use opaque pointer dp_hal_ring_t instead.

Change-Id: I6907f7376d7fe3c9180b8795bd96f49fead2ec64
CRs-Fixed: 2484404
2019-07-27 13:42:41 -07:00
Akshay Kosigi
6a206753d6 qcacmn: Add code to remove void pointer usage
Add code to remove void pointer usage for hal_soc
and introduce opaque pointer to be used intead of void
from dp layer into hal layer

Change-Id: Ia38571174c6ed79558d0f0c9cd1a0f4afaa66483
CRs-Fixed: 2480857
2019-07-27 13:42:34 -07:00
chenguo
73c7b7c744 qcacmn: more debugging information about invaild TX release source
1) Add one counter to track the invaild TX release source
2) Capture he descriptor that caused the issue
3) Print the invalid release source

CRs-Fixed: 2380964
Change-Id: I0dc410ae2e7c9df58ef53e3f20ca7979d086659e
2019-05-04 02:07:34 -07:00
Debasis Das
c39a68da37 qcacmn: Support for 8021p pcp to tid mapping
Add HAL and DP support to configure
8021p PCP to TID mapping tables into Hardware.

Change-Id: I8a54970c8c4ef56f3c487b6e648c4411b3abde0e
2019-03-25 14:24:36 -07:00
Balamurugan Mahalingam
764219e1a8 qcacmn: move some hal functions to hal_generic_api.h
Functions hal_rx_wbm_err_info_get, hal_tx_comp_get_release_reason,
hal_rx_dump_mpdu_start_tlv uses some hardware macros directly and the
value differs between qca8074v1 and qca8074v2 targets.
Move these functions to generic api file and compile it per target.

Change-Id: Ib78fb6e69238577aac64da3f60f38a72cee316b0
2018-10-03 02:44:47 -07:00
Chaithanya Garrepalli
1f64b2453e qcacmn: in tx path set the lmac_id from wlancfg
in tx path set the lmac_id in the tx descriptor
from wlancfg

Change-Id: Ib7f355983142564500a20daa1f0eef41808df449
CRs-fixed: 2320597
2018-09-24 13:02:13 -07:00
Ruchi, Agrawal
fea1a84116 qcacmn: DSCP-TID map change for second hardware
Change to added entries for 48 DSCP TID  map
for second version of hardware.

Change-Id: Ie4aa0e27616e2f03b012e19d025444c8c53fe341
CRs-Fixed: 2315305
2018-09-18 07:50:15 -07:00
Chaithanya Garrepalli
710e2959f2 qcacmn: Add HAL APIs to set search type and index
HAL APIs added to set search type and search index
in tx descriptor

Change-Id: I9fc2eae5d1f75a7cb72ba141f45a60f248b52f9c
CRs-fixed: 2312178
2018-09-16 09:49:13 -07:00
Chaithanya Garrepalli
2467ed1445 qcacmn: avoid wds source port learning for STA in HKV2
Changes to avoid WDS source port learning in STA mode
if ast override feature is supported by HW

Change-Id: I248c8815429e7417dcf3f451912ee5f037af9c25
2018-09-15 21:21:23 -07:00
Balamurugan Mahalingam
5d80641550 qcacmn: [1/2] Support both qca8074v1 and qca8074v2 from hal
Some of the macro names defined in qca8074v1, are defined with
a slightly different name in qca8074v2, and few macros have the
same name in both headers but are defined with different values.
Fixed the same.

Change-Id: I5e948baf5326d1d8fdfa2bd7ee8aa072c710d17c
2018-09-04 11:53:36 -07:00
Balamurugan Mahalingam
d0159640ea qcacmn: Separate hal for qca6290 and qca8074
Create separate individual hal_srng_table and hal register
offset in target specific source files. Create separate
functions for qca6290 and qca8074 for few hal rx tx
functions as the macro value differs between the chipsets.

Assign target specific hal tx, rx ops as part of hal_attach
and call respective hal tx, rx ops through callbacks.

Change-Id: Ibbf490c678c39fdd9d54191aad7aaec786db30ec
2018-07-21 00:03:20 -07:00
Pramod Simha
848fc04585 qcacmn: Fix DSCP-TID mapping configuration recipe
Enable/Disable the DSCP TID map program bit before
writing the mapping configuration into HW registers.
This is a new recipe for NPR AX & HK 2.0

Change-Id: I0af968dab507b32167909dbfa8ecc7a946e4af84
CRs-Fixed: 2221226
2018-05-04 20:43:07 -07:00
Nandha Kishore Easwaran
56c28c0cd1 qcacmn: Assign lmac id on tx packet enqueue
On napier AX, HK2.0 ast search is tied to lmac_id.
This ast search feature is added to support DBDC repeater usecase.
Assign lmac id 3 to search by default on all macs until more
formal per pdev changes are made. This enables 2g.

Change-Id: Ia06d9243bddd3f4943426d6b0de3f452a252d819
CRs-fixed: 2198431
2018-03-08 18:47:14 -08:00
psimha
6d62ef4e59 qcacmn: Change HAL APIs for the new 11AX header
Change some HAL API to correspond to the header changes that got
modified for the Napier 11AX HW.

Change-Id: I514b18bc2a92ad11d95c1079ba8ef4b96b7bc6eb
CRs-Fixed: 2124274
2017-12-07 13:27:19 -08:00
Om Prakash Tripathi
5425c52aa0 qcacmn: Fix DSCP to TID map table
Add below fixes:
1. wifi3.0 only supports 2 HW DSCP to TID map tables.
   Check for supported number of tables before
   updating registers.
2. Do not overwrite previous DSCP TID config for
   different DSCP values while updating TID map
   for new DSCP value.

Change-Id: Icd8af1053fa48d3f1e2db317290f806cd41cd797
CRs-Fixed: 2091195
2017-08-21 01:35:11 -07:00
Pamidipati, Vijay
623fbee5f9 qcacmn: Clean up TxRx statistics
Cleanup the print format for rate stats.
Add missing elements in HAL tx completion structure.

Change-Id: I57aaac605fce5060f7943b9bbe95ef8e8c2d3b7b
2017-08-15 17:32:16 -07:00
Pamidipati, Vijay
4f7c305cfa qcacmn: Fix HTT completions for ME and TSO Tx completions
For frames that are dropped by FW/HW and returned to host through WBM HTT path,
freeing of associated ME buffers (for multicast enhancement) and handling of TSO
segments is missing. Create a new function to handle the freeing of buffers in
Tx completion path and call this function in both HTT completion and regular
completion path.

Change-Id: Ibd061830e9325a2b2be9b1779b67b700f4ac08ae
CRs-Fixed: 2004658
2017-08-09 17:01:59 -07:00
Dhanashri Atre
2fb392b7d5 qcacmn: Changes needed to support new hardware header files
Changes in the HAL APIs to adapt to the new hardware E6 header files.

The changes are in:
- The MSDU link extension descriptor
- The RX MSDU TLV (type_offset)

CRs-Fixed: 2033542
Change-Id: Ib314194f66fd2feea901f849753c9c91ec4a040c
2017-05-19 11:51:04 -07:00
Ishank Jain
243d0f17ad qcacmn: Fix to update Tx Completion stats correctly
Tx rate stats werent getting updated correctly due
to usage of wrong wrong macro

Change-Id: I1e3e4b0b44015b7c9d78baaa0b9a9e4cf62a6497
CRs-Fixed: 2045275
2017-05-18 10:36:49 -07:00
Ishank Jain
949674c4cb qcacmn: Add DSCP_TID changes for Lithium
Add command to set mapid for each VAP using:
iwpriv athX s_dscp_mapid  N

Add command to change tid values in PDEV maps using:
iwpriv wifiX s_dscp_tid_map <MAP_ID> <TOS> <TID>

Change-Id: I510a40e71ecec5c453dd2dff1b13fd5ebedbe98a
CRs-Fixed: 1108452
2017-03-21 22:01:27 -07:00
Ishank Jain
5122f8fc48 qcacmn: Enable TSO support for QCA8074/6290 DP
Add TSO support for transmit datapath of QCA8074/6290

Change-Id: Id7254859372aa43e3ed16f80c0240d1b78ae63cc
CRs-Fixed: 2004658
2017-03-17 00:36:45 -07:00
Vijay Pamidipati
d61006cb6b qcacmn: Fix the offset for HAL Tx Rate stats and
enable stats by default

Add a WAR to not use macros from Hardware Header file.
Will be removed once it is fixed in Hardware header file.

Change-Id: I73152645c89813dd65c23d9060e8b6fad1d88678
CRs-Fixed: 1112381
2017-03-08 15:06:27 -08:00
Ishank Jain
2f81e9605e qcacmn: Increase size of MSDU EXT DESC
Size of MSDU Extension descriptor increased to accomodate HTT Meta data.

Change-Id: Iaaf87f2f184ec9f144501b9a508bf91d08cad791
CRs-Fixed: 1114769
2017-03-07 21:48:46 -08:00
Vijay Pamidipati
4d5d436e8a qcacmn: Add missing lock protection between DP Tx and Tx completions
Change-Id: I68dd5371688235c173a5bc6576601389146e0ecb
CRs-Fixed: 2004658
2017-02-17 10:35:25 -08:00
Debashis Dutt
af64522cc3 qcacmn: Add debug logging To Tx/Rx path
Add Tx completion status value to the logging
of Tx completions. In addition dump Rx meta-data
and first few bytes of Rx packet only on NAPIER
EMULATION platform. This is only to facilitate
faster debug from the logs, and will be disabled,
once we have more stability.

Change-Id: I69d9e2fd6ad32efe01b8e56f355db5ed6d4d2e70
CRs-Fixed: 1116939
2017-02-01 16:23:39 -08:00
Dhanashri Atre
a98e024f86 qcacmn: Change due to R102 hardware headers for QCA6290
Changes needed to support the new definitions introduced
in the R102 hardware header files for QCA6290.

Change-Id: I4e3c27dfdc48b4d6a44f0f50f3e4a907be20e53d
CRs-Fixed: 1105853
2017-01-18 20:05:31 -08:00
Vijay Pamidipati
5bcfa31ec4 qcacmn: Add support to process Tx completion status from WBM descriptor
Add HAL API to parse Tx completion statistics from WBM descriptor and
populate HAL Structure and a DP API to print the statistics per packet

CRs-Fixed: 1088985
Change-Id: Ic6e918aabdbd7743d8f640e0451070dc229c6f0d
2016-12-23 06:06:01 -08:00
Pamidipati, Vijay
b90a79ec7d qcacmn: Fix packet offset computation logic in Tx path
Fix the packet offset value filled in Tx descriptor.
Also fix a crash in Tx completion handler because of storing wrong
pointer in tx descriptor chain (next)

CRs-Fixed: 1088985
Change-Id: Ie2895700e0bb7e6f4b7b09a01da07a17d1c41160
2016-12-07 14:38:40 -08:00
Leo Chang
5ea93a4527 qcacmn: wifi3 compile against cdp
Wifi 3.0 compile against cdp apis.
Make compilable against mobile code base.
selective hw common header include.

Change-Id: I051f917001c0d13c762d9cb5a3ec141cd278d0e7
CRs-fixed: 1075736
2016-11-17 19:13:03 -08:00
Pamidipati, Vijay
576bd154a2 qcacmn: Add Lithium DP Tx core functionality
Implement Lithium Core Tx Data Path, Tx HW descriptor processing
and Tx Completion Path (Processing of WBM Release Ring)

CRs-Fixed: 1073253
Change-Id: I11bebc49177398a157fcd161228859e2ef860402
2016-11-01 20:06:51 -07:00
Vijay Pamidipati
a3e1e3ca75 qcacmn: Add HAL Tx library needed for Lithium Datapath
Implement HAL APIs for accessing HW_TCL Data Descriptor,
processing of Tx MSDU Extension Descriptor and WBM Descriptors.

CRs-Fixed: 1073253
Change-Id: If6bd5c3ef7837b6968295d1a2cd5a18299d4ce42
2016-10-28 07:07:35 -07:00