커밋 그래프

1098 커밋

작성자 SHA1 메시지 날짜
Manikanta Pubbisetty
4015f3bf89 qcacmn: Do not setup CE write index offset for FW only CE rings
Currently for WCN6450, driver is updating the CE write index offset
used for CE register updates even for the CE rings that are firmware
only rings. This is resulting in a boot time WARN_ON.

Do not setup write index offset for CE rings that are used only by
the target firmware to avoid this early on boot time WARN_ON.

Change-Id: I241e11ad43f833b5cafc7cd303b935c10d9e6dd8
CRs-Fixed: 3670952
2023-12-12 06:35:19 -08:00
Manikanta Pubbisetty
4bafb26a4c qcacmn: Fix batch interrupt threshold logic for WCN6450
Unlike lithium family, batch interrupt thresholds for Rhine targets
are not based on the entry size (descriptor size in dwords); Instead
the configuration should be a simple integer value. If interrupt has
to be raised after every copy transaction then batch counter threshold
shall be set to 1, so on and so forth.

Change-Id: Ic51f361c5f079d48668ec9b46dd79f04bcb43b14
CRs-Fixed: 3659426
2023-11-29 08:08:18 -08:00
Yu Wang
e0e57bd21b qcacmn: do not mark rtpm last busy for diag event
If diag events comes too frequently, it's hard to enter
runtime suspend, which does not make sense, as diag events
here are firmware debug logs.
To fix it, do not mark rtpm last busy for CE7 if the feature
WLAN_FEATURE_WMI_DIAG_OVER_CE7 is enabled.

Change-Id: I424eb345546a755c1f6995d1f8eeac71fa6c4615
CRs-Fixed: 3614793
2023-11-12 15:23:20 -08:00
Kannan Saravanan
29e7553979 qcacmn: Remove PCI dependencies for the 16M profile
Remove PCI driver dependencies and move under Kernel flag
CONFIG_PCI for 16M Profile.

Change-Id: I46c060a8a6efca8b0b6866d54916a223082f46ee
CRs-Fixed: 3635697
2023-11-03 10:07:37 -07:00
Yu Tian
253c31efe9 qcacmn: Avoid to poll FW diag CE if it's got scheduled
CE drain is coming from suspend path, which may cause dead
lock with SIRQ context. This change is aimed to avoid CE
drain if such CE tasklet has been scheduled.

Change-Id: I66e4b839a4f9c33ccc0948ea2ac5300b99266df9
CRs-Fixed: 3627474
2023-10-19 10:15:18 -07:00
Linux Build Service Account
e69d7ab401 Merge "qcacmn: Avoid excessive logging in ath procfs read/write ops" 2023-09-22 01:13:53 -07:00
Manikanta Pubbisetty
8993389ed1 qcacmn: Allocate buffers from WBUFF for fastpath CEs
Currently, buffers attached to fastpath CEs are not being allocated
from WBUFF. Since the buffers attached to the fastpath CEs are
re-usable in nature, allocating such buffers from WBUFF will have
added benefits like allocating from custom page frag cache which
reduces the memory used by the RX buffers.

Therefore, allocate RX buffers for fastpath CEs from WBUFF module.

Change-Id: Iaa913042473d60b184a767ece934bb9063ff4a7e
CRs-Fixed: 3581533
2023-09-21 17:57:14 -07:00
Amit Mehta
cf269aa28d qcacmn: Add hif and CE rings to SSR dump
Add hif and CE rings to SSR dump

Change-Id: I6a859f46c9a8cf5813ce26a163b30286969edf4a
CRs-Fixed: 3604906
2023-09-21 14:36:26 -07:00
Karthik Kantamneni
06dfff7c8d qcacmn: Avoid excessive logging in ath procfs read/write ops
Currently logs are being flooded during ath procfs read/write
operations. This excessive logging is causing wlan panic.

Fix this by changing log level from hif_info to hif_debug.
Since these logs printed are not required in normal use case
scenario, will be helpful only during debug purpose changed
log level to hif_debug.

