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
Add LPASS SSR reason code that would be used to indicate
the reason for LPASS crash and also add memory type for
FW to request shared memory with LPASS for direct link
use case.
CRs-Fixed: 3653551
Change-Id: I4d6ed721857289f43c01c8522d844656ef15c1b1
From Sun onwards FUNC_SEL for SW_CTRL and SW_CTRL_WLAN
GPIO needs to be set by client. Add support to set
funtion to "wcn_sw_ctrl" and "wcn_sw" for SW_CTRL and
SW_CTRL_WLAN GPIO so that, when these GPIOs goes high,
PDC get interrupted and TCS sequence(which enables RF_CLK)
can be started.
Change-Id: Ia2ba7d8a89fe6bb54b6563f5319d50c90df2210d
CRs-Fixed: 3668322
Add PBL error logging on host console and dump SOC reset cause
register and PCIE_PCIE_BHIE_DEBUG_n register
Change-Id: I80ae44354b1efc05ed72f69a7e3ee8d358d840d7
CRs-Fixed: 3661767
Some targets use a different location for the build scripts and
set the BOARD_COMMON_DIR build variable accordingly. If this variable
is set, pick up the Build_external_kernelmodule.mk makefile
from this location.
Change-Id: I983849f8f250ea9e9cbf5ee09c71687893abb605
CRs-Fixed: 3636186
CNSS2 registers PCI event callback for wake irq from
PCI driver. When callback is called CNSS2 completes
wake_event to notify the waiting threads. Currently,
initialization of wake_event completion is done after
PCI event callback registration causing issue when
PCI even callback for wake irq is called before wake_event
completion could initialize.
Initialize wake_event completion before PCIe event callback
registration.
Change-Id: If8c6ca5a5d5de5fc903b479d6d32ac0e5349f069
CRs-Fixed: 3648865
'qmp' is not defined in 'struct icnss_priv' when CONFIG_MSM_QMP
is not set, use 'use_direct_qmp' to check if 'qmp' is configured
or not.
Change-Id: I3095f7173c4368d04bfab0c1cefc901ea58fccd4
CRs-Fixed: 3661758
'qmp' is not defined in 'struct cnss_plat_data' when CONFIG_MSM_QMP
is not set, use 'use_direct_qmp' to check if 'qmp' is configured
or not.
Change-Id: If8f822a3bb1acfe10ecf175f742f3f5abd5f7df7
CRs-Fixed: 3647012
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 for sun kernel.
Fix this by resolving the errors.
Change-Id: I903f4c4ca0301626062c3b5d11069feaba48850a
CRs-Fixed: 3632179
Add two vectors for DP in wcn6450 msi config which will
be used in monitor mode and increase number of ce interrupts
to 12 for wcn6450.
Change-Id: I386c98310441fd7c4f9dc8b4cfc7f2da727fe35e
CRs-Fixed: 3629007
Currently Host driver calls cnss_force_collect_rddm API
to trigger RDDM and wait for dump collection. If device
fails to move to RDDM, CNSS driver initiate DEFAULT recovery
(which is recovery without RDDM dump collection) and return
failure to Host driver. Host driver sees error and again try
recovery which results in double recovery.
To avoid this issue, return success to Host driver if
CNSS driver has already initiated the DEFAULT recovery
and release rddm_complete wait event for DEFAULT recovery
cases also.
Change-Id: Ib4b324704d15b40ec98985745b1981522b3b4f2d
CRs-Fixed: 3627928
Remove unwanted delay from PCIe link down recovery sequence
1. Wait for wake event from PCIe driver instead of hardcoded wait.
2. After link recovers, wait for device to move to RDDM mode
instead of starting rddm timer.
3. If device fails to move to RDDM, assert HOST SOL and initiate
side band recovery.
Change-Id: I5a4096ac781dd8f5011b07b0ffb669815a968570
CRs-Fixed: 3590419
Race condition seen between WAKE interrupt handler
and HOST triggered recovery. Due to the race PCI
link up is called back to back. Protect PCI bus
resume with bus_lock mutex.
Change-Id: Ifc140921bdf803bc2d46365b4e5a59cba34ee715
CRs-Fixed: 3614970
Use firmware_request_nowarn api to load qdsss/bdf file instead
of request_firmware api. Firmware_request_nowarn doesn't produce
warning messages.
Change-Id: Ia8a2881cdd6eca43396cda0e05b0c75dc3d21610
CRs-Fixed: 3616145
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
Current code does not contain config files
required for sun compilation. Fix this
by adding sun config files.
Change-Id: I130e6d9f16e36335a0acc52f98715cab622ef8b4
CRs-Fixed: 3603141
There is known pcie linkdown issue for qca6490 if gen3 speed is used.
Previous solution is to downgrade to gen2 before enumeration, but it
doesn't work if platform support multiple wlan chips where device id
can't be determined until enumeration success.
The fix is:
1, Enumerate all devices with gen1 speed
2, When enumeration done, restore to gen2 if device is qca6490
Change-Id: I55d554c4dc7d01ed82fffe79f666b340b1004765
CRs-Fixed: 3612384
When PCIE linkdown happen, IRQ handler will disable IRQ line then
trigger SSR. disable_irq() is used but it introduce sleep in IRQ
context(unexpected). Crash will happen if CONFIG_SCHED_WALT is set:
android_rvh_schedule_bug+0x4/0x8
__might_sleep+0x50/0x84
synchronize_irq+0x48/0xc4
disable_irq+0x70/0x9c
cnss_pci_handle_linkdown+0x1a8/0x1c0 [cnss2]
cnss_pci_event_cb+0x148/0x348 [cnss2]
msm_pcie_notify_client+0x110/0x180
msm_pcie_handle_linkdown+0x2d8/0x2f8
handle_global_irq+0x464/0x5dc
To avoid this issue, should use disable_irq_nosync(), which doesn't
wait IRQ handler to finish. It should introduce no side effect, as
the whole device will be restated later by SSR.
Change-Id: I5ec96d41337a14280333ab9fea0c1f6132a532af
CRs-Fixed: 3548604
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
There may be multiple time inclusion of inline definition of the
APIs defined in the header file qcom_aoss.h if config
CONFIG_QCOM_AOSS_QMP is disabled for underlying target.
This may result in linking error. Move the header file to the correct
place in power.c.
Change-Id: I5c79eff3be4c758db1ab313843b36a02ecccbef9
CRs-Fixed: 3603827
PD restart triggered as part of host based SSR triggered,
this will call PLD shutdown and HDD shutdown.
While processing HDD shutdown host driver check CDS recovering state
and then ASSERT if it is not set.
To Avoid this ASSERT, fix introduced to set CDS recovering by
sending ICNSS_UEVENT_FW_DOWN uevent to Host driver during firmware
crash.
Change-Id: I4f06404b02bb7ce0018b3f8e1e5253e0ba155095
CRs-Fixed: 3595285
Currently wpss_supported variable which helps to download
wlan FW binary using rproc channel and also includes SMP2P
communication between platform and FW.
Currently SMP2P is not required for QCS405 target, Hence
introduced rproc_fw_download to download only wlan FW via rproc.
Change-Id: If230e05fc6098d4ea017d8af74b2b1c7a7afce25
CRs-Fixed: 3596283
For bengal target, getting compilation error due to
Change-Id: Ifc5ff95208e79280543471d56fdb0a87ca973cf5, resulting in
multiple time inclusion of inline definition of the APIs defined in
the header file qcom_aoss.h. This is resulting in linking error.
Move the header file to the correct place in power.c.
Change-Id: I5a0f83fa954feb4656af09527c090f8e7d96bab8
CRs-Fixed: 3595936
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
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: Iae8302fd2e40181a192a2c9afaebdb807b7cf1c3
CRs-Fixed: 3571108
In current implementation, the error log not record the
return value of setting pci power function, with this return
value we can know the reason of why setting pci power failed.
Change-Id: Icf1fdba16faf539334704ca1f8ce24fecd49aa94
When feature CNSS2_CONDITIONAL_POWEROFF enabled, wlan chip HST and
HSP will not power off in cnss probe. PCI link will not be triggered
to retrain once CNSS2_ENUM_WITH_LOW_SPEED enabled.
So, add API cnss_pci_link_retrain_trigger() to trigger pci link retrain
when HST and HSP not power off.
Change-Id: I2ba44837a03b09b1ef3cd0c23a780b89ff837740
CRs-Fixed: 3491396
Complete power_up event on probe failure to avoid timeout while
waiting for this event during unregister of host driver.
Change-Id: Ie262305ef960ab40cd38b4a695d409eb36fcf0d7
CRs-Fixed: 3565756
Remove CONFIG_CNSS2_DEBUG from GKI config so that debug
config get enabled only for debug builds.
Change-Id: Iebe86b3b3969d7de5d5f65c372f7e6d6aa7aa126
CRs-Fixed: 3565145
PCI link info contains maximum link speed and link width
supported by platform. WLAN FW will use supported link
speed to restrict link speed switch upto maximum
supported speed.
Change-Id: Icdf54c8729192faf4966514b57bd826f86652065
CRs-Fixed: 3535790
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
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: Ic5c17c3385318dbc739358ac7ccdb148aed1052a
CRs-Fixed: 3540601