Commit Graph

1045 Commits

Author SHA1 Message Date
Yu Tian
3cbef591fb qcacmn: Fix napi_complete function call limitation
napi_completion could stop NAPI re-queue only if
returned budget is small than limit budget. WLAN
driver IRQ affinity change would force NAPI complete.
In some cases, RX is in busy loop, RX NAPI could be
queued to more than one CPU NAPI polling list, which
will lead system crash. This change is aimed to make
sure that returned budget is smaller than the limit.

Change-Id: I1b93596b8afc3ee09c4caeceb7a7ba98c4bed4d1
CRs-Fixed: 3420953
2023-03-08 12:27:33 -08:00
Venkateswara Naralasetty
a8c2c9d5e7 qcacmn: add RRI on DDR support for WCN6450
Add required changes for RRI on DDR support for wcn6450 as
it support SRRI/DRRI updates over DDR.

Change-Id: I734e177660069e1e21996f1c4489567b3527cabc
CRs-Fixed: 3383301
2023-03-03 05:27:01 -08:00
Venkateswara Naralasetty
fffd884d26 qcacmn: add shadow register config support for wcn6450
Add support to send shadow register configurations to target
for wcn6450. This support is enabled with the feature macros
CONFIG_SHADOW_V3 and CONFIG_ADRASTEA_SHADOW_REGISTERS.

Change-Id: Ib67993ec838195a5fe174d42cf54ddc0075c3bc3
CRs-Fixed: 3381139
2023-03-03 05:26:51 -08:00
Venkateswara Naralasetty
4728143e0e qcacmn: add MSI and timer/batch intr threshold config support
WCN6450 CE provides registers for configuring MSI and timer/batch
interrupt thresholds like Lithium SRNGs.

Configure MSI and timer/batch interrupt threshold registers
during CE ring setup.

Change-Id: Ifa4c5a4d14caa70ae644123409cccc6f56476d85
CRs-Fixed: 3381135
2023-03-03 05:26:41 -08:00
Venkateswara Naralasetty
1067c35404 qcacmn: add ce src/dst desc changes for wcn6450
WCN6450 uses adrastea copy engines with the following changes
for data and control messages between host and target,
 * 40-bit addressing support
 * SRC/DST desc format changes

Add ce desc changes required for WCN6450 data path.

Change-Id: I71f60f8f23aa7eebb9fa3848d33a02d579e9ef7a
CRs-Fixed: 3381129
2023-03-02 23:54:09 -08:00
Venkateswara Naralasetty
ad3cd5fa15 qcacmn: hif/ce changes for wcn6450
Add the following hif/ce changes to add support for wcn6450,
* New host/target wlan ce config for wcn6450
* New service to pipe map for wcn6450
* New host/ce/target table attach for wcn6450

Change-Id: I20fa1410f5e4e7a0146bc2d0b48a18269ca4a8c9
CRs-Fixed: 3381111
2023-02-26 12:33:47 -08:00
Mohammed Ahmed
03dcdab044 qcacmn: add rtpm stats sysfs functionality
Current code allows for viewing Runtime PM stats via debugfs only.
Fix this by adding sysfs viewing functionality.

Change-Id: I97fe054bab5651f538c8d80ad031dc33933946a4
CRs-Fixed: 3414303
2023-02-25 01:29:32 -08:00
Venkateswara Naralasetty
2021fc9249 qcacmn: Move CE descriptor related macros out of qdf
Currently few macros related to CE descriptor are defined in qdf_types.h
Which is not the right place to have such macros. Hence moving them to
ce_internal.h file.

Also, have different macros for WCN6450 as the ce descriptor offsets got
changed for WCN6450.

Change-Id: I20414273793034bbab80304bcd643371d281fb7f
CRs-Fixed: 3386470
2023-02-24 00:05:59 -08:00
Namita Nair
c6a6c4563d qcacmn: PCIe prevent_l1 for optional wifi dp feature
This change will hold the PCIe in L0 state for the
duration of this feature. The hold will be
released after data transfer is complete.