Change-Id: If8ad1a8bf5c427e483c675192dcbd9ce42854ece
CRs-Fixed: 3615763
2023-09-14 11:44:32 +05:30
Gururaj Pandurangi
0b84f05679 qcacmn: Fix compilation warnings on x86
Fix the compilation warnings on x86.

Change-Id: Ic9edafc5b33462f5c96faa391e6441141aa09837
CRs-Fixed: 3591586
2023-09-12 23:35:21 -07:00
Yu Tian
ce3c51dc44 qcacmn: Add more loop to drain CE7 logs before suspend
FW diag drain may got delayed and host may not clear
all the logs in one set. Change is aimed to give more
rounds to try to complete the pending logs before suspend.

Change-Id: I06433a464d96c3c9d96207f6da7a8ea513fcdc9e
CRs-Fixed: 3602039
2023-09-12 14:42:54 -07:00
Bing Sun
833c538818 qcacmn: Fix build error caused by hif_config_irq_clear_affinity
hif_config_irq_clear_affinity is not defined, while
hif_config_irq_clear_cpu_affinity is defined.
Do not export undefine API.
Export hif_config_irq_clear_cpu_affinity.

Change-Id: I6b66ae687446b1c1eae15683766fd47554156b90
CRs-Fixed: 3606013
2023-09-08 11:30:46 -07:00
Manikanta Pubbisetty
17183c4759 qcacmn: Fix panic due to incorrect inputs to QDF_TRACE
Fix panic due to passing a smaller number of arguments to QDF_TRACE API
in hif_print_napi_stats().

Change-Id: I37b9c9ec374f7ab37adc169a7de0829fd1cb60fc
CRs-Fixed: 3602357
2023-09-05 15:15:22 -07:00
Vivek
6578782074 Revert "qcacmn: Increase the CE1 ring size to 1280 for Waikiki"
This reverts commit I794522751deb9a60e6487e42df48f582a5e01d2e.

Reason for revert: Changes for the fix is implemented as a different FR

Change-Id: I19f6e4362ed406c9906e333c1ee0bfa2fe14677e
CRs-Fixed: 3598130
2023-08-29 15:06:34 -07:00
Azmath Mohammed
ba534849c0 qcacmn: Add ce_count check to avoid any buffer overflow
Add ce_count check to avoid any buffer overflow
of "scn->ce_id_to_state" and "hif_state->pipe_info"

Change-Id: I77f074f631a86cb96badab27e6850e0969331dba
CRs-Fixed: 3589967
2023-08-28 21:12:53 -07:00
Yu Tian
5040e12d35 qcacmn: call fw diag drain before complete ce tasks
FW diag drain may wake up delay reg write WQ, and this
happens after ce tasks completion check. Change is to
make FW diag drain operation before complete check.

Change-Id: I209c88cc5c2d5cb3b3195d1ae08b4c0c29903fa5
CRs-Fixed: 3591738
2023-08-26 02:39:51 -07:00
Venkateswara Naralasetty
a641238d80 qcacmn: Enable wlan datapath CE IRQ affine
Set affinity to assign WLAN CE datapath IRQs to perf clusters
based on the INI config.

Change-Id: I63f96bc6b434af2e322ef277096e5547cfa6835a
CRs-Fixed: 3590583
2023-08-25 15:15:04 -07:00
Karthik Kantamneni
8aa322295a qcacmn: Enhance latest HIF CE event history
Latest CE event history is helpful to analyze CE reaping
issues when dump is not available. Enhance latest HIF CE
event history to capture last two events, so that during
error situations more data is available to detect CE
reaping issues.

Change-Id: I503ec5c84ff02b967e1ce93954725ffd9866e93c
CRs-Fixed: 3590596
2023-08-23 19:37:19 -07:00
Amit Mehta
38997d7722 qcacmn: Fix format specifier for macro which uses BIT()
BIT() is unsigned long int, and is being printed using
an incorrect format specifier. This leads to a compilation
failure.

