Add wlan dts property qcom,pcie_switch_type to mark the wlan chip
is attached on the PCIe switch NTN3. If it's PCIE_SWITCH_NTN3, cnss
driver will enable/disable accordingly PCIe switch dsp link when
power on and shutdown wlan chip.
Change-Id: I48bb56879d5c00f05d0b4e62888027c435f861ee
CRs-Fixed: 3878342
Add support to check if IPA and WLAN share a common dma pool
and based on that take descision to map the rx buffers or not
in IPA use case scenarios
Change-Id: I5d684db1cffc9f04b962cf7bdf0305b7d5e1df23
CRs-Fixed: 3878739
During cnss unload or error quit, cnss_dms_deinit() is called to
perform dms client deinit. When dms sever quit, modem also send event
to cnss to schedule dms client restart with dms_del_server(). The two
processes are asynchronous so qmi_handle_release() may be entered
twice and cause qmi->sock to be used after free.
To avoid this race condition, call cnss_cancel_dms_work() before
cnss_dms_deinit() to guarantee the two processes not run concurrently.
Change-Id: I291c1d0bdead190549dcbbb2c4b7aa65a68196d7
CRs-Fixed: 3875961
Dump_enabled need to be checked before invoking qcom_dump for
pushing the Wlan FW dump to file system. Otherwise SSR gets stuck.
CRs-Fixed: 3805707
Change-Id: I7bd5d0579f71c1b3fa88fc41cd274bc8f432dab5
For dual chip solution, first chip may fail to probe because of pcie
driver is not ready. During second chip probing, first chip may retry
to probe. So, second chip may set/get plat_env[0], first chip may
set/get plat_env[1].
If sencond chip not attached, plat_env[0] will be cleaned. When
cnss_pci_probe() is called by first chip, cnss_get_plat_priv_by_rc_num()
will call plat_env[0]. However it is already NULL.
Change-Id: Ib959b1a524bf777fc6a826b2771611cb28b8cb99
CRs-Fixed: 3778085
qcom_smem_get() returns 'ERR_PTR(ENODEV)' when Secure HW feature
is not enabled (related kernel config: CONFIG_QCOM_SMEM), add
the checking for this case.
Change-Id: Id3c6f8407a4eb4bc2124014503cc50bb99e90235
CRs-Fixed: 3769852
Add support to determine if CNSS and Audio share
IOMMU group and do iommu_map/unmap only in the
case of distinct iommu groups for direct link
datapath.
CRs-Fixed: 3714345
Change-Id: I6134e9d732052fd492e0f20d538e86ba96c14c4d
This reverts Change-Id I848309440fdffd6517463e18190c03c1b7ed9269.
Reason for revert: Separate FW Binary not required
Change-Id: Ib694d38922f81895ce6bc01f4e38f95813625730
CRs-Fixed: 3726340
Currently cnss_get_fw_cap is checking both FW and Audio cap
to enable direct link, add new API to check audio node available
for direct link. So that this API can be queried when direct link
is being used.
Change-Id: Ic2032b338da74021f2b6c483c9480f185554f2d5
CRs-Fixed: 3711887
Print address range for minidump region when
CONFIG_QCOM_MINIDUMP is not enabled.
Change-Id: I7d162bf4b7a057d806df07eda47740bf2471ba1b
CRs-Fixed: 3704383
Fix misfiring of DEV SOL interrupt during enable_irq().
Ignore DEV SOL interrupt in case of device power off
as it is expected as part of off sequence.
In case of HOST triggered recovery, CNSS driver
tries to put device to RDDM first using MHI_SYS_ERR
and HOST_RESET_REQUEST if MHI_SYS_ERR fails. With
SOL enable, replace HOST_RESET_REQUEST with HOST_SOL.
Change-Id: I90c1a2dbd68c4c9c2e56d87dd1304a6ab0db53eb
CRs-Fixed: 3590408
When FW supports segment CALDB memory in memory request,
it sets CALDB_SEG_DDR in its capability which is sent to
host by Target Cap QMI message.
Change-Id: I84b62336ea2616cb2d663c604ac4af8a8d9966b8
CRs-Fixed: 3681105
Send QMI message with SEC, RPR and DPR file information to WLAN FW, to
download TME binaries (sec, rpr, dpr files)
Change-Id: I0a4ab7ab127d493ef62d14658be2aa08b7d41606
CRs-Fixed: 3684131
Add support for host driver to get LPASS-FW shared
memory information in the context of direct link
use case.
CRs-Fixed: 3667595
Change-Id: I8254919814d578c9f28084db52a22f8cb9779112
Remove QMI message to download wlan-connection-roaming.ini
file to FW. This way, for all the OEMs, we would not download
any of this file. Separate change will be raised to download this
files with invalid character check in CNSS2 platform driver and
maintained as hot fix.
Change-Id: Id9f990751d30f28d2d1aac180c24cb6d673e1205
CRs-Fixed: 3640676
As per description of device_add(), never directly free
a device after calling device_add(), should always
use put_device() to give up the reference and free it
in callback function 'release' if it's required.
Change-Id: I5b07b49bcf2e2af6994c05ef038deebc92a825b7
CRs-Fixed: 3637349
Current code has compilation errors
when compiling for sun. sched_clock()
was moved to clock.h, and iommu_map API
was changed with new sun kernel. Fix
this by updating code for new kernel
apis.
Change-Id: I77029fcc74142f3f650dc289c8d19c121eba6445
CRs-Fixed: 3603129
Up until kernel 6.1, devm_device_remove_group() was used when
removing sysfs group. From kernel 6.2 onwards,
devm_device_remove_group() is no longer supported. Thus, create
new functions that replicate original functionality of
devm_device_remove_group().
Change-Id: If3a7b380a03eec5a3f918b5a0813830c3136fd1f
CRs-Fixed: 3601923
Move trivial repetitive logs from cnss IPC logs to
cnss-long IPC logs. This will reduce the chances of
losing important logs required for debug.
Change-Id: I9cfe76614603d5fb9b3e5d4a2f062abbb7fa754f
CRs-Fixed: 3580107
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: I12ca87c851a7b47af0255716ce1b9f59ad2eb70a
CRs-Fixed: 3553530
Provide platform name in host_cap message if
property platform-name-required specified in DTS.
Current platform name is same as device's model name.
Change-id: I8d427602bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3540641
Send QMI message with TME-L patch information to WLAN FW, to
download TME-L patch.
Change-Id: Ieae07c0f761ada45ffcb990b1412654b9c6862b1
CRs-Fixed: 3521187
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
Add support for AUX UC download functionality if aux support is
indicated by both host and fw.
Change-Id: I3bfbebbb5cdfbbaa350a34378ab2f0809f27affb
CRs-Fixed: 3402104
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
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
Add wrapper api to avoid compilaton failure if
CONFIG_WCNSS_MEM_PRE_ALLOC flag is not enabled.
Change-Id: Ic0625d68f587c79f38f33495b53645f1d7582144
CRs-Fixed: 3492092
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
Notify WLAN driver of system reboot to avoid state
mismatch between cnss driver and WLAN driver.
Change-Id: I03e867484ee450c796c0dfabac7ed550a1d0337c
CRs-Fixed: 3467387
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
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
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
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
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
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 cnss2 code changes to register with thermal framework to support
thermal mitigation.
Change-Id: I9d427603bfc7e6bb5d732fa3e29ff66c965e153b
CRs-Fixed: 3386762
Currently, the cnss2 platform driver just can support
one wlan device attached, so do the following changes
to cover dual wlan card attach case. Firstly, delay
the second device go to pcie link suspend and power
off state to make sure it really finished the pcie
enumeration. Then pcie enumeration succeeds with
multi-devices. Secondly, supporting to write the qrtr
node instance id to PCIE register for wlan fw reading,
which can fix qmi message exchange failure if active
two Hastings devices. Thirdly, change the usage of
plat_env to support dual Hastings.
Change-Id: Ica41a23d4e983b91c0ff1b4e76b380803fb877ab