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
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
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
Notify WLAN driver of system reboot to avoid state
mismatch between cnss driver and WLAN driver.
Change-Id: I03e867484ee450c796c0dfabac7ed550a1d0337c
CRs-Fixed: 3467387
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
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
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
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
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
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
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
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
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
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
It costs 4M when loading cnss2, if device id is QCA6490 and enabled
CONFIG_CNSS2_DEBUG. Which is big memory consumption for low rate issue
debugging. So add CONFIG_DISABLE_CNSS_SRAM_DUMP to disable sram_dump.
Change-Id: Iacf338a3cc8f1583e16034a9873029a450fd254a
CRs-Fixed: 3441274
Change type of local iterator for finding registered log
buffer region to enum.
Change-Id: Iffbde0921fa9d9c9ad15ce890af5c12b28ecc8e7
CRs-Fixed: 3436059
There are scenarios when WLAN Host request for
SOC Wake during SSR. If WLAN FW receives the request
before FW_READY it ASSERT.
Avoid sending SOC Wake request to FW during SSR.
Change-Id: Ia42cc17149de7a33da0161a280c79d5dfce0f4c8
CRs-Fixed: 3435111
Currently, cnss_do_host_ramdump() is allocating memory for a new segment
to be added to list to be written to ramdump, but it is not accounting
for the case that the kcalloc call returns NULL for the segment pointer.
Thus, add a null check after memory is allocated for the segment.
Change-Id: I80b68f699a44800c19a734c0be7e231726368f68
CRs-Fixed: 3431776
Protect dependency on sec-module-symvers under flag
TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE so that platform driver
builds successfully if TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE
is set to false.
Change-Id: Ib357815f73cd3b7e94854fa070ec036bb8624976
CRs-Fixed: 3433493
Currently genoa is using lower 32 bits of 64 bit dma
bitmask. Unexpected access of higher 32 bits may cause
issues.This code change avoids such possibilities.
Change-Id: I8bf17056a12661a7c50333bf5897721d363550a3
CRs-Fixed: 3428036
At the auto platform, DRV feature is not applicable.
So do not issue any DRV related operation from cnss2
side, which may cause the RC PHY not ready in the LPM
case.
Change-Id: Iefae9a885c1adc289da518d65a2974e127bdf359
CRs-Fixed: 3419811
Fw reports binary info to host, host will send to cnss-daemon by
nl80211 message, move log in this path to ipc long context.
Change-Id: Ie458f26789e765f7edf3188ed2897e7082cdb52b
CRs-Fixed: 3427156
There can be scenario where CNSS driver receives
IDLE shutdown request from WLAN Host driver when
SSR/Recovery is in progress. In such case return
-EBUSY to Host driver and avoid doing IDLE Shutdown.
Change-Id: I68bea49d23e741f405acc1f2c9133cb7452d7952
CRs-Fixed: 3418977
Add NULL check for 'cfg_arr' pointer before passing to
'of_property_read_string_array' function
Change-Id: Ief30b57145af5842cfd8e9533fcc5d15ab5ea0f1
CRs-Fixed: 3409579
The function - udelay is used only for very small delays (< 2 msec) on
some arm architecture. Otherwise there is compilation issue like
"__bad_udelay", since input is out of range. This change uses mdelay
to replace udelay and avoid compilation issue.
Change-Id: I42df519e7004d89ae6bb394f65b0d61ab5073784
CRs-Fixed: 3418093
WCN6450 has strict power on sequence where WLAN_EN needs
to be enable first followed by regulators. To achieve
this remove Host Proxy votes before sending TARGET_CAP
and MODE_ON QMI request in which FW is suppose to do
WLAN_EN high.
Change-Id: I315269048c6499153d4d2daf6ee6a829f6fd2ccc
CRs-Fixed: 3413588
Add corresponding driver support for WCN6450 device.
This change adds compatible dtsi entry, msi config,
v3 shadow register config and vreg regulator details
along with enabling bootup sequence for WCN6450 device.
Change-Id: I406c92cdc2815ffd1108331d382c4972befad998
CRs-Fixed: 3404702
In icnss_pdr_notifier_cb() API, event_data gets free while
processing PD_SERVICE_DOWN event. In the same function
event_data->crashed is checking after posting PD_SERVICE_DOWN
event which may cause using event_data even after free.
This commit updates checking for event_data->crashed before
posting PD_SERVICE_DOWN event.
Change-Id: Ie82a0b7b4ceb40063318ab2d926b9c14412fb2c9
CRs-Fixed: 3415299
Support CONFIG_CNSS_REQ_FW_DIRECT compile flag passing
from external to use request_firmware_direct instead of
firmware_request_nowarn to avoid regdb.bin search failure
with qcn7605 that finally cause kernel panic on the LV
platform.
Change-Id: I2431692465298c841bf63add44187c15e68a9742
CRs-Fixed: 3413712
Peach supports TME-Lite to validate FW image. TME-Lite supported
FW image format is different from currently used FW images and it
requires different way of downloading in MHI layer. Set TME-Lite
supported flag in MHI controller for Peach to inform MHI about
FW image format.
Change-Id: I615570914c9cec297aa422ce683b4d1c6c75ea1c
CRs-Fixed: 3364546
For whatever reason, the qca6390 is not in M3 state
during PM resume phase, but still functional if do
force resume. So calling mhi_pm_resume_force()
instead of the mhi_pm_resume() to unblock PM
resume for kernel 5.15.
Reference link:
https://lore.kernel.org/regressions/871r5p0x2u.fsf@codeaurora.org/
As for lower kernel version, like 5.4, it will do local
mhi pm state check in the mhi_pm_resume() instead of
target pm state check, so has no issue with qca6390.
Change-Id: I54c2cef457405720386af6a6f7d4617f3d081875
CRs-Fixed: 3402571
Yocto module.bbclass calls 'make modules' from wlan platform
root dir to compile external modules, it gets the error
"make: *** No rule to make target 'modules'. Stop."
Update Makefile to support make target 'modules'.
Change-Id: I5b20d71eeedb5dac987d42768d609b32bace1b79
CRs-Fixed: 3401306
Add change to print file type which is getting
downloaded from cnss2 platform driver to wlan fw.
Change-Id: I737c9c04bc02a3cd320362f230a0862321ec312c
CRs-Fixed: 3401928
Should power off HST/HSP if it only finished pcie
enumeration without WLAN driver load before do
LPM. Otherwise, it will cause the mhi state switch
from INIT to SUSPEND failure that block LPM.
Change-Id: Ia2c5fbf0a2bf9c088be548eb533d7836f45a3cfd
CRs-Fixed: 3283893
cnss driver is supposed to be supported across platforms regardless of
CONFIG_PCI_MSM. Hence using CONFIG_PCI_MSM to decide if cnss2 needs to
be compiled is not correct.
This reverts Change-Id: I9ab82aeca945d29d3608e65ecbe69902f8a5b47b.
Change-Id: I1ab90e80694b0e45270f6b47666781d784f8ab76
CRs-Fixed: 3405347
User may configure such runtime_pm debugfs unexpected during test,
add the log to explicitly show what is configured.
Change-Id: I7d427603bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3399930
Current implementation tries to collect FW dump when cnss shutdown,
and then ASSERT after collection complete.
Do not invoke CNSS_ASSERT if SSR enabled.
Change-Id: I8d427603bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3399930
Add cnss2 code changes to register with thermal framework to support
thermal mitigation.
Change-Id: I9d427603bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3386762
As per Hibernate Entry (i.e. SUBSYS_BEFORE_SHUTDOWN with flag
crashed is not set) and based on low power supports it set the
state to ICNSS_LOW_POWER.
While processing the SUBSYS_AFTER_SHUTDOWN, its reset the
ICNSS_LOW_POWER state based on previous state already set
state and low power supported.
But before system freeze callback triggered,
SUBSYS_AFTER_SHUTDOWN event received to wlan and due to
which ICNSS_LOW_POWER state is clear and freeze callback failed,
thus its leads to prevent Hibernate freeze on WLAN.
This fix is to provides WLAN entered into Hibernate freeze state
by not clearing ICNSS_LOW_POWER state in SUBSYS_AFTER_SHUTDOWN.
Change-Id: I7b34d54c7ce5314e5092dbe2c0bc65ffe13d014d
CRs-Fixed: 3394501
Hibernate is a system wide power mode during which Modem
would be brought down along with DDR and the RAM contents
would be saved on the disk (suspend-to-Disk).
Modem would be do graceful shutdown in Hibernate mode,
so BEFORE_SUBSYS_DOWN notification will be received.
Based on dtsi node "is_low_power", if BEFORE_SUBSYS_DOWN
with notif->crashed bit not set is received, platform
driver will trigger an idle shutdown and set low power mode.
On AFTER_SUBSYS_DOWN notification, low power mode will be
cleared if it was set and ramdump collection will happen
only in case of crash.
Change-Id: I7b618e7c23950e4055079cde237ed75d6861620f
CRs-Fixed: 3394501
Deep Sleep is a system wide low power mode during which
Modem would be brought down and DDR would be in self
refresh mode (suspend-to-RAM) thus platform driver on
receiving deep sleep indication goes to a state similar
to SSR apart from the fact that FW is not crashed but
deliberately brought down.
In msm-5.15, there are no seperate notifications used
for deep sleep, notifications used for hibernate like
BEFORE_SHUTDOWN, AFTER_SHUTDOWN, BEFORE_POWERUP and
AFTER_POWERUP are used for deep sleep also.
In this commit add only low power mode state to
icnss driver state.
Change-Id: I4b12c5a8841e3cfc3e5e44ab6d9dff141e472876
CRs-Fixed: 3394501