Fix the format specifier for macro which uses BIT().
also typecast the macro to unsigned long for CONFIG_SLUB_DEBUG_ON
case where IS_CE_DEBUG_ONLY_FOR_CRIT_CE is of type unsigned int.

Change-Id: I5a717fd45c80b8245522c895c36aaafd46592454
CRs-Fixed: 3591809
2023-08-18 21:44:05 -07:00
Amit Mehta
2c0fb4ffc6 qcacmn: Set enable_rpm earlier in hdd_wlan_start_modules
Currently enable_rpm is being set in hif_rtpm_start
which is called later in hdd_wlan_start_modules,
this can result in race between hif_rtpm_start
and hif_rtpm_put.

To fix the issue set enable_rpm earlier to avoid
race condition.

Change-Id: Iaa4ffda4eef3050f43ff5ca2bdba555abb8a0b47
CRs-Fixed: 3581962
2023-08-14 15:22:33 -07:00
Manikanta Pubbisetty
bb3b798604 qcacmn: Fix compilation issues with NAPI stats on WCN6450
Fix compilation issues with NAPI stats on WCN6450

Change-Id: I0339a510c715009255bc00841d44bd06357b252b
CRs-Fixed: 3583455
2023-08-11 04:35:54 -07:00
Amit Mehta
63979604dd qcacmn: Add memory barrier to avoid inconsistent read for valid flag
Currently there is no memory barrier after valid flag read,
which can result in reading q_elem values in random order,
due to which host can read stale entried from the q_elem.

To fix the issue add memory barrier to avoid inconsistent
read for valid flag.

Change-Id: I9431d4f62188def37c2515e376a28f3985733f85
CRs-Fixed: 3577746
2023-08-10 14:43:39 -07:00
Manikanta Pubbisetty
3ac14805dd qcacmn: Fix issue with IRQ re-enablement for CE IRQs
Currently on WCN6450 which is based on IPCI, there is a problem
in re-enabling the IRQs while firmware recovery is in progress.

While processing the CE IRQs, if there’s an active recovery
happening in the host (due to FW assert), we are leaving the IRQs
disabled in the kernel.

Fix this by refactoring the code such that hif_irq_disable() is
called only when there is no active recovery.

Change-Id: I4e3ccbb5f820645597feb724ddfe321e7d7d1a5f
CRs-Fixed: 3579429
2023-08-10 05:13:21 -07:00
Amit Mehta
5748e165de qcacmn: Change log level for hal_info and hif_info
Currently hal_info and hif_info logs levels are set to
QDF_TRACE_LEVEL_INFO, which results in prints being logged
to dmesg buffer.

To prevent prints logging into dmesg buffer, changes logging
level to QDF_TRACE_LEVEL_INFO_HIGH.

Change-Id: I039c5e7b6b47f1ffda8e32ff44322d1963648c41
CRs-Fixed: 3577831
2023-08-08 15:27:30 -07:00
Karthik Kantamneni
bb6139453b qcacmn: Fix accessing unused CE channel ctrl register in WCN6450
Currently host is programming IDX_UPD_EN for all the CE
channels even though which are not used by host.

Fix this by programming CE ctrl register which are
used by host.


Change-Id: Ic0c133d87c688257ef2047bcb177228e25369aed
CRs-Fixed: 3575870
2023-08-02 11:42:59 -07:00
Jeff Johnson
26eceff0f7 qcacmn: Fix hif_cleanup_static_buf_to_target() typo
Function hif_cleanup_static_buf_to_target() has multiple
implementations, with one chosen by conditional compilation. The
version where CONFIG_BYPASS_QMI is defined and QCN7605_SUPPORT is not
defined has a typo (snc instead of scn), so fix it.

