Wykres commitów

133 Commity

Autor SHA1 Wiadomość Data
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
Ananya Gupta
a550225eb1 qcacmn: Rate limit logs when wake request fails
Excessive logging is detected when force wake request
command fails.
Rate limit the logs in hif_force_wake_request and
hal_write32_mb.

Change-Id: I9b1166074dfdb2d58d811571c802a75a6dbc03c5
CRs-Fixed: 2823961
2020-11-23 21:57:39 -08: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
Yeshwanth Sriram Guntuka
1df1553343 qcacmn: Use only shadow writes for REO remap and WBM HP reg
REO remap register direct writes as part of SAP stop could
result in a NOC error if the UMAC is in low power state.

Fix is to use shadow register writes for REO remap and
WBM HP registers.

Change-Id: Ie515c3d28f4ccdd99a3757808f1ab6c5cf373e3d
CRs-Fixed: 2813105
2020-11-18 09:54:55 -08:00
Saket Jha
af0f724da2 qcacmn: Add support to handle BAR frames in host
Due to recent FW changes not filtering out BAR frames, redirect these
frames to REO exception ring and handle as normal data packets.

Change-Id: I4540929fddab14de57a23f6364fc916a70057cbe
CRs-Fixed: 2795499
2020-11-13 13:09:14 -08:00
Mohit Khanna
98181d9ccc qcacmn: Flush reg write work before bus suspend
Delayed register write work needs to be flushed before bus suspend to
make sure there are on pending writes after driver's bus suspend routine
exits. In case delayed work context is not able to finish before the bus
(PCI) is suspended (DRV), it may lead to a NOC error.

Change-Id: I40cbcec5d23ddd75ec87aed69ac45d95510fa880
CRs-Fixed: 2813733
2020-11-09 22:57:51 -08:00
Nisha Menon
a377301c78 qcacmn: Add support to map generic shadow regs
Add apis to map generic registers to shadow region. Existing
logic includes mapping only srng based regs to the shadow
region.
Add support to map REO control regs and WBM2SW2 rel
ring HP reg address to the shadow region in case the direct
reg writes in IPA enable/disable autonomy fail due to UMAC
block being in a power collapsed state.
Shadow reg mapping for these regs is provided to FW during
init. Add stat shadow_reg_write_fail to track shadow reg
write failure and shadow_reg_write_succ to track successful
shadow writes.

Change-Id: I04790765a3de80047689657e2cad0b73123440b9
CRs-Fixed: 2790321
2020-10-20 15:05:51 -07:00
Manikanta Pubbisetty
1a4e3a96c7 qcacmn: add APIs to access CMEM
Adding write/read APIs for accessing the CMEM.

Currently in QCA6750, UMAC and CE windows are statically mapped,
a new static window for CMEM is added for CMEM transactions.

Change-Id: Ie10b33a6f468c6e4db314ea85856414962ef29e3
CRs-Fixed: 2771193
2020-09-17 10:18:23 -07:00
Jinwei Chen
4fdb9be461 qcacmn: Retry reo_dst_ctrl register writing if fails
If reo_dst_ctrl register writing failed, this is a fatal error for
IPA pipe going to down case as RX frames will still be routed to
IPA rings then hit NOC error. retry register writing to see any
chance to write successfully, if fail always, trigger SSR or panic.

Change-Id: I3c03faa28e6cc93f396944579a360d5405c8138e
CRs-Fixed: 2774789
2020-09-15 04:59:41 -07:00
Srinivas Girigowda
5040a3b6ed qcacmn: hal: 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: I6b5beea990e78486e1e5aab5a8df5fc2f1e5ab51
CRs-Fixed: 2774457
2020-09-15 02:45:57 -07:00
Rakesh Pillai
21af5ba8cf qcacmn: Add data structures for SWLM
Add the necessary data structures for the
software latency manager.

