Графік комітів

282 Коміти

Автор SHA1 Повідомлення Дата
Linux Image Build Automation
1e5fc2a58e Revert "cnss2: Correctly check for WCNSS_MEM_PRE_ALLOC macro"
This reverts commit da084bcb06.

Change-Id: Ib46c33b9ebed28aa6e12d63910ebf05b9009b599
2023-07-18 15:40:13 -07:00
Naman Padhiar
da084bcb06 cnss2: Correctly check for WCNSS_MEM_PRE_ALLOC macro
After CNSS2 switched to Bazel based compilation, conditional
compilation macros became same as configs and are enabled
directly from defconfig. Fix macro check in the code for
both y or m to enable code based on the that.

Change-Id: Icd65573b02d95198e26c37ebe4ac93839cf21ad9
CRs-Fixed: 3553530
2023-07-12 20:06:14 -07:00
Naman Padhiar
a633e6ce82 cnss2: Resume PCI bus before reading registers
In some scenarios, during force FW assert,
cnss_pci_pm_runtime_get_sync might not resume bus.
Make sure PCI bus is resume before accessing.

Change-Id: I4701adef1f0d30852edb8656931db315bebfa3d3
CRs-Fixed: 3540601
2023-07-11 15:43:52 -07:00
Linux Build Service Account
84d0a7d5d1 Merge 2ec2768bfc on remote branch
Change-Id: I10b34446fc3d9c813818d1665925a19c0b170891
2023-07-07 15:36:04 -07:00
Alan Chen
2ec2768bfc cnss2: Make changes to support WLAN DDK for all modules
To be in line with upstream changes on bazel, create separate defconfig
files for each module instead.

Change-Id: Ic2c24f8d8c207b51a0a5b4b9d1088601bc91765c
CRs-Fixed: 3539620
2023-06-30 15:26:33 -07:00
Linux Build Service Account
5b2657789c Merge 0fcf684c10 on remote branch
Change-Id: Id85f57846dd9d3beecc2e5dd13f89e8a08e21d17
2023-06-21 09:16:48 -07:00
Sandeep Singh
c07270aa95 icnss2: use platform_get_irq api to get irq for adrastea target
Use platform_get_irq api to get irq for adrastea target instead
of platform_get_resource as in 6.1 kernel implemetation of
platform_get_resource has changed.

Change-Id: Ia4fae607bd98b68554588cfb318e074d516bb1ff
CRs-Fixed: 3533543
2023-06-17 23:31:14 -07:00
Sandeep Singh
c5b4320df3 icnss2: pass fw capability to wlan host driver
Pass he_channel_width_cap, phy_qam_cap and rd_card_chain_cap
to wlan host driver as part of soc info.

Change-Id: I471de0df5452c960662955aad20cf1b1f6c8845e
CRs-Fixed: 3533554
2023-06-16 21:29:31 -07:00
Dundi Raviteja
0168d637ed icnss2: Ignore FW ready timeout if AON is not up
Ignore FW ready timeout if AON is not up.

