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
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
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
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
Some auto HW can't guarantee wlan_en low state when powerup.
Add a macro to enable initializing wlan_en state.
Change-Id: I6755bcd49c78f7bb9931f80cb385e62177ebe603
CRs-Fixed: 3355148
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
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
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
Debugfs item control_params can be used to disable|enable
drv suspend, since FW can configure suspend mode only before FW ready,
so host needs make sure this flag is set at proper phase.
Change-Id: I632e3802aa1ab152fe153530a49a7405599cf96d
AOP Mbox interface message is updated to include the PDC name as WLAN
devices like KIWI needs 2 PDCs.
Also following updates are done:
1. Always open Mbox channel for OL CPR update.
2. Add device tree config for PDC - VReg mapping and
WLAN device PDC Init table.
3. Reconfig PDC based on WLAN device connected to the platform.
4. Add debug interface for PDC update.
Change-Id: Ia3150166a0ef5d44cb74a8c7e3b78870284cd18f
WLAN driver register requires calibration to complete if enabled.
Calibration timeout can happen due to FW or file system mount delay.
Update driver to assert only for calibration timeout due to FW.
In some cases file system mount may take longer if file system repair
is attempted. Thus update cnss platform driver to wait for this
operation to complete and only log the time elapsed.
Change-Id: Iacd4d4565fb05ae1557c94c574c0153b5995b226
The side-band SOL (Sign-Of-Life) GPIOs are introduced to help make
RDDM more reliable so that device dump can be copied correctly. When
device SOL GPIO is triggered from device, it means there is watchdog
reset happened in device and driver should expect RDDM to happen.
When host SOL GPIO is triggered from host, it will result watchdog
reset as well as PCIe controller reset in device which should try to
enter RDDM always. This commit also adds debug hooks for the GPIOs.
Change-Id: I61a0f252d04ab0a62c5bf838850fe9a1bec2273b
Bring CNSS family drivers from msm-5.10 kernel as of commit
cc3bc4b888af (cnss2: Fix a few switch statement fallthrough
issues) to WLAN platform project. Fix SPDX-License format for
a few files as well.
drivers/net/wireless/cnss* -> .
include/net/cnss* -> inc/
Above shows how directories and header files are relocated.
Change-Id: If8fd40a35c9fdbeb1aa76a8aac5fdb1fc1c7e786