提交線圖

157 次程式碼提交

作者 SHA1 備註 日期
Nanda Krishnan
baf49c9f89 qcacmn: Tracking the ring util stats
Added serviceability changes to track ppe2tcl
and wbm2rel ring util stats

Change-Id: Ia154ae4914c47f010921eaed10b8a4dde50884bf
CRs-Fixed: 3537655
2023-06-27 21:48:54 -07:00
Srinivas Girigowda
48cf24b446 qcacmn: Remove trailing newline from the DP Logs
Remove trailing newline from the DP Logs.

Change-Id: Iaf54e57fb44cf7c15d82bd5c0ffb3fc7c3d04a2b
CRs-Fixed: 3492501
2023-05-18 18:42:08 -07:00
syed touqeer pasha
5b0980f461 qcacmn: Check Tx halt during umac reset
1. Check Tx halt during umac reset and avoid halt if set already.
2. Perform SRNG disable only in case of umac reset

Change-Id: Id364a6460a64e83002b5c96e08031ad2a0bc8fd7
CRs-Fixed: 3459427
2023-04-14 01:54:13 -07:00
Jinwei Chen
95dcc45ec2 qcacmn: Add srng pointer register writing history support
Add srng pointer register writing history, it is helpful
for debugging srng HP/TP update issue from host side.
(1) if host faced UMAC source ring, record the HP value and timestamp
when host write the register.
(2) if host faced UMAC destination ring, record the TP value and
timestamp when host write the register.

Change-Id: Ib98e48e1d32defb0d8b30b854b5b0c23691cca59
CRs-Fixed: 3427908
2023-03-17 12:42:28 -07:00
Venkateswara Naralasetty
bd07dadb15 qcacmn: hal changes for wcn6450
Changes required for hal attach for wcn6450.

Change-Id: I7953f14f168b570d598ff88fcdf1f5363e2d4d52
CRs-Fixed: 3383310
2023-03-15 22:38:34 -07:00
Jinwei Chen
c2c0f7f7f9 qcacmn: Support REO2SW ring pointer update threshold configuration
Support REO2SW ring pointer update threshold configuration,
it is helpful for PCIe utilization improvement.
timer based threshold - M: issue pointer updates when M micro
seconds has elapsed.
number based threshold - N: issue pointer updates when N entries
updates occur.

Change-Id: I49ed388520fd52e97e303d6ea9c04ced6cb5cf5f
CRs-Fixed: 3420101
2023-03-08 17:24:33 -08:00
Jeff Johnson
201bd01d1e qcacmn: Fix hal/wifi3.0 documentation
The kernel-doc script identified a number of kernel-doc issues in the
hal/wifi3.0 folder, so fix them.

Note that there are a number of instances where public functions have
their implementation documented in addition to having their interface
documented, so remove the duplicate documentation since only the
interfaces should be documented.

Change-Id: Ic238c0f53658e8754882c83204ffae5ad713ec6b
CRs-Fixed: 3410624
2023-02-23 03:45:23 -08:00
Pavankumar Nandeshwar
a2ddd8956b qcacmn: Retain ds ring indices across wifi restart
Retain ds ring indices across wifi restart to avoid
edma hang. Fetch the indices from ds module and set
the corresponding ds ring indices.

Change-Id: Ia299a7006166aef096c7d2c1f65f6bef65415a37
CRs-Fixed: 3332152
2022-11-25 00:08:26 -08:00
Yeshwanth Sriram Guntuka
9b059a3bc0 qcacmn: Add support for getting CE srng info for Direct Link
Add support to fetch CE srng information used for
direct link datapath.

Change-Id: If38b892b28eba711d7949fa02926205dc601a50e
CRs-Fixed: 3317501
2022-11-12 03:11:01 -08:00
Yeshwanth Sriram Guntuka
e228622034 qcacmn: Add support to configure MSI registers for Direct Link CE
The MSI address and data information for Direct Link
copy engines will be available once the WiFi driver
on LPASS is initialized. Add support to configure the
IPCC address and data values into Direct Link copy
engines at runtime.