Change-Id: Ibf55f0eef7ee6602b007de39a28f09c4622bd356
CRs-Fixed: 2769004
2020-09-10 01:04:20 -07:00
Amir
376724d4f9 qcacmn: Add WAR to skip status ring entry
STATUS_BUFFER_DONE tlv written in first word for a status
buffer indicates that DMA is done for that status ring entry.

In existing implementation, for a status ring entry if
STATUS_BUFFER_DONE tlv is not written by HW, we poll on to status ring
entry until DMA is done by HW.

During lmac reset it may happnen that HW will not write STATUS_BUFFER_DONE
tlv in status buffer, in that case we end up polling infinitely leading
to backpressure on monitor status ring.

As per MAC team's suggestion, when HP + 1 entry is peeked and if DMA
is not done and if HP + 2 entry's DMA done is set,
replenish HP + 1 entry and start processing in next interrupt.
If HP + 2 entry's DMA done is not set,
poll onto HP + 1 entry DMA done to be set.

CRs-Fixed: 2740988
Change-Id: Ieef667f0bb4a47e74fc320c93243c637409f47f0
2020-08-26 14:32:13 -07:00
Alok Kumar
b00f74430d qcacmn: Check target ready before accessing registers on qca6750
Before accessing any register on chip 6750, check if target is
ready or not.

Do not allow register access if target is not ready.

Change-Id: I41a604d04e861c97bdd676998222ccecbf12fd5a
CRs-Fixed: 2688920
2020-07-30 02:05:59 -07:00
Sridhar Selvaraj
3ae6b5c3fe qcacmn: Update REO Remap config API as platform specific
Update REO Remap config API as platform specific

Change-Id: I6a38b87e9181e8bc939e49e3eb55fcd6cace626d
2020-06-12 19:29:39 -07:00
Nandha Kishore Easwaran
3e8172d58b qcacmn: Set low threshold for monitor ring
Configure low threshold for monitor ring only when monitor
vap is created. This is needed to avoid spurious low threshold
interrupts on monitor ring since the low threshold condition always
evaluates to true.

Change-Id: I452c0ada84e0a4f18e410c865d8a6a7f50329aef
2020-06-05 00:48:39 -07:00
Manjunathappa Prakash
32acca2463 qcacmn: Flush the PCIe window select config before device access
PCIe window select config reg update goes on different NoC and
actual PCIe device register access goes on the different NoC.
If there is delay in window select reg config, it can result in
access some other PCIe IO memory access and will result in actual
register write lost issue. Make sure to flush the window select
reg write before actual device reg access.

Change-Id: I1fe17aad7ae8fd5dea7a618273d9cd813b236a85
CRs-Fixed: 2687676
2020-05-29 14:50:57 -07:00
Basamma Yakkanahalli
c0b1d0ebf0 qcacmn: use distinct I/O remap to access CE register for ipq5018
In ipq5018 CE registers(0x08400000)  kept outside WCSS(0x0C000000) block.
As both regions are more than 60MB apart, not feasible to allocate
single resource which include both.
So, using a separate I/O region to access CE registers.

Change-Id: I67bb6d5ac82a1c0ed1d3e13f7776f9d69ee19956
2020-05-18 22:33:42 -07:00
Rakesh Pillai
37cc4255e2 qcacmn: Drain group tasklets and reg write work for runtime PM
Currently as part of runtime PM, only the active
tasklets are being drained. For chips eg. QCA6390,
QCA6490 etc, there are grp_tasklets and delayed reg
write work which has to be drained before entering
runtime PM.

Add the logic to drain all the possible tasks
before entering runtime PM.

Change-Id: Ieb486f00fffd7346dcdc1faea6fed5850ef6daf7
CRs-Fixed: 2676000
2020-05-08 20:27:43 -07:00
Neha Bisht
9aa9221c98 qcacmn: Do Batched invalidate of tx completion descriptor
Do batched invalidate of tx completion descriptor to avoid
unnecessary D-cache miss for 32 byte size descriptor.

