Fix issue in return type of following functions:
- cnss_rddm_trigger_debug()
- cnss_rddm_trigger_check()
Change-Id: I41eb4637605f9a2189e03e732c688c25b0895a90
CRs-Fixed: 3304957
Add code to update feature list with CNSS_WLAN_EN_FEATURE flag
if WLAN_EN gpio is supported, the host indicates to firmware
about the WLAN_EN support via the feature list which is sent as
part of host capability qmi message. This would help firmware
to decouple the PERST in RDDM for MSM targets.
Change-Id: Iec870a0f9528a4ffdb118459ec611b33ff01cf80
CRs-Fixed: 3084551
Converge dt nodes for wlan chips that share the same PCI slot
into one node.
The items in this node are split into 2 parts: common and chip
specific.
The common part will be parsed during cnss probe, such as basic
power related configuration and bus type, to power on the device
and trigger pci probe;
Chip specific part will be parsed during bus specific probe, this
part includes chip specific power and feature related
configurations.
With this change, cnss2 can support different chips on one pci
slot with the same image.
Change-Id: I08c64b6dc3cc27a479ee6fd07e3c8705cc3ac43d
CRs-Fixed: 2384088
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: I91cbe8700b8f165c1140d015c28b1c34d3ea99bd
CRs-Fixed: 3298228
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: Ieb53f5a6db7378b2ac77db252343dfedb2b51a8c
CRs-Fixed: 3295225
TZ APIs, to check the secure peripheral state, can return error code
which says feature is not supported. Set a flag if feature not
supported and avoid calling TZ APIs again till next device boot.
Change-Id: I8f83c206b7a876cbaa304b442a9cfe9f6372a04d
CRs-Fixed: 3290183
Some compilers such as clang requires the attribute instead
of just a fallthrough comment when -Wimplicit-fallthrough
is enabled. So replace fallthrough comment with attribute.
Change-Id: I1935bfb325b550fbc6539c58a99b3696fb6cc753
CRs-Fixed: 3295197
In some scenario like ssgtzd get killed, CNE and TZ go out of sync.
Consider a case where TZ notified CNE to enable WLAN HW. Now CNE
will request to CNSS to Enable WLAN HW. At the same time again TZ
notified CNE to Disable WLAN HW but due ssgtzd killed, CNE did not
wait for previous request(sent to CNSS to enable WLAN HW) and immediately
return to TZ. TZ assumes everything is done and change state to secure
mode. Now CNSS act on previous request of enabling WLAN HW but when
when checks the state it get secure mode and fails to enable WLAN
and asserts. Avoid assert in such scenarios.
Change-Id: I85f63258ff55a44cfcc5ebeaa9da9ba19db67780
CRs-Fixed: 3288122
DMS server runs in Modem. When Modem SSR happens dms_del_server
gets called. Even after DMS service disconnected, qmi_txn_wait is
still waiting. Release DMS QMI handle in dms_del_server to cancel
pending transaction.
Change-Id: I06ccfba34269dc51288300aa5fa0326842a09e32
CRs-Fixed: 3288808
According to kernel comment for in_atomic(), it's
incorrect to use it outside core kernel code.
To follow this rule, replace
(irqs_disabled() || in_atomic()) with (!preemptible())
when getting GFP flags.
Change-Id: I7cdb28a7f12ffd60216c7bc1921a277de6113cb5
CRs-Fixed: 3273779
As per implementation of might_sleep(), rcu_read_lock()
nesting depth should be take into consideration too to
figure out whether sleeping is allowable or not.
To make align with it, allocate memory with GFP_ATOMIC
if rcu_read_lock() nesting depth is not zero.
Change-Id: Ib225a33b1a3f37b919e41daf064ce2de44428973
CRs-Fixed: 3271651
Sram dumps are getting dumped only for qca6490 debug build, so
allocate sram dump memory for qca6490 debug build only.
Change-Id: If714b49720c1445ebfc0d4645dde592145b734a8
CRs-Fixed: 3256709
PCIe gen switch via debugfs is allowed only for QCA6490. Remove check
on QCA6490 and instead allow PCIe gen switch based on firmware
capability exchange.
Change-Id: Ib17c54a6c17a2b87d01a877b057495debec704f6
CRs-Fixed: 3260767
When DRV is disabled during use, MHI satellite is still enabled and
is causing timeout when suspend occurs again. Hence, set base to 0
for MHI satellite when DRV is disabled in order to disable it.
Change-Id: I68315cc102884a33b2ba92753f21af2e59b6b466
CRs-Fixed: 3256095
If Device boots up in secure mode, CNSS defers PCI enumeration,
calibration and host driver registration. When secure mode exits
host driver gets notified from CTRL_PARAM and calls PLD API to
perform previously deferred operations and enable WLAN HW. This
can take some seconds and by the time again Secure mode can enter,
disable WLAN and access controlled by TZ.
Now Calibration completes and CNSS receives CAL_DONE indication.
As part of CAL_DONE when CNSS try to power off WLAN access WLAN_EN
it results in NOC error.
One more scenario, where CNSS can access WLAN_EN when WLAN HW
is disabled by TZ, could be when QMI message times out. Consider
secure mode is entering as part of CNSS will to IDLE shutdown.
During IDLE shutdown while sending MODE_OFF QMI message to FW
it might wait for 10 seconds if FW does not respond. But TZ has
timeout of 5 sec if framework does not respond in 5 Sec TZ will
disable WLAN_EN and access control it. Now when after QMI timedout
when try to access WLAN_EN it results in NOC error.
Check secure peripheral state before updating WLAN_EN and maintain
correct driver state in such scenario.
Change-Id: I4a0892f02edb42496b9633d2d33ded26cbc08707
CRs-Fixed: 3247847
It can be used to tune the host and fw time synchronization interval
for better accuracy.
Change-Id: I0a3d8895520cec526341f278c91f153dd0bd1966
CRs-Fixed: 3257702
It is observed during some stress tests under very bad thermal
conditions that wlan re-probe can fail after cnss2 probes the
device for the 1st time and then powers it off.
When this happens, the SW_CTRL signal doesn't go high after
cnss2 toggles WLAN_EN.
To avoid such issue, add support for conditional device power
off so power supply will be retained for certain chipsets after
cnss2 probes it for the 1st time.
Change-Id: I81d508f2a69fcbc6f8761988981ec432af059fac
CRs-Fixed: 3241179
Add code to parse and store hwid bitmap received from Firmware
as part of target cap response QMI message. The bitmap gives
information about the FEM combination in use.
Change-Id: I6c7e9cedfc70df056ed361953b10a65166915087
Signed-off-by: Sandeep Singh <quic_sandsing@quicinc.com>
On device probe, cnss2 should not power off the device in api
cnss_wlan_device_init() because the device either:
1) has already been powered down after it is enumerated by
the pcie probe callback and its related code; or
2) doesn't have to be powered off.
To fix this issue, add code to return directly from
cnss_wlan_device_init() without powering down the device once
cnss_bus_init() returns 0.
Change-Id: I1dd57952368471e522757cdda47bf2ac27eab112
CRs-Fixed: 3244133
Add code to fallback to non-contiguous FW mem allocation on
failure to allocate contiguous memory.
Change-Id: Idbc7ff7f9ea4d2157e3b549dde8ee090a0f0b412
CRs-Fixed: 3072737
There are scenarios where APIs to get HW secure mode fails
due to feature not supported. Handle the error gracefully
for such cases.
Change-Id: Iace96f21dbbcd87ddb94bf4546a0fca3b3868995
CRs-fixed: 3241447
Based on the results of some stress tests under very low
temperature, such as -40degC, the AON voltage on some of the
devices can take more than 1.5s to reach zero. And under
such circumstances, wlan device probe can fail if cnss2 turns
on wlan power supply too fast.
To avoid wlan probe failure, increase the value of wlan power
on retry factor to 4 so cnss2 can wait up to 2s during extreme
conditions before probing the device again.
Change-Id: Id56bb4687b30ec214cda05d3ee388b3e5c468ab8
Skip dumping qdss registers if etr dump is not enabled, or
will hit NOC error since these qdss registers are not powered on.
Move dump process after device enter into RDDM mode, or registers
might be invalid.
Change-Id: Ib5e5a8d8beb2e1f76266ce0f25d4abe6e73e7506
CRs-fixed: 3226702
Add support to configure WLAN_EN_DELAY using sysfs.
When temperature detected is less than threshold
configure WLAN_EN_DELAY value from sysfs if it is
greater than default WLAN_EN_DELAY value.
Change-Id: I94ac0c6bb3bd2bc2da122d3cf1215b8fe964159f
CRs-Fixed: 3230892
For kiwi target the current code is using shadow_reg indexes 0,1. Change
the logic to use next two shadow registers of what is used by the host.
Change-Id: Ice95be0f2106078b8f799ca1182d1d8702b564c6
CRs-Fixed: 3218660
Peripheral control service can send notification to enable WLAN HW
even if HW is already enabled at boot. Thus skip wlan device pci
re-enumeration if PCI probe is already complete.
Change-Id: I5687b9ee74afe9331e11ec1fc5f1cf20f94117c8
CRs-fixed: 3224613
WLAN HW can be securely disabled. Add support in platform driver to
handle WLAN cold boot initialization sequence changes if HW is disabled
at boot and WLAN resume sequence after WLAN HW is enabled.
Change-Id: If5036560820c54653801298ceebe4f50b7532f3f
CRs-fixed: 3211229
MHI Satellite configuration is not supported for QCA6490 and KIWI_V1.
Hence remove these configuration from MHI controller for these wlan
devices.
Change-Id: I781af04da1a0a69e1997d5b53704b5e341e17a53
CRs-fixed: 3202317