Change-Id: I5e7dff90c2f1ff764462c235deb5795ed019a16b
CRs-Fixed: 3316679
2022-11-12 03:10:53 -08:00
Tallapragada Kalyan
4c45f8a2ed qcacmn: get HP of RXDMA ring without incrementing
get the HP of the RXDMA ring without incrementing
This will ensure in case of nbuf failures the ring
HP remains unchanged

Change-Id: I69ec9207a44a4c50484933797326e962ad2d4a5c
CRs-Fixed: 3309394
2022-10-16 07:49:31 -07:00
Manish Verma
bc05063ebb qcacmn: Add support for DS UL processing
Add support for PPE-DS REO2PPE ring processing

Change-Id: I74f4195ce4a58d1afaef132257b969ce38a65e1c
CRs-Fixed: 3278270
2022-10-11 14:23:18 -07:00
Jeff Johnson
117ae69181 qcacmn: hal: Fix misspellings
Fix misspellings in hal/...

Change-Id: Icf033a647e6a15d46420d7102dc161b94fa7dd2c
CRs-Fixed: 3304685
2022-10-10 23:02:47 -07:00
Pavankumar Nandeshwar
a615488cf4 qcacmn: Hal changes for Umac post reset at host
Hal layer changes to handle Umac post reset
and post reset complete events from firmware.

Change-Id: Ib25427930aab25650731c87b38e2ef7e47ae98d9
CRs-Fixed: 3267222
2022-08-21 00:37:53 -07:00
Tallapragada Kalyan
f7a1c7e0c7 qcacmn: Add HW, SW and nbuf prefetch support in Berryllium
Add HW, SW and nbuf prefetch support in Berryllium, this will
ensure we have prefetched the HW desc, SW desc and nbuf by
the time we are in the 3rd iteration of the dp_rx_be_process
first loop.

CRs-Fixed: 3218647
Change-Id: I27d371c5d1c9a37d61e4fc00d5eb03609fad589c
2022-08-11 09:47:27 -07:00
Rakesh Pillai
9ba8236444 qcacmn: Add support to track high watermark for SRNGs
Add support to track the high watermark for the number
of entries which are used at any given instant. This helps
in identifying if the ring size is sufficient or is being
full for certain use-cases.

Change-Id: Id3ffa52c653696699fbcfbb556a815d5f7908863
CRs-Fixed: 3235115
2022-07-11 03:59:38 -07:00
Ananya Gupta
8565e7029f qcacmn: Register DP, HTC, HAL modules with Runtime PM module
With restructuring in HIF runtime PM module, modules are
required to register with the HIF runtime PM module. Also,
changes are done in functions of allowing and preventing
runtime PM suspend as part of restructuring.
This change registers DP, HTC and HAL internal modules
with runtime PM module and update HIF runtime PM function
calls with the restructured code of HIF runtime PM module.

Change-Id: I8899a1d3b92a90a05c5eaf4df7609f4008f739f8
CRs-Fixed: 3169372
2022-06-18 23:11:24 -07:00
Jinwei Chen
a3585f6fe8 qcacmn: Add sanity check for BA window size in DP
The original BA window size given from CP might > max DP supported,
add sanity check based on HAL target allowed.

Change-Id: Ibadaddeffe65165a89d580d8a5cbf5f7c724c809
CRs-Fixed: 3193852
2022-05-26 01:32:39 -07:00
Mohit Khanna
04bf8070da qcacmn: Reo-Cmd: Donot write to reg if no src desc
For reo_cmd ring, in current implementation, we call hal_srng_access_end
in case a descriptor is not available before baling out. This may cause
a write to the shadow register for the reo_cmd ring. In case we are in
the middle of WOW, this can be problematic.
Modify existing implementation to use hal_srng_access_end_reap, which
will not schedule a write to the register and simply return.

Change-Id: Ifb83d904e39b3d749522cd246a5ab3fe51a3104e
CRs-Fixed: 3194289
2022-05-24 16:01:27 -07:00
Rakesh Pillai
68f96a8c79 qcacmn: Add support to send Shadow config v3
Shadow config v2 can support max of 36 shadow
registers only. For KIWI target, there are 40
shadow registers supported.

Hence add support to send shadow config v3
for KIWI.

Change-Id: If57e6597397da3e239f25a6c0cc24f8fd37dcdf1
CRs-Fixed: 3167758
2022-05-19 01:57:23 -07:00
Chaithanya Garrepalli
cdbc3c0f76 qcacmn: Fix batch invalidate issue in ring WRAP around case
In ring WRAP around case invalidate the descriptors which
are being reaped