Change-Id: I762bc3423059ad641bdd00ac5b301a1e1b16f6c2
CRs-Fixed: 3406490
2023-02-23 17:20:37 -08:00
Mukul Dhiman
66fa364229 qcacmn: Remove macro ENABLE_10_4_FW_HDR
Remove all occurrence of ENABLE_10_4_FW_HDR and conserve
any logic change.

CRs-Fixed: 3345419
Change-Id: I37993fd2412a99e605290f5a895b7d8d634b5a69
2023-02-13 04:04:52 -08:00
Nandha Kishore Easwaran
f2ffa7ab59 qcacmn: Hif changes for umac reset in QCA5332
Add hif changes for umac reset in QCA5332. Changes are done to read the
umac reset IPC number from dst and request irq for the same.

Change-Id: I0feafb06ef63f37c3ae6db0270bd5ed50debd91d
CRs-Fixed: 3401146
2023-02-12 16:28:00 -08:00
Hariharan Ramanathan
5b8182fd3c qcacmn: Split hif_ahb_get_soc_info_pld function
Split hif_ahb_get_soc_info_pld function as some chips need to get
bar address only and some cmem only.

Change-Id: I804879c3277828068aaead2aacbe67bd8cf32c44
CRs-Fixed: 3392678
2023-02-08 06:56:26 -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
Anbarasan Ganesan
f066d5ca6a qcacmn: Use ioremap() instead of ioremap_nocache()
As part of compiling wifi driver in kernel version 5.15,
the kernel API ioremap_nocache() is no longer supported in
kernel version 5.15.

Kernel API ioremap_nocache() is being replaced with
ioremap() in kernel version 5.6

So, bringing ioremap_nocache() API under kernel version check.

Change-Id: I139556e55f8c20093137960f116b3fc067a1829f
CRs-Fixed: 3357183
2023-02-06 13:32:30 -08:00
Wade Song
ff002128c9 qcacmn: Increase the number of pcie slots supported
With some new platforms planned, 5 pcie slots have to be
supported by the wlan driver.

Increase WLAN_CFG_MAX_PCIE_GROUPS to 5 to make sure wlan
probe is successful even when the wlan card is attached
to the last pcie slot.

Change-Id: Iab040a26e58b9d95321c29f88f87b7923198b7dd
CRs-Fixed: 3390735
2023-01-30 21:45:54 -08:00
Mohammed Ahmed
15ec2eab73 qcacmn: add peach specific BAR remap register offset
Current code has incorrect BAR remap register offset defined.
Fix this by adding peach specific BAR remap register offset.

Change-Id: I8bbd6270f502da87fa1ccbcf667662bcf916dc03
CRs-Fixed: 3388309
2023-01-27 18:07:15 -08:00
Rajeev Kumar
b13f3f39a3 qcacmn: Add new line after WoW wake lock log stats
Add new line after WoW wake lock log to assist in debugging
by keeping new stats separate from old stats.

Change-Id: I818635a0afc70c82bf1a6b8e8b4e57c116d2a7e6
CRs-Fixed: 3383789
2023-01-25 23:15:49 -08:00
Jeff Johnson
7cbbd39379 qcacmn: Fix hif/src documentation
The kernel-doc script identified a large number of kernel-doc issues
in the hif/src folder, so fix them.

Change-Id: Ia944c6c9f1bcb6a8f5f0ff07ca0afa7bf3a40ad0
CRs-Fixed: 3375493
2023-01-20 19:09:30 -08:00
Nandha Kishore Easwaran
9898b18b1c qcacmn: Add DBR service for 5332
Add DBR service into pipe config for 5332 target

Change-Id: I0a0182a31458adf1ba4b6e848c7c201bc1582bfa
CRs-Fixed: 3379310
2023-01-20 09:07:13 -08:00
Venkateswara Naralasetty
06e90b5374 qcacmn: Add default register values for WCN6450
Add default register values required for WCN6450.