Change-Id: Ia580fe78dcef5b36f117aaad171a2df6d0e34966
2020-04-28 05:42:01 -07:00
Vevek Venkatesan
9043089a40 qcacmn: Add prefetch_timer config for CE rings
Add prefetch_timer configuration for CE rings.
Set prefetch_timer=1 configuration for qca6490 destination CEs,
prefetch_timer=0 configuration for other targets CEs.

Basically setting to 1us asking CE hw to update ring tail pointer to
update within 1us. FW side CE SW sets all rings to 1us already.
Idea behind this change  is, we have seen pre-silicon issue where SRC
ring TP read by SW was not seen updated value when prefetch was set
to 8us. Changing prefetch timer value to 1us helps to resolve
pre-silicon issue.
So host side rings need to update the prefetch timer to 1us.

Change-Id: I0830c73517c29cf39e6b2974bf3faa44e5673741
CRs-Fixed: 2669762
2020-04-28 03:59:18 -07:00
Amir Patel
e919b20a34 qcacmn: Replenish last entry in monitor status ring
In current monitor status ring implementation,
on pdev_attach, (srng->num_entires – 1) entries
(to keep one entry slot between hp and tp)
are replenished and last entry is not replenished to HW.

With qcn9000 monitor mode HW enhancements, status and destination ring
can be made lock-stepped.
for qcn9000 lock step is achieved by making monitor status ring
follow the monitor destination reap for a PPDU

However in existing flow during attach monitor status replenish logic
do not fill last entry but is filled up during first subsequent reap.
for first ppdu, i.e. after reaping destination ring,
when status ring is reaped, as first entry (hp = srng->num_entires – 1)
in status ring is NULL, so lock-stepping is not achieved.

To address this issue for qcn9000 as well as HK:
	a. Replenish last entry in monitor status ring during attach
	b. Modify src srng peek API to peek it from hp+1 entry
	c. Introduce new HAL API get cur desc and move next
	d. Remove WAR to skip status ring entries if DMA is not done

Change-Id: I60b8e7c075253d37e6b849a9b24f473c5afce82c
CRs-Fixed: 2626049
2020-04-20 05:54:54 -07:00
Jinwei Chen
b3e587db52 qcacmn: Support RX 2K jump/OOR frame handling from REO2TCL ring
Support RX 2K jump/OOR frame handling from REO2TCL ring.
(a) configure REO error destination ring register to route 2K jump
/OOR frame to REO2TCL ring.
(b) for 2K jump RX frame, only accept ARP frame and drop others,
meanwhile, send delba action frame to remote peer once receive first
2K jump data.
(c) for OOR RX frame, accept ARP/EAPOL/DHCP/IPV6_DHCP frame, otherwise
drop it.

Change-Id: I7cb33279a8ba543686da4eba547e40f86813e057
CRs-Fixed: 2631949
2020-03-24 19:58:16 -07:00
Mohit Khanna
db3f6a4b8c qcacmn: Use right macro to enable delayed register writes
Fix macro name to enable delayed register writes.
Donot use delayed register writes for non fastpath access.

Change-Id: I235116ab3df5cb26bbfbb72de4ac6ed4b363a13a
CRs-Fixed: 2645865
2020-03-24 14:39:10 -07:00
Rakesh Pillai
99e3c8b80e qcacmn: Confirm HP register init when enabling IPA pipes
As a part of enabling IPA pipes, the WBM2SW2 head
pointer register is written with the number of
buffers which have been allocated initially. This
register write is a critical one and failure in
writing this register can be fatal.

Confirm the written value, when initializing
the HP register for WBM2SW2 (for IPA).

Change-Id: Ib2da3a7aa6096375cf64857721619f47c50658de
CRs-Fixed: 2620750
2020-03-24 14:38:55 -07:00
Mainak Sen
aceafadc2e qcacmn: WBM msdu continuation for SG in QCN9000
In QCN9000, wbm release ring has msdu continuation bit
support for invld peer MPDUs. Host needs to form SG
buffer for packets with msdu continuation bit set

Change-Id: Ica03c78068d32d2c8dc609b9a50298b91dd48c0a
2020-03-23 16:07:47 -07:00