Also use no_dsb invalidate API for invalidate descriptors

Change-Id: Iafa844c81a8364af31520ce5fa3e030073e7c706
CRs-Fixed: 3198373
2022-05-17 16:44:56 -07:00
Amit Mehta
d2199b7a99 qcacmn: Set default value for REO dest ctrl register
Currently in some case we are receiving non error packets on REO2TCL
ring, which is causing issue.

Fix is to set DEST_RING_MAPPING_0 to SW1 for REO dest ctrl
register, So that non error packets with reo_destination_indication
with 0x0 in the reo entrance ring will be routed to SW1 ring.

Change-Id: I67f78f35e7dba899943307902d99d0325a60498f
CRs-Fixed: 3150186
2022-03-17 07:25:12 -07:00
Jinwei Chen
77530eea0b qcacmn: support PLD lock for window register accessing
Currently window register accessing with PLD lock is not enabled for
HIF path of KIWI, enable it so there is no race condition with HAL
register accessing path.

Change-Id: Iceeba36ca6febdeca0e7f7bc0dcb7d4adc17bc51
CRs-Fixed: 3110425
2022-01-27 23:00:55 -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
Tallapragada Kalyan
4e7ceff561 qcacmn: Prefetch RX HW desc, SW desc and SKB in pipeline fashion
Prefetch RX HW desc, SW desc and SKB in pipeline
fasion in the first loop of RX processing.

This has improved TPUT by 200Mbps and provided a
10% gain in CPU (single core)

PINE with other optimizations: 3960Mbps @ 100% core-3
PINE + pipeline prefetch: 4130Mbps @ 90%  core-3

Change-Id: I47f351601b264eb3a2b50e4154229d55da738724
2021-11-22 13:36:33 -08:00
Tallapragada Kalyan
e3c327a0ba qcacmn: do a batch invalidation of REO descriptors
Added an API to do a batch invalidation of REO descs
saw an improvement of 40 to 45 Mbps.
Note: this change is applicable only for cached
descriptors

PINE with Default driver: 3189 @ 100% core-3
PINE with skb prefetch: 3469 @ 100% core-3
PINE with skb pre + batch inv: 3506 @ 100% core-3
Change-Id: Ic2cf294972acfe5765448a18bed7e903562836c3
2021-11-22 13:36:28 -08:00
Vevek Venkatesan
7a2c2fd90f qcacmn: cleanup FEATURE_HAL_DELAYED_REG_WRITE_V2 support
This FEATURE_HAL_DELAYED_REG_WRITE_V2 was added to fix the
Audio jank issue, but it could not resolve it completely,
so that was later fixed by existing delayed reg write
support with the help of SMP2P messages to communicate
with FW regarding PCIe link status. This code is not being
used, so removing it and cleaning up the redundant code.

Change-Id: Iada088e72a76b4c071c8a80ee945f36ac959670e
CRs-Fixed: 3056475
2021-10-18 06:13:49 -07:00
Chaithanya Garrepalli
b733f89803 qcacmn: change RxDMA rings to DMAC mode for QCN9224
For Waikiki use same SW2RxDMA ring for both radios

Change-Id: I33ab1749afada08e97d0b16fe68773c2d5532a15
2021-10-11 08:06:37 -07:00
Pavankumar Nandeshwar
2228afc5b4 qcacmn: Enable HW cookie conversion feature
Enable Hardware cookie conversion feature

Change-Id: I75299384ad7b795160b9cf04768326c74401b1ba
2021-08-16 23:14:14 -07:00
Vevek Venkatesan
1a98ac54d7 qcacmn: init last_desc_cleared and it should always behind tp
Initialize the last_desc_cleared pointer to -1 not 0, and
also fix the check it should always behind tp.

Change-Id: I281e066d45a99ac99d4f3c4e0bcc3f65f14bb589
CRs-Fixed: 2987029
2021-07-12 00:22:00 -07:00
Vevek Venkatesan
f49df07dae qcacmn: add support to clear the consumed HW descriptors
Add support to clear/reset the consumed HW descriptors
to zero.