Change-Id: Ifbfee8cb53e987216b46507e336bf3aa3de7bf6c
CRs-Fixed: 3500203
2023-07-24 15:51:00 -07:00
Karthik Kantamneni
f243b44719 qcacmn: Fix Runtime PM resume issue for ipci interface
For ipci interface platforms, currently RTPM resume is
requested from CE interrupt handler even when suspend
is in progress. But ideally we should request resume
only RTPM state is in suspended, since as part of suspend
sequence also we will get CE WOW events and this should
not trigger resume.

Fix this by requesting resume from CE interrupt handler
only when driver state is suspended.

Change-Id: I450d6c48809afae26fe863184766ab5141d25691
CRs-Fixed: 3554857
2023-07-23 17:09:30 -07:00
Karthik Kantamneni
b965b762b1 qcacmn: Fix race with F.W in updating CE control register
In current case when RRI on DDR feature is enabled then host
programs CE control register, but there is chance of F.W also
programming the CE control register around same time this leads
to race and chance of either host/F.W value getting over written.

So to avoid this while programming the CE control register for
RRI on DDR enablement, update it with F.W programming value also
i.e DMA length. So if incase register value over written due to
race proper value will be updated to register either by host/F.W.

Change-Id: I2560c74726b21128d1cd50805d987fda1b2a1230
CRs-Fixed: 3561689
2023-07-21 01:17:09 -07:00
Zhiwei Yang
7709435525 qcacmn: add hif_event_desc_history to ssr driver dump
Current code doesn't have hif_event_desc_history in ssr driver dump.
Fix this by adding hif_event_desc_history and hif_event_hist_max to
the ssr driver dump regions.

And add more parameters for parsing hif_ce_desc_history_buff.

Change-Id: I02cbfc7b9ea0c53d31ad351377d4644f1ad189d1
CRs-Fixed: 3469140
2023-07-19 22:04:02 -07:00
Manikanta Pubbisetty
94c5606254 qcacmn: Reduce size of T2H HTT CE pipe for WCN6750
Currently, the size of target to host CE pipe for HTT RX communication
for WCN6750 is 512. The data that we receive on this pipe is not very
frequent and hence 512 entries are not needed.

Reduce the size of the HTT RX ring for WCN6750. This will also bring
down the memory requirement for this ring considerably.

Change-Id: I690fa34c76b1b683a1518964088bc7540ca751a4
CRs-Fixed: 3554428
2023-07-19 16:54:33 -07:00
Madhavan Ganesan
6e25e7d35e qcacmn: Fill BAR address for IPQ5332, QCN6122 and QCA5018 chipset
Update the BAR address to plat_priv for IPQ5332, QCA5018 and QCN6122.

CRs-Fixed: 3198433
Change-Id: I5e22ebcdb6b42474bdc8e8f89ff66e0775b00958
2023-07-19 12:11:47 -07:00
Manikanta Pubbisetty
cbe8170798 qcacmn: Add HIF CE RX support to WBUFF
Currently, WBUFF is being used only for WMI TX buffers.
Add HIF CE RX buffers support to WBUFF in an effort to re-use
the copy engine RX buffers instead of freeing/allocating buffers
for every CE RX transaction. This fixes the problem of CE RX
memory fragmentation.

Change-Id: Id9c043a5c5d0882a7994fa03cd8c335555d46b8d
CRs-Fixed: 3534539
2023-07-18 09:51:03 -07:00
SACHIN AHUJA
147467b9f5 qcacmn: Add the SOCID for WCN6750_V2 chip
SOC ID is missing for WCN6750_V2 and as a result correct
string for chip is not sent to CNE. This leads to the
issue in Wifi calls.

Add the SOC ID for WCN6750_V2.

CRs-Fixed: 3552566
Change-Id: I80d19742f6ffa1c5b03f1f2576c6e4c0c4a1c1db
2023-07-13 19:23:57 -07:00
Venkateswara Naralasetty
51ddb93d21 qcacmn: add periodic and host Tx/Rx stats support for WCN6450
Changes required to support periodic and host Tx/Rx stats for WCN6450.