Change-Id: I47880e95cb101ad145d4e750e8811a0153b19482
CRs-Fixed: 3381090
2023-01-20 01:35:27 -08:00
Hariharan Ramanathan
f75a30225c qcacmn: Add changes to move ioremap outside interrupt context
Add changes to move ioremap of PMM SCRATCH register outside
interrupt context, as ioremap in interrupt context in not valid.

Change-Id: I0fa645c55e10a5241011a1f4ffdccdca48c50d29
CRs-Fixed: 3371194
2023-01-10 05:32:28 -08:00
Jeff Johnson
6d84faa9cf qcacmn: Use QDF NAPI APIs in HIF
Currently the HIF code directly calls Linux NAPI APIs. However, the
QDF has abstractions for these. Furthermore, the QDF implementation
properly handles NAPI API changes introduced in Linux Kernel versions
5.19 through 6.1. Therefore, modify HIF to use the QDF NAPI APIs so
that the version-specific changes are only needed in QDF.

Change-Id: Ibc6c69c9add8d2829ac34dcdcf8b2b262f7304b7
CRs-Fixed: 3364162
2022-12-21 13:55:08 -08:00
Yu Tian
d39e5eeaaa qcacmn: Change HIF latency print level
The HIF latency log is outputted to kernel message buffer, which
slows down the efficiency and may introduce process stuck. Change
is aimed to use info high log level to let the log output to
driver log.

Change-Id: I0be4a3f904484305e6c11127f82bb1ea77b33cd9
CRs-Fixed: 3342422
2022-12-05 13:04:06 -08:00
Li Feng
04014003d6 qcacmn: Add timeout of NAPI polling for single MSI case
Observed NAPI of REO2SW1 hard to complete caused by slow CPU/schedule
on REO2SW1, hence IRQ of REO2SW1 keep disabled during the polling which
impact other MSI as well in single MSI case, until hit REO2TCL timeout
and crash.

The fix is complete the dp rx NAPI poll and re-enable the irq if the
irq disabled for long time.

Change-Id: I5e70d9646b78307ab0c35e2ac0d6e3647804c476
CRs-Fixed: 3332143
2022-12-04 10:08:53 -08:00
Yeshwanth Sriram Guntuka
f2bb688784 qcacmn: Modify existing API to fetch direct link dest buf size
Modify existing API used to fetch direct link destination
buffers to also get destination buffer size.

Change-Id: I6c220fe9bbb216f1c0db2e1e38da2ce8314fe47b
CRs-Fixed: 3347321
2022-12-02 21:56:20 -08:00
Hariharan Ramanathan
b673b97a2d qcacmn: Interrupt Changes for QCA5332
Added interrupt registering code for tx monitor and umac_reset

Change-Id: Id76329a908859a512cef23d68a4afbff794af09a
CRs-Fixed: 3340347
2022-11-27 01:50:43 -08:00
Karthik Kantamneni
6ef5d59bee qcacmn: Add Runtime PM last busy history support
Add support to record last busy events on RX CEs,
this helps to check how frequent CEs are marking busy.

Add support to display last busy history and runtimepm stats.

Change-Id: I856ce54a2f1c6b26722d27623343fc0a2c202c6f
CRs-Fixed: 3337902
2022-11-20 22:03:28 -08:00
Linux Build Service Account
9345e3e5b3 Merge "qcacmn: Array Indexing after validating 'ce_id'" 2022-11-20 06:53:44 -08:00
Alan Z. Chen
b589f319f9 qcacmn: Add void keyword to function definitions
Add void keyword to function definitions for
ce_service_srng() and target_if_get_ctx().

Change-Id: I4d74600da82a9f13285a496a2136589b698da017
CRs-Fixed: 3336700
2022-11-17 20:22:25 -08:00
Ananya Gupta
f1f6845bfb qcacmn: Export API to change delay for RTPM timeout
Store ini config delay value and current delay value in RTPM
context
Export API to update delay and get current delay in ms for RTPM
timeout.
Export API to restore delay to default value.