Change-Id: Idccb120afa448c4f958a3177f27cab9b1197ac3e
CRs-Fixed: 2978850
2021-07-02 07:24:54 -07:00
Rakesh Pillai
5d44eac10a qcacmn: Enable PN check for 2K-jump and OOR frames
Currently the EAPOL/ARP/DHCP frames arriving as 2K-jump
or out-of-order frmaes are being delivered to the network
stack, without checking for the packet-number sequence.

WCN7850 has hardware support to provide the packet number
of the previous successful re-ordered packet from hardware.
Use this feature to check if the packet-number are in proper
sequence for these EAPOL/ARP/DHCP packets arriving as 2k-jump
or out-of-order packets before submitting it to the network
stack.

Change-Id: I1078452afce4bc00b2509436295e5bd80000feb4
CRs-Fixed: 2965086
2021-06-30 13:48:31 -07:00
Rakesh Pillai
5605d45923 qcacmn: Add near-full irq processing handler for RX ring
Add the handler to process the near-full condition
on the rx ring.

Change-Id: I426480386c4716702f8410ed87c70160decaa03f
CRs-Fixed: 2965081
2021-06-30 13:48:07 -07:00
Rakesh Pillai
37e2c6d9ed qcacmn: Register IRQ for near full irq
WCN7850 has support for near full indication for
the consumer srngs. This interrupt is used to take
preventive actions to avoid ring full watchdog irq
trigger.

Register for the near full irq and add the necessary
ext groups for these near-full irqs.

Change-Id: Ic16381fceabc54e6c52b34dd13abea74cad4d38c
CRs-Fixed: 2965081
2021-06-30 13:47:51 -07:00
Manjunathappa Prakash
cebffa806d qcacmn: Add support for additional REO rings for Beryllium
Beryllium supports additional REO rings to cater increased bandwidth.
Enable additional REO rings.

Change-Id: I5124c92e30e4ac56a78b6f5f38d1c91a2933bba8
CRs-Fixed: 2930184
2021-06-30 13:47:46 -07:00
Jinwei Chen
4083155141 qcacmn: Add support for HW cookie conversion
Support HW cookie conversion for BE platform.

Change-Id: I39058fbf256266557f5e734ba376db4db0731b24
CRs-Fixed: 2929533
2021-06-23 23:32:49 -07:00
nobelj
8a11583471 qcacmn: Add field to return Lmac ring start ID
Return LMAC start id also as part of hal_get_meminfo API.
This field is added to hal_mem_info struct.

Change-Id: I013d357cf4337702c06a91ed15e8337469865270
2021-06-10 06:16:57 -07:00
Rakesh Pillai
052dc539e3 qcacmn: HAL API changes for beryllium
Add HAL API changes for WCN7850

Change-Id: I1b5cedfee609d539ed03f103bbbc4394efddb0dc
CRs-Fixed: 2891049
2021-06-05 15:10:50 -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
Karthik Kantamneni
cfbfcf3b21 qcacmn: Fix race condition during IPA map/unmap handling
While Rx buffers are getting umapped from net rx context if IPA
pipes are enabled at same time from MC thread context this is
leading to race condition and IPA map/unmap is going out of sync.

To fix this introducing IPA mapping lock and IPA mapping need to
be handled with lock held.

Change-Id: I9fa71bdb6d4e4aa93fc795cc5dd472a181325991
CRs-Fixed: 2945063
2021-05-27 13:41:35 -07:00
Yeshwanth Sriram Guntuka
05f4bb3104 qcacmn: Return the entry size in bytes from srng
hal_get_entrysize_from_srng returns the entry size
in dwords but the caller expects in bytes. This results
in insufficient data to be recorded for CE event.

Fix is to left shift the entry size by two bits in
hal_get_entrysize_from_srng so that the entry size
value returned is in bytes.

Change-Id: If532da7abe5ce9c293969f0052455085f18b1926
CRs-Fixed: 2935196
2021-05-07 07:18:10 -07:00
Nisha Menon
5d7e26e27f qcacmn: Dump the rx reo queue descs in ddr
Add iwpriv option 34 to dump the reo rx h/w descs
in DDR for debugging. This cmd will first send cache
flush cmd to REO for all rx tids and invalidate the h/w
cache. Henceforth ensuring that the reo status tlvs and
the DDR values are in sync.
iwpriv wlan0 txrx_stats 34 0
Add fix to ensure bar frame with 2k jump err code is
processed correctly using the REO error code instead of the
REO push reason.