Change-Id: I77ae832e8d5c2fceb5228ff5554375fa3e6ecb08
CRs-Fixed: 3519857
2023-06-15 16:31:35 -07:00
Jeff Johnson
9b33792f8b cnss2: Enable Bazel DDK build
Change-Id Ied2aae354aaea8a038461f6c74f26fe4f362a05a ("cnss2: Support
the Bazel DDK") introduced the logic to transition to Bazel. Now
update Android.mk to enable that functionality.
Also enable build of cnss_utils.

Change-Id: I5b0702070d2f169d486c4526676543009b3a9487
CRs-Fixed: 3478984
2023-06-14 22:02:19 -07:00
Dundi Raviteja
2f882a1189 icnss2: complete AON completion event gracefully
In some error cases AON completion event can be in wait
state, so complete it gracefully.

Change-Id: I98df398a74e00b9adc3c8d0cf7abcd48b66def1c
CRs-Fixed: 3527640
2023-06-14 22:02:18 -07:00
Sandeep Singh
8ddac0b648 icnss2: return ENOSYS from smmu fault handler callback
Return -ENOSYS from smmu fault handler callback as iommu
driver requires -ENOSYS return value to print debug info.

Change-Id: Id395269542d40137323d413f20da67dc715efa2d
CRs-Fixed: 3513019
2023-06-14 21:47:36 -07:00
Dundi Raviteja
0fcf684c10 icnss2: Unregister AON event notifier
Unregister AON event notifier.

Change-Id: Ic247f7dc1a2672ccca54dac0dbef1d8dbec22fb1
CRs-Fixed: 3522232
2023-06-11 02:53:45 -07:00
Shailendra Singh
6ce40d5c60 cnss2: Update time sync period based on tsf sync start/stop
Add cnss_update_time_sync_period and cnss_reset_time_sync_period to
update time sync period vote sent from wlan driver based on use-case.
CNSS driver stores both wlan driver and sys config time sync period
value and will apply the minimum value of all votes.

Change-Id: I46ad2866bd70aefe121c8a68a9c869e75ffd8345
CRs-Fixed: 3502060
2023-06-07 11:12:47 -07:00
Naman Padhiar
b1be304dfc cnss_utils: Wait for initialization of daemon config
There is scenario where cnss-daemon is got connected with
cnss-plat-ipc module but message to initialize daemon
config is not yet received from cnss-daemon. At the same
time cnss2 module checks for DMS support in daemon config
which is not yet initialized. As use-nv-mac is set from DTSI,
DMS support must be enabled. Since it is not found enabled,
cnss2 asserts.
To fix this, along with cnss-daemon connection check also
wait for message from cnss-daemon which initializes daemon
config.

Change-Id: I2579e7e9040c0ea7286c265488e2050652c5cc21
CRs-Fixed: 3517692
2023-06-06 15:19:09 +05:30
Sandeep Singh
1551c1bbe3 cnss_utils: Add qmi paratmeter in cap resp to get HW capabilities
Add qmi paratmeters in qmi target capability response to
get PHY QAM and PHY HE Channel width capability from
wlan fw.

Change-Id: Ib69afa7e09f96ddd2e9aa888c7209e78e058da5e
CRs-Fixed: 3516405
2023-06-05 18:22:41 -07:00
Naman Padhiar
1f5d4ad661 cnss2: Get PM Runtime reference before RDDM trigger
Host triggered force assert can be called asynchronous.
As part of force assert, CNSS dumps few MHI registers and
trigger RDDM asynchronously. There are chances of race between
force assert and runtime suspend.
To fix that take runtime get reference before MHI operations and
runtime put later.

Change-Id: Icef23910587ff280270bdd7c60ad8eba392822e9
CRs-Fixed: 3464127
2023-06-02 16:51:28 -07:00
Chaoli Zhou
7cd9a66ccc cnss2: Change log level for non-critical cases
Change log level from cnss_pr_err to cnss_pr_vdbg for
some non-critial cases.

Change-Id: I66b16afe5327bab77d52a1ba1b5d72fb88c71715
CRs-Fixed: 3509919
2023-06-01 18:16:16 -07:00
Dundi Raviteja
de80f12c97 icnss2: Handle AON ready event
During cold boot AON sends multiple DOWN and UP notifications
as part of its FW update. ICNSS driver should not initiate
any QMI handshakes and should wait till correct FW is flashed.

After successfully flashing correct FW, AON will send ready event.
Once AON ready event receives ICNSS driver sets AON ready bit and
proceeds with QMI handshakes.

Similarly in AON SSR, this change handles UP notification only if
AON ready bit is set.

Change-Id: I326d731cd3f619cef9fa8c072a1e898f4b21a6ce
CRs-Fixed: 3491699
2023-05-31 20:52:34 +05:30
Dundi Raviteja
401152234c icnss2: Move AON code under a macro
Move AON related code under a macro to make it as config.

Change-Id: I52b35aa8eb06556934250e7347d8d851d29964a6
CRs-Fixed: 3512075
2023-05-31 20:24:14 +05:30
Gangadhar Kavalastramath
5eaf0073cc cnss2: Downgrade RC speed to Gen1 for Genoa EP
Some platform PCIe RC impedance can't achieve the target defined in spec.
It will result to Genoa card link down. To WA the issue, downgrade RC speed
to Gen1 for auto Genoa EP. Because the linkdown issue may happen during
enum, and before enumunation we do not know EP device ID, so set init
speed to Gen1, and then restore speed to default for others wifi chip.

The change does not affect Genoa throughput, because Gen1 speed is enough
for Genoa.

Change-Id: Iffdbf8b98a82c200faf11edcdd180213366ed6ca
CRs-Fixed: 3479848
2023-05-25 19:54:57 -07:00
Alan Chen
f4e0145655 cnss2: Add AUX UC download functionality
Add support for AUX UC download functionality if aux support is
indicated by both host and fw.

Change-Id: I3bfbebbb5cdfbbaa350a34378ab2f0809f27affb
CRs-Fixed: 3402104
2023-05-25 19:54:56 -07:00
Sandeep Singh
afc7a80790 cnss_prealloc: check cnss_pools before returning memory
Check cnss_pools before returning memory to wlan
host driver.

Change-Id: I44e2a34b3c232e08e7e1d4bdb567cd4de09f3eb1
CRs-Fixed: 3506939
2023-05-23 16:04:31 +05:30
Sandeep Singh
c32955295b cnss2: move reboot notifier registration after initializing completion
Currently, power_up_complete and cal_complete are getting initialized
after registering for cnss reboot notifier and in cnss reboot
notifier callback we are completing power_up_complete and cal_complete.
In certain cases cnss_reboot_notifier cb getting called before
power_up_complete and cal_complete are getting initialized which
is leading to crash. To avoid these crashes move reboot notifier
registration after initializing completion variables.

Change-Id: Iaf9e925489f4faea621ea40836dcd7330c7b98d2
CRs-Fixed: 3503651
2023-05-22 15:02:57 -07:00
Jeff Johnson
6b432e8d56 cnss_prealloc: Update DDK for cnss_prealloc dependencies
Commit 97303bf330 ("cnss_prealloc: update prealloc mem pool based on
device type") introduced several new dependencies:
- cnss_prealloc has a dependency upon a new header file
  cnss_utils/cnss_common.h
- cnss2 has a dependency upon cnss_prealloc
- icnss2 has a dependency upon cnss_prealloc
- icnss2 has dependency upon cnss_utils and wlan_firmware_service

Add those dependencies to the DDK build rules.
Also add CNSS_OUT_OF_TREE config in icnss2/Kconfig file.

Change-Id: If00eb7623cffb82e02ed0f8001254082f2a19b93
CRs-Fixed: 3495407
2023-05-20 22:20:39 -07:00
Linux Build Service Account
db90870578 Merge 90e0212ecc on remote branch
Change-Id: I3e43fdfc6597b6c4082f499ac92e43af8df3513e
2023-05-19 19:17:47 -07:00
Nirav Shah
ac734e4b27 cnss2: Reduce cnss logs as part of QDSS logging
Reduce cnss logs as part of QDSS logging

Change-Id: I851146c482253d8776b762c1d27ffb0f7bc62157
CRs-Fixed: 3499978
2023-05-18 18:53:15 -07:00
Nirav Shah
1e15d131ea cnss2: Add support to configure log level
Add support to configure log level for dmesg and
ipc logging. Default log level is set to DEBUG
for ipc logging and INFO for dmesg logging.
Change default behavior of cnss_pr_dbg and
cnss_pr_vdbg API to not print in dmesg.

Change-Id: I6bb9d0bd297be20e66f563c16bb2f3f9d39d2be6
CRs-Fixed: 3499975
2023-05-19 07:21:53 +05:30
Naman Padhiar
6506428355 cnss_prealloc: Update memory pool table for WCN6750
The memory pool table decides number of reserved pools
needs to be preallocated during initialization. Update
the table for WCN6750.

Change-Id: I8679c574977026c9bb894e40384b74110d2c8ebd
CRs-Fixed: 3493255
2023-05-13 19:27:51 -07:00
Rajesh Chauhan
90e0212ecc cnss2: Add support for direct QMP to communicate with AOP
Add support for direct QMP to communicate with AOP. There
are two ways to communicate with AOP: mailbox, and direct
QMP. Based on property set in the device tree use either
direct QMP or mailbox to send messages to AOP.

Change-Id: I9fc24f8a483abb3084cda4d85acf2d53e43d9ad8
CRs-Fixed: 3488507
2023-05-11 18:02:05 -07:00
Sandeep Singh
ff9d11362f cnss_prealloc: add wrapper APIs if MEM_PRE_ALLOC flag not enabled
Add wrapper api to avoid compilaton failure if
CONFIG_WCNSS_MEM_PRE_ALLOC flag is not enabled.

Change-Id: Ic0625d68f587c79f38f33495b53645f1d7582144
CRs-Fixed: 3492092
2023-05-11 15:36:42 -07:00
Naman Padhiar
a232234d41 cnss2: Fix MHI state mismatch for MHI INIT
MHI INIT called during host driver registration leads to MHI state
mismatch because MHI is already in INIT state due to power up of
device as part of ongoing self recovery.
To fix this issue, avoid powering up device during recovery if host
driver is not registered. Device would be powered up later during
host driver registration.

Change-Id: I534dfc0e389ba97a6e2c4869d42be5ecff9609b3
CRs-Fixed: 3476947
2023-05-11 15:36:41 -07:00
Naman Padhiar
693e91a938 cnss2: Add support for MSIX interrupts
Read MSI-X address from device tree file and initialize
MSI-X address and data to support MSI-X interrupts.

Change-Id: I7cc43ca4d3e4c937f09facf12dd02437ddc2e039
CRs-Fixed: 3488821
2023-05-11 13:09:23 -07:00
Jeff Johnson
4ae0fef4d3 cnss2: Support the Bazel DDK
Android builds are transitioning to using Bazel for builds, and there
is a Driver Development Kit (DDK) which out-of-tree drivers must use
in this new scheme. Introduce the infrastructure to describe the wlan
platform driver modules using the DDK.

Change-Id: Ied2aae354aaea8a038461f6c74f26fe4f362a05a
CRs-Fixed: 3449426
2023-05-11 13:09:21 -07:00
Sandeep Singh
2dee0837c9 cnss2: record timestamps in smmu fault cb handler
Record timestamps in smmu fault cb handler.

Change-Id: I96042ffdc81fcca8069d16bf74899412cf04183c
CRs-Fixed: 3487738
2023-05-08 20:37:48 -07:00
Sandeep Singh
32e1756a19 cnss_prealloc: clean up prealloc mempool and cache on deinit
Cnss prealloc is trying to allocate memory from mempool
for wlan host driver even after cnss prealloc pool has been
destroyed by platform driver because mempool and cache is
not cleaned up on cnss pool deinit. Clean up mempool and
cache on prealloc deinit.

Change-Id: If28a27f5a21441e8650bb846ded889a33580ceaf
CRs-Fixed: 3488178
2023-05-08 12:15:19 -07:00
Alan Chen
035dc8286f cnss2: Add missing CONFIG items to Kconfig
Add missing platform driver Kconfig items to Kconfig file.

Change-Id: I87d6643d62c08de30c814aed59afa6809bfba369
CRs-Fixed: 3479052
2023-05-04 15:53:56 -07:00
Yu Wang
b26c26e7b0 cnss2: notify WLAN driver of system reboot
Notify WLAN driver of system reboot to avoid state
mismatch between cnss driver and WLAN driver.

Change-Id: I03e867484ee450c796c0dfabac7ed550a1d0337c
CRs-Fixed: 3467387
2023-04-28 19:03:31 -07:00
Will Huang
33dff49a43 cnss2: Change AFC data pointer from char* to const uint8_t*
API cnss_send_buffer_to_afcmem pass AFC data from driver to target
which is not changed in platform driver, and it is pass-through byte
stream for platform driver.

Change the AFC data pointer in API from char* to const uint8_t*.

Change-Id: Ib492dbcf028776858926d8a3e11edc528566fac1
CRs-Fixed: 3478093
2023-04-28 00:50:19 -07:00
Chaoli Zhou
cb3e0fc715 cnss2: Change log level for non-critical case
Missing respectivie reserved memory region for wlan
device during cnss probe phase is not a critical
case, so change the log level to avoid confusion.

Change-Id: I629fd94ab8f20176a0c3854b0b1d8f6f53b1b407
CRs-Fixed: 3472865
2023-04-25 23:46:44 -07:00
Sandeep Singh
97303bf330 cnss_prealloc: update prealloc mem pool based on device type
Update prealloc mem pool based on device type.

Change-Id: Ic7fc2145a0039aa55643672b8e125857c096a3ee
CRs-Fixed: 3459351
2023-04-25 23:46:44 -07:00
Yu Wang
21bd3e2016 cnss2: wait for device power up although idle restart is interrupted
When the waits on CNSS_DRIVER_EVENT_IDLE_RESTART is
interrupted by a kill signal, the device power up
is still in progress, it needs to wait for power
up complete to ensure synchronization.

Change-Id: I1f350cf70537257d8edbd5d31378d766f924915c
CRs-Fixed: 3422562
2023-04-24 00:10:45 -07:00
Alan Chen
7793f64f52 cnss2: Add 3 more log buffer regions to ssr driver logs
Add support to include hif_ce_desc_history, hif_ce_desc_history_buff,
and hang_event_data log buffer regions in ssr host dump collection.

Change-Id: I650b94973b8b12cb546a1bc2d121ee319a182767
CRs-Fixed: 3455747
2023-04-21 08:16:54 -07:00
Linux Build Service Account
00e60b6d27 Merge 8eb1e1e993 on remote branch
Change-Id: I87337423789f46b96405d5df9692e10e1428343e
2023-04-19 10:08:54 -07:00
Sandeep Singh
18a4f28a8d cnss2: notify wlan fw to stop trace collection
Cnss2 driver receives cnss_pci_smmu_fault_handler cb from smmu
driver whenever wlan fw access illegal IOVA address. In
cnss smmmu fault cb handler, cnss2 driver rings trace stop
door bell register to stop tracing in wlan fw. This will
help to get proper traces to debug where illegal access
is happening in wlan fw.

Change-Id: I953ced55d4d847ccaabad15f5f70150aec8aabd6
CRs-Fixed: 3459443
2023-04-18 18:26:59 -07:00
Chaoli Zhou
03a337ba78 cnss2: Support enable 32k sleep clk from cnss2
Add one new device tree config item "qcom,sleep-clk-supported"
to support enable 32k internal sleep clock in case it has no
external 32k clk attached in wlan chipset HW. Like qca6390
on some auto platform, host need explicitly tell firmware
to use internal sleep clock, otherwise it will cause LMAC
ps failure.

Change-Id: I52f5d332a912235596eb127ab8e4660355988038
CRs-Fixed: 3448595
2023-04-14 11:58:40 -07:00
Meng Yuan
8eb1e1e993 cnss2: fix the issue that NULL pointer may be referenced
Pointer 'plat_priv' returned from call to function
'cnss_get_plat_priv' may be NULL and may be passed to
another function that may reference it.

Change-Id: I5f8bad5efd0b728127f6f257882693a042d78223
CRs-Fixed: 3428657
2023-04-11 06:26:10 -07:00
Rajesh Chauhan
ff372a6f1d cnss_prealloc: use slab_cache from slab struct to identify mempool id
CNSS prealloc maintains various prealloc pools of 8Kb, 16Kb, 32Kb
and so on, and allocates buffer from the pool for wlan driver. When
wlan driver requests to free the memory buffer then CNSS prealloc
needs to first find out mempool id from which this buffer was allocated.
Use slab_cache from slab struct to identify memory pool id. Until
kernel 5.16, slab_cache was part of page struct but in kernel 5.17,
slab_cache is moved out to mm/slab.h file.

Also change WCNSS_PRE_ALLOC_GET_THRESHOLD to 8Kb to match with
cnss_pool_alloc_threshold.

Change-Id: I4e34d8f0b855c210cc9af30c1f4a0d6c7e43ab00
CRs-Fixed: 3414037
2023-04-10 10:37:41 -07:00
Chaoli Zhou
bd49da5f3e cnss2: Support disable pcie bw scalling from cnss2 side
Add new "qcom,no-bwscale" under child device node to
indicate it want to disable bw scalling.

And the background is like HSP, it has stability issue
with some specific pcie cable with gen3, so it will
negotiate with RC side to change from gen3 to gen2
with MHI_ER_BW_SCALE_ELEMENT_TYPE event, which will
impact all the platform that want to keep use gen3.
So add this device tree config item to skip the link
speed negotiation.

Change-Id: I4a8d94a50dd740b84c3eeac435c5a19098b79ad9
CRs-Fixed: 3435289
2023-04-07 18:28:25 -07:00
Naman Padhiar
190e1efaa9 cnss2: Avoid PBL/SBL region dump in Mission mode
Access to PBL and SBL log region in SRAM is restricted in
Mission mode. Avoid PBL/SBL log region dump in Mission mode.

Change-Id: Ia8813ccd9e2c0339c280e6cb6d6f0bab0bee206e
CRs-Fixed: 3432159
2023-04-07 17:02:05 -07:00