Command to request and dump the host Tx/Rx stats,
iwpriv wlan0 txrx_stats <stats no> <mac_id>
mac_id: 0 - mac0(5 GHz), 1 - mac1(2 GHz)
        0 for single mac
stats no: 20 - TXRX_CLEAR_STATS
	  21 - TXRX_RX_RATE_STATS
	  22 - TXRX_TX_RATE_STATS
	  23 - TXRX_TX_HOST_STATS
	  24 - TXRX_RX_HOST_STATS
	  25 - TXRX_AST_STATS
	  26 - TXRX_SRNG_PTR_STATS
	  27 - TXRX_RX_MON_STATS
	  29 - TXRX_SOC_CFG_PARAMS
	  30 - TXRX_PDEV_CFG_PARAMS
	  31 - TXRX_NAPI_STATS
	  32 - TXRX_SOC_INTERRUPT_STATS
	  33 - TXRX_SOC_FSE_STATS

Change-Id: Ibda4d531c9074a24f8c39916b44d9e3c38f189ee
CRs-Fixed: 3485279
2023-07-13 00:42:11 -07:00
Venkateswara Naralasetty
fc93f83a78 qcacmn: Add SWLM support for WCN6450
Changes required to support SWLM feature on wcn6450.

Change-Id: I306cba8dcefa8f34a9546285b33b974987aec625
CRs-Fixed: 3540269
2023-07-10 18:03:57 -07:00
Nandha Kishore Easwaran
6ca74c40fd qcacmn: Add alignment of 4 bytes back
This reverts commit Ib680547d2bcfe57b6eadda5301677d68e4a931a4

Change-Id: Iffc7f2cdab2d1015db4b3f0dfc0ea697e0388238
CRs-Fixed: 3552537
2023-07-10 15:03:04 -07:00
Venkateswara Naralasetty
a3a5a72bbd qcacmn: Add delayed reg write support for wcn6450
Current HAL delayed reg write is tied to SRNG notions, hence
implement delayed reg write logic in HIF since WCN6450 does
not use SRNG interface.

New feature flag FEATURE_HIF_DELAYED_REG_WRITE is introduced
to disable/enable this support.

Change-Id: Id7087ad53cd5879cf49ee0e84dd727de61137541
CRs-Fixed: 3519702
2023-07-10 12:14:13 -07:00
Li Feng
7f998d6240 qcacmn: Bypass hif apps irqs handle for single MSI case
Regarding to the platform suspend, generally the hif_bus_suspend() will
disable the CE irqs, however the irq is shared in the single MSI case,
so the MHI irq is disabled as well which cause no MHI ring event notified
in the following pci bus suspend.

The fix is to bypass hif apps irqs handle for single MSI case during
suspend-resume stage.

Change-Id: I4f9068900e85fe57c2a82d841846b3fff6da0696
CRs-Fixed: 3549884
2023-07-09 06:03:59 -07:00
Yu Wang
1632797f1c qcacmn: refine hif tasklet latency detection
When one of the enabled CE tasklet is executed, it will
check latency of all the others which are enabled, it's
redundant. Add a new API to check latency for a single
tasklet.
Add API to record sched time for a tasklet, which will
check the enablement of detection before recording the
time.

Change-Id: I515ca27fc2e97231397573b4903c001d29326bd2
CRs-Fixed: 3514285
2023-07-08 01:26:06 -07:00
jinbao liu
252faaf14e qcacmn: Fix some potential uninitialized local variables
This change initializes some uninitialized local
variable to avoid arbitrary values in some cases.

Change-Id: I906528514c41132ead23433a8a91374b4309c543
CRs-Fixed: 3545869
2023-07-05 17:18:52 -07:00
Amit Mehta
241f75e574 qcacmn: Release RTPM refcount if force wake release fails
Currently RTPM refcount is not released if force
wake release fails. This leads to mismatch in number of
RTPM get and put during RTPM de-init.
Fix this refcount release if force wake release fails.