Change-Id: Ia05be668343f3a5d4b3262b8d6a367a50875add5
CRs-Fixed: 2895965
2021-04-13 14:50:51 -07:00
Nisha Menon
ed3a77563a qcacmn: Add wbm head/tail pointer stats to dp_txrx_stats
Add wbm head/tail pointer stats to dp_txrx_stats and ring
usage percentage for all SRC and DST rings.
Stats added to the following cmd: iwpriv wlan0 txrx_stats 26 0

CRs-Fixed: 2865996
Change-Id: I7d144d87c5f3485ec9ba85f50b036b69a64e53c6
2021-03-11 18:01:27 +05:30
Nisha Menon
8d4b739df0 qcacmn: Enable device force wake recipe in driver
Enable force wake recipe feature DEVICE_FORCE_WAKE_ENABLE
and disable the generic shadow register write feature
GENERIC_SHADOW_REGISTER_ACCESS_ENABLE.
Force wake recipe will be used to write to the REO remap
control registers by waking up the UMAC instead of using
shadow register writes.
Assert soc wake reg and poll on the scratch reg to check
if UMAC is awake.
Enable HIF_REG_WINDOW_SUPPORT to enable windowed reg
read/write in HIF layer.

Change-Id: Ib696e27e19a07c0084c097b95b7780b56e643c8b
CRs-Fixed: 2850590
2021-02-24 19:35:13 -08:00
Karthik Kantamneni
3c3d944246 qcacmn: Enhance error signature in qdf_check_state_before_panic
Improve error signature in qdf_check_state_before_panic API.

Change-Id: I5774c07e9359b711f0863c40072962b802318f2f
CRs-Fixed: 2879026
2021-02-18 07:47:05 -08:00
Vevek Venkatesan
38af510319 qcacmn: add dedicated workqueue for Tx ring delayed reg write
Add delayed SRNG register writes support for Tx Ring, also add
dedicated workqueue to do the delayed Tx SRNG register writes.

Change-Id: I8dd157d341f3035e988804eab50d1ca681ab789b
CRs-Fixed: 2868989
2021-02-12 14:40:11 -08:00
Yeshwanth Sriram Guntuka
871c29e8f2 qcacmn: Set IPA WBM2SW ring HP to DDR addr on disable pipes
WLAN HW can still access the IPA tx doorbell address post
disable pipes if there are any pending tx completions which
could result in a NOC error.

Fix is to reset the WBM2SW ring HP addr to shadow addr in
DDR before pipes are disabled.

Change-Id: I52900eb34530388487923a887354ef8839d8c728
CRs-Fixed: 2846421
2021-01-06 13:52:45 -08:00
Shiva Krishna Pittala
d692460e35 qcacmn: Add HAL srng access APIs that handle endianness conversions
Current implementation of hal_srng_access_start() reads the ring pointer
in the same byte-order as it is written by the target. This results in
byte-order mismatch on a big-endian Host because the WLAN target is
little-endian based. For most of the srngs, the target already takes of
this by converting the ring pointer to the host-order before writing to the
DDR. But for other srngs, the Host needs to handle the endianness
conversions. Add HAL APIs to do the same.

CRs-Fixed: 2844519
Change-Id: Ieb47391ac0acc3724e854f433915dd5b1219bebe
2020-12-28 13:07:03 -08:00
Yeshwanth Sriram Guntuka
2ae7335604 qcacmn: Use the pld register window lock for Lahaina and Cedros
Use the pld register window lock for Lahaina and Cedros.

Change-Id: I34431dce6c5ed6e03f5805e36fd7df47754a8c14
CRs-Fixed: 2835825
2020-12-16 11:55:58 -08:00
Nandha Kishore Easwaran
1d68998d30 qcacmn: Use cache_inv instead of cache_sync
Use cache invalidate api instead of cache_sync since
cache_sync api is not available in MIPS platform.

Change-Id: I4b8e2fc3cb9055d1c392c2f6dbe7d6be7c66031b
2020-12-08 07:21:36 -08:00