Change-Id: I53e9e17d983c2cc6fe317159c8c46d792e56c04e
CRs-Fixed: 3332132
2022-11-16 15:37:05 -08:00
Yeshwanth Sriram Guntuka
93c0c09c50 qcacmn: Add CE config tables for Direct Link on Kiwi
Add separate CE host, target, and service map config
tables for Direct Link use case on Kiwi.

Change-Id: I84c1af09da401ab739905b96c85417f907b36743
CRs-Fixed: 3335330
2022-11-15 16:02:11 -08:00
Asutosh Mohapatra
1ca035fa80 qcacmn: Add missing hardware info
Define and update missing Helium based target
mappings in qwlan_hw_list.

Change-Id: I9c1aa3d7ce492397e555e59b361f6855bc431183
CRs-Fixed: 3317892
2022-11-12 09:34:20 -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
Bing Sun
4fb2121bbe qcacmn: Add INI to disable wake IRQ
Some platform would like to disable wake IRQ, so add INI to disable
wake IRQ.

Wake IRQ can't share the same IRQ with the copy engines. In one MSI
mode, we don't know whether wake IRQ is triggered or not in wake IRQ
handler. known issue CR 2055359.

Disable wake IRQ for one MSI mode. If you want to support wake IRQ.
Please allocate at least 2 MSI vector. The first is for wake IRQ while
the others share the second vector.

Change-Id: Id9e54e287f146ff64d94669bbc44dc0a724d9480
CRs-Fixed: 3290867
2022-11-11 03:56:11 -08:00
Bing Sun
186e8421e0 qcacmn: Support one MSI vector dynamically
MSI vector number is defined in platform driver, so use platform
driver API to check whether it is in one MSI mode or not.

In case of one MSI vector, interrupt migration needs to be disabled.
This is because when interrupt migration happens, the MSI data may
change. However, MSI data is already programmed to rings during initial
phase and there is no way to know that MSI data is changed during run
time and reprogram again.

If it is in one MSI mode, disable interrupt migration by adding IRQ
flag IRQF_NOBALANCING.

Change-Id: I54579dfe1e658c1a2c395be93875d013d6e6affd
CRs-Fixed: 3290829
2022-11-11 03:56:04 -08:00
Yeshwanth Sriram Guntuka
2ac8820056 qcacmn: Reduce CE0 src and dest ring size for XPAN usecase
Reduce CE0 source and destination ring sizes for XPAN
usecases to reduce memory footprint based on the
frequency of transactions between LPASS and FW.

Change-Id: I65076a2720fa72d10327981994763dc4ac295ab3
CRs-Fixed: 3319659
2022-11-08 18:52:40 -08:00
Ananya Gupta
bb3702c339 qcacmn: Increase target pipe entries count to 64 for CE2
CE2 ring gets full pretty quickly as target side entries
count is 32, host side config is 64.
Increasing target's pipe entry to 64 as well.

Change-Id: Idbcb3675af0b39fc9741ae68d7ec3f1ad5e67bf1
CRs-Fixed: 3322383
2022-11-07 13:11:07 -08:00
Prasanna JS
adb0db98bc qcacmn: Array Indexing after validating 'ce_id'
Indexing array after checking 'ce_id' for boundary
condition to avoid array out of bound.

Change-Id: Iffa776021dbd70bc135152ad06cb9488a74c335f
CRs-Fixed: 3328146
2022-11-03 06:26:08 -07:00
Kannan Saravanan
234fb9ad6c qcacmn: Initial changes for york (qcn9160) bring-up in HIF Layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: I43fcd4df7a279e92fc545ced3dcee5408da97ac4
CRs-Fixed: 3282629
2022-10-26 01:17:12 -07:00
Yu Wang
cfdcbfe733 qcacmn: capture return code of pld_force_wake_request_sync
Capture return code of pld_force_wake_request_sync and
print it in case of failure.