Change-Id: I4334de57e00139c0d30d37d7e19a399760400a50
CRs-Fixed: 3544981
2023-07-05 17:18:31 -07:00
Nandha Kishore Easwaran
8a745cc343 qcacmn: Remove alignment of 4 bytes
Remove alignment of 4 bytes when allocating memory for Copy
engines. Copy engine buffer size is 2048 which is already
aligned to 4 bytes. This 4 byte alignment addition results in
64 bytes extra memory allocation for each skb since SKB_DATA_ALIGN
rounds it off to nearest 64.

Change-Id: Ib680547d2bcfe57b6eadda5301677d68e4a931a4
CRs-Fixed: 3533492
2023-07-05 17:18:11 -07:00
Venkateswara Naralasetty
f9ecb01556 qcacmn: Fix rtpm_get during tx ring write index update
Add missing rtpm_put() for the corresponding rtpm_get() during
tx ring write index update.

Also, add counter to capture flush count per CE.

Change-Id: Ieeee944b63d574f62d61f0557637cbf8f3b653cd
CRs-Fixed: 3536425
2023-06-23 15:47:06 -07:00
Amit Mehta
99ec9ce725 qcacmn: initialize affinity mgr IRQ affinity value to silver core
During init time initialize current and requested IRQ affinity
value to silver core

Change-Id: I87ee99732bf1b07be42b93013299d0b8a0c36c97
CRs-Fixed: 3528886
2023-06-22 16:03:36 -07:00
Nandha Kishore Easwaran
065a7a65fe qcacmn: Allocate separate CE for diag based on enable macro
Allocate a separate CE for diag only when enable macro is set
WLAN_DIAG_AND_DBR_OVER_SEPARATE_CE is used for indicating if
diag works on a separate CE. This flag is disabled on 256M platforms.

Change-Id: Ic4862478ece2eaf3d7b92d776f25420107c051f3
CRs-Fixed: 3533485
2023-06-22 12:49:41 -07:00
Guisen Yang
134088aadd qcacmn: Add NULL pointer check for ce_hdl
When the memory allocation is fail for shadow_base_unaligned in
ce_init(), the ce_hdl will also be NULL. So we need to check if
ce_hdl is null or not before use it.

Change-Id: I88bb7323b3f171a17e07cbc6168b6f26412803f6
CRs-Fixed: 3531693
2023-06-21 22:49:32 -07:00
Jinwei Chen
a9b41ac223 qcacmn: Fix kernel warning when free CE/DP irq
Recently wlan host might configure irq affinity for CE/DP,
but these irq affinity hint has not been cleared before they
are freed, kernel will raise warning.
Clear the irq affinity hint before freeing irq.

Change-Id: I17d0d6aee45572685fb2ed69112e9b6b4c9b303a
CRs-Fixed: 3528315
2023-06-17 03:58:50 -07:00
Huashan Qu
2e5d2ab8b5 qcacmn: Add void parameter to fix build error
Add void parameter for function ce_services_legacy()
to fix build error.

Change-Id: I8ea923736a06f7ec8000be8609dd0a54707e7d8e
CRs-Fixed: 3528968
2023-06-15 16:32:21 -07:00
Chaoli Zhou
40a34647a9 qcacmn: Correct log level for shadow register print
Change the default log level for shadow register
configuration print, which use error level is not
proper since they are not critical/fatal cases.

Change-Id: I899a8acea228a86356d6d380844a3c6ebf43f3e5
CRs-Fixed: 3519727
2023-06-09 08:10:05 -07:00
Pavankumar Nandeshwar
9afe71a99a qcacmn: Increase the CE1 ring size to 1280 for Waikiki
Increase the CE1 ring size, which is used for htt
events to 1280 entries from current 512 entries
for Waikiki

Change-Id: I794522751deb9a60e6487e42df48f582a5e01d2e
CRs-Fixed: 3511251
2023-06-08 02:12:18 -07:00