Change-Id: Idd5058f4e884f28436a3928caf7350ac9446fabd
CRs-Fixed: 3317698
2022-10-21 15:24:08 -07:00
Jeff Johnson
aace982584 qcacmn: Fix misspelling of "possibility"
Fix misspelling of "possibility" in hif_napi.c.

Change-Id: Ibf34e907e07c2c5f95f281487ef90963503a1e37
CRs-Fixed: 3313904
2022-10-20 14:40:03 -07:00
Kannan Saravanan
04a752e875 qcacmn: Initial changes for york bring-up in HIF Layer
Add device Id and target type checks for qcn9160 target
compilation.

Change-Id: I40f5ae3f1ac715f977f9df5a46c71740c61c7399
CRs-Fixed: 3282629
2022-10-18 10:08:21 -07:00
Jeff Johnson
207faf54f2 qcacmn: hif: Fix misspellings
Fix misspellings in hif/...

Change-Id: I8eeefbf714bbb66f61886d9ceabe3f28607b045c
CRs-Fixed: 3304686
2022-10-10 19:21:54 -07:00
Rajesh Chauhan
788ee58105 qcacmn: use dma_set_mask and dma_set_coherent_mask
In kernel 5.18, pci-dma-compat.h is removed and so instead of
calling pci_set_dma_mask and pci_set_consistent_dma_mask, call
dma_set_mask and dma_set_coherent_mask.

Change-Id: I997fc8ec957d19aa8d51c304541ce699b835c1dd
CRs-Fixed: 3298244
2022-10-05 17:51:50 -07:00
Rajesh Chauhan
1cb111d3bc qcacmn: replace PDE_DATA() with pde_data()
In kernel 5.17, PDE_DATA() is replaced with pde_data(). Make
matching change in ath_procfs.c and linux_ac.c files.

Change-Id: Ia198545322146d4adde9330c19b43f5c2ed0dfa2
CRs-Fixed: 3298062
2022-10-05 17:51:38 -07:00
Rajesh Chauhan
c85603d008 qcacmn: replace complete_and_exit with kthread_complete_and_exit
In kernel 5.17, complete_and_exit is replaced with
kthread_complete_and_exit. So if kernel version is >= 5.17,
then use kthread_complete_and_exit.

Change-Id: I4e9a98373197eba4931a8dafe77040448ffb40eb
CRs-Fixed: 3297481
2022-10-05 17:51:25 -07:00
Amit Mehta
b781ebf246 qcacmn: Move Fw diag drain API under feature flag
Currently fw diag drain API is not under feature flag
as we only need to drain the ring in case when diag
events are received on CE7, which in other cases is
resulting in unnecessary error logs being printed.
To fix the issue move fw diag drain api under feature
check.

Change-Id: I7d040fbd1218c5c8ed9a8b2bae58af2f098fee80
CRs-Fixed: 3296285
2022-09-29 10:59:21 -07:00
Nandha Kishore Easwaran
3e59523895 qcacmn: Handle race condition in ce interrupt handler
Fix race condition in dispatch interrupt when CE0 interrupt is called
from irq context in one core while it is called from user context in
ring full condition. This case has to be handled using locks since
calling paralelly from multiple contextx is leading to interrupt
getting disabled and tasklet not getting scheduled. This is leading
to interrupt being in disabled state. Also change th diff_time variable
signed integer to handle a case where taklet is scheduled just after
the workaround kicks in leading to diff_time becoming negative.

Change-Id: I3894ef90ca48f23404bc9529c4b1623841698293
CRs-Fixed: 3297372
2022-09-28 13:25:12 -07:00
Rakesh Pillai
99372a8149 qcacmn: Release RTPM refcount if force wake fails
Currently RTPM refcount is not released if force
wake fails. This leads to mismatch in number of
RTPM get and put during RTPM de-init.

Fix this refcount release if force wake fails.

Change-Id: Ia6d2b4541347615afe46c79ae76114009f7805ad
CRs-Fixed: 3289451
2022-09-14 12:31:29 -07:00