HIF PM link state is used to indicate bus is alive or not. This
indicates RING HP/TP updating directly or using async method.In
RTPM suspend failure flow, CLD reject RTPM suspent request, but
state is not resumed correctly.
Change-Id: I3b96dc1fb34e2810d721e1fcb4db609a3d1d684d
CRs-Fixed: 2919930
Currently in the WoW design of Moselle, EXT GRP IRQs are
enabled before sending SMP2P power save exit message is
sent to the FW. Because of this, any pending IRQs in the
GIC will immediately fire and could race with the SMP2P
power save exit logic. Any access to the registers done
before power save exit would result in system errors.
Enable the EXT GRP IRQs after sending power save exit
command will fix the problem.
Change-Id: I16f580279b5aa24861ab5111b9c13db3e38063f4
CRs-Fixed: 2925554
psoc_cfg is pointing to the address of a structure variable,
which will never be NULL.
To address this remove the NULL check.
Change-Id: I12f539ce2feace550c403ffc996fa315994470a7
CRs-Fixed: 2911862
There is a compilation error due to use of PMO_ACTION_BLKACK, which
is not defined. Change PMO_ACTION_BLKACK to PMO_MAC_ACTION_BLKACK to
resolve this issue.
Change-Id: I011c4c323bfa7d104c6a6879aba93085a35fed3d
CRs-Fixed: 2923577
offload igmp feature to fw in case of suspended state
to avoid high power consumption.
Change-Id: I05fbf23dc2836f8f5dc6e2f45b35bf2d30c39790
CRs-Fixed: 2907644
Currently runtime resume is marked as success after kicking
HTC queues, due to this non PM marked WMI commands are not
sent out properly.
Fix this by marking runtime resume as success before kicking
HTC queues, since resume is set as success as part of HTC kick
queues WMI commands will be sent out properly.
Change-Id: I5e3f98cbc5888bdf83f760b055c9b706c18737ef
CRs-Fixed: 2899609
Set system state in hif ctx to suspend or resume on
system suspend and resume respectively.
Change-Id: If1904a4fe5c861deed1b35071be10cb8cc8d6407
CRs-Fixed: 2899520
As part of WiFi ini clean-up FR, the ini parameter
gDataInactivityTimeout, is identified as it is no longer used
and hence it can be deprecated.
Change-Id: Ic01ba8934058cf2fb3bec042f11b01ea70ef7a3f
CRs-Fixed: 2896042
This is to enable feature for detection CE tasklet
scheduling delay and credit response delay issue.
Change-Id: I659aa23eabaa28bfb11051bf15e0343c94061b86
CRs-Fixed: 2874867
Any update to the SRNG TP/HP when the device is in low power
state would result in system errors. While in D3 WoW mode,
disable EXT grp irqs and drain TXRX before sending enter
power save mode to the FW. This will ensure that no interrupts
are received while in WoW mode and as a result there wont be any
HP/TP updates.
Change-Id: Ic1fb7fdd45096b458abf5d243fa652c3da878dc0
CRs-Fixed: 2890568
Add vendor command interface/feature through which the user
or vendor can set the dtim count as per their requirement.
Change-Id: I26010948c4ed7e3c49bfe0453119235d4f438c6f
CRs-Fixed: 2894349
Possible wmi cmd is queued in suspend, if no more
htc_try_send comes from credit response or new wmi
cmd, wmi cmd will pending.
Fix is always kick htc queue if suspend failure.
Change-Id: I05e0cd6983e1d27de5bf109c3ddf05e4bdc12fd8
CRs-Fixed: 2895808
Currently when TWT commands are sent to firmware, the host driver
doesn't acquire wake lock. So the wlan can got to wow mode before
receiving the TWT command response and the response will get
dropped since host is in wow mode.
To avoid this make the TWT events as wakeable so firmware can
wake up host if host is suspended.
Change-Id: I2750049f9173de564e24114731d3fdd8ec8d6d86
CRs-Fixed: 2869865
Add WMI service FW capability check before enabling D0 and D3
WoW for SAP and GO clients connected mode.
Change-Id: I878e4ee33807804e049bf1e8b8078d28fc1d4834
CRs-Fixed: 2869072
Rename existing INI to enable_bus_suspend_in_sap_mode and define a
new enable_bus_suspend_in_go_mode. Also define new APIs
wma_is_vdev_in_sap_mode and wma_is_vdev_in_go_mode.
Change-Id: If38c4db7b3d1f7323df45d9a7d80a02a44e7ca41
CRs-Fixed: 2864596
By default, PCIe bus suspend is not allowed in beaconing modes
(SAP/P2PGO/NDP) with one or more clients connected. Some OEMs need
PCIe bus suspend in this mode. Hence, add a config item to serve
both types of requests.
Change-Id: Ia2d990f17f605036d43db75ecd4df57701b4ba1f
CRs-Fixed: 2860495
With Change-Id: I7f38b3dc6975fcc208ad85e913564dfef5cc1cb7,
Tx register write is permitted after hif bus resume during runtime pm
resume, don't wait WMI_WOW_WAKEUP_HOST_EVENTID.
In F/W, there is an race condition when exit from WOW, both
WAL_TX_TID_TQM and WAL_TX_TID_TRANSITION_TO_TQM_ONGOING are not set yet,
data frame is received from host, assert will hapen.
To fix it, host tx register write shouldn't be permitted to update hp
until receive the WMI_WOW_WAKEUP_HOST_EVENTID.
Change-Id: Ic397652a9a0c4bc81667aed11805b2ce8070ee8d
CRs-Fixed: 2858115
When unit test WoW is executed, system suspend case is currently being
executed. Add a new case for handling unit test WoW suspend mode.
Change-Id: I9defa7175a638363a1dd736018d17a42d8afe6b3
CRs-Fixed: 2855437
Issue1: Driver RTPM state is ON/NONE, Kernel state is RESUMING.
cdp_runtime_resume is already complete,
hif_pm_runtime_get return -E_INPROGRESS,
dp_tx_hw_enqueue will set the flush event,
but cdp_runtime_resume is already done,
this flush event will be handled only on next pkt tx.
Issue2: Driver RTPM state: Resuming
hif_pm_runtime_get returns -EBUSY,
dp_tx_hw_enqueue is interrupted by any IRQ,
cdp_runtime_resume is completed,
dp_tx_hw_enqueue will set the flush event,
This flush event will be handled only on next pkt tx.
Fix:
Introduce a link_state_up atomic variable in hif to track the link state
change by pld_cb.
Set atomic variable link_state_up=1 in pmo_core_psoc_bus_runtime_resume
just after pld_cb. pld_cb brings the PCIe bus out of suspend state.
Set atomic variable link_state_up=0 in pmo_core_psoc_bus_runtime_suspend
just before pld_cb. pld_cb puts the PCIe bus into suspend state.
Introduce dp_runtime_get and dp_runtime_put.
dp_runtime_get get refcount with increment of an atomic variable.
dp_runtime_put return refcount with decrement of this atomic variable.
If hif_pm_runtime_get returns -EBUSY or -EINPROGRESS,
take the dp runtime refcount using dp_runtime_get,
check if the link state is up, write TX ring HP,
return the dp runtime refcount using dp_runtime_put.
cdp_runtime_suspend should reject the suspend, if dp_runtime_get is non
zero.
cdp_runtime_resume should wait until dp_runtime_get becomes zero or time
out, then flush pending tx for runtime suspend.
Change-Id: I7f38b3dc6975fcc208ad85e913564dfef5cc1cb7
CRs-Fixed: 2849002
In moselle, the runtime suspend and wow resume sync logic has
been added without any condition, since hastings is doing APPS
side PCI bus suspend which cannot be reverted on suspend failure,
so doing this sync logic only if wake irq type is CE interrupt.
Change-Id: I07dc5a99d0661fe1ef81e7a46e7053244edf8eb6
CRs-Fixed: 2851261
In pmo_core_configure_dynamic_wake_events vdev reference is acquired
and its not released leading to the reference leak, leading to
vdev destroy timeout.
Release the vdev reference to resolve the issue.
Change-Id: Idd3bcb366f211e037ede278c91d6bcefd4165651
CRs-Fixed: 2850076
In moselle, once wow enabled there is a possibility that wow wake
interrupt can be fired from FW during runtime suspend in progress
in host, this will introduce a race between runtime suspend and
resume, so adding a synchronization between runtime suspend and
wow triggered runtime resume.
Change-Id: I19a4d70f47d5c202d0ba291c3edc8a260690f434
CRs-Fixed: 2845670
Currently when the FW is down, runtime resume return success
status but does not send the power exit and WOW wake up from
sleep command to FW. So WMI_WOW_SET_ACTION_WAKE_UP_CMDID
command is sent to FW which leads to panic.
To avoid this issue, send the correct error status for runtime
resume if FW is down.
CRs-Fixed: 2830614
Change-Id: Id27d2648427b32d32c15370fbb170fafec9450d2
Currently, Stats request commands are sent over qmi right from the
target suspend request is sent to FW. This is leading to a crash in
FW since it is trying to access PCI when it is in suspend state.
To address this, send stats request over QMI only after the ack is
received for the target suspend command.
Change-Id: I1b2b6a60c5d8c7ec4375d328e58a66d749794e3f
CRs-Fixed: 2835903
Currently max value of gEnableModulatedDTIM is 5 which is
incorrect as FW supports maximum no. of modulated DTIM as 10.
To address above issue update max value of gEnableModulatedDTIM
ini.
CRs-Fixed: 2830240
Change-Id: I7f1cab6f0cb2b2a60e7cc1bb37a9971c1752a1bb
On some third party platform, the in-band bus suspend-resume is
not supported well, instead add gpio irq as wakeup source to
support out-of-band suspend-resume.
Change-Id: I7621f04d093013e15719b5c84dc244604be238df
CRs-Fixed: 2815754
A race condition is observed when runtime suspend is aborted
due to pending TX packets but context switch happened and pm_state
did not revert to active state yet. In parallel, WMI_PEER_DELETE
command is queued but not sent as pm_state is still in suspending
state.
To fix this, schedule HTC queue kicker work to resend pending
commands again after dp_runtime_suspend aborts due
to pending TX packets.
Change-Id: I6d2c4140a4635c0aec304f48b15fb2b539ac39ea
CRs-Fixed: 2813657
Use separate hang reason for case that lack of credit after suspend.
Meanwhile add hang buf offset check to avoid overflow.
Change-Id: Ic794d02672cd663598da66b9e75924c41b5ef0e8
CRs-Fixed: 2801343
Currently pmo_psoc_get_vdev api just returns the vdev without
taking the vdev reference and it is caller's responsibility to
take the reference, there could be a race condition where after
getting the vdev and before getting the reference of that vdev,
some other thread may delete this vdev.
To avoid this issue use objmgr api to get the vdev for pmo.
Change-Id: I3495589e2dbbb7d8efc579a62fff1a08a92c318f
CRs-Fixed: 2771211
If the INI item enable_mod_dtim_on_system_suspend is set, then
set the bit WMI_WOW_FLAG_MOD_DTIM_ON_SYS_SUSPEND in wow flag
parameter.
Change-Id: I15a717bd5f5532dd2c8a6e27e5df8c28965da062
CRs-Fixed: 2789161
Compiling with gcc 9.3 will cause many implicit-fallthrough
compile errors.
Fix is to add keyword fallthrough to resolve such compile error.
Change-Id: I3fdc48b1a9ab2345a47ae644e3217b4d29238364
CRs-Fixed: 2785172
In order to apply modulated DTIM only on system suspend display off use
case, in RTPM wow mode, for display on and display off, FW will stick to
DTIM 1.
Change-Id: Id282c11c39d38e8a5d55574783d280b092dbb485
CRs-Fixed: 2784872
Add a new ini item enable_mod_dtim_system_suspend to control the
modulated DTIM on system suspend feature.
This ini is used to set modulated DTIM configuration:
Current values of enable_mod_dtim_on_system_suspend:
0 -> Modulated DTIM will be enabled for every wow entry
(RTPM wow + System suspend wow)
1 -> Enable modulated DTIM only for System suspend wow.
For RTPM wow, the device will stay in DTIM 1 (non-modulated DTIM)
Change-Id: Ia3a9d259d8ba1e483ea3e8e7f99f60bbc27c67af
CRs-Fixed: 2787108
qdf_mem_malloc() function already takes care of logging the
caller function name and line number in case of any allocation error.
Hence there is no need to add the error log again.
Getting rid of these unnecessary logs reduces driver memory footprint.
Change-Id: If0b9425f82f9ed793c7639c0ed09eb1f868b6d5c
CRs-Fixed: 2781932
Qpower config should not be allowed if Qpower config/OPM power save config
is disabled in ini file.
Change-Id: Iff21159f30731f7188506ab5e5e3133d02203b6b
CRs-Fixed: 2778632
Currently pmo disable run time pm offload api gets the vdev
inside psoc obj lock but tries to take the reference of
vdev without any lock protection, in this case it is possible
that one thread gets the vdev and when it troes to get the vdev
reference some other thread deletes the vdev because if which
first thread will not be able to get the reference for the vdev
which it alreaady holds.
To address above issue use objmgr api to get the vdev.
Change-Id: I8f47515f39ace809cfe9e134fd704a2914ed3d9a
CRs-Fixed: 2769887
The logging macros implicitly takes care of embedding function name
in the log, hence there is no need to include __func__ again.
Getting rid of redundant __func__ reduces driver memory footprint.
Change-Id: Idf4685539991f65205f19b27551cef699230c82e
CRs-Fixed: 2768575
Sometimes frames are queued to dp_rx_thread wait queue
during WoW suspend in progress. At this time dp_rx_thread
is in SUSPEND state and these frames can't deliver to Linux
Stack, for ICMP case, if no other frames come to wake up
system, ICMP timeout will happen. Add a RX suspend check
in WoW to avoid suspend when frame comes before WMI_WOW_ENABLE
sends to FW
Change-Id: I3d37e6d6ce8f7f6edaf5f78bf5cef77bee6ed5c6
CRs-Fixed: 2755583
There is no info level log in wow disable path and hence
in absence of driver logs its difficult to notice wow
disable. Change host wake up log to info log level to
assist in debugging when driver log is not available.
Change-Id: If8a4dfae7f30413a7acbd03374340a76c9d4923b
CRs-Fixed: 2753189
Currently, self recovery is being triggered when suspend/resume
timeout happens. The self recovery API will creates a work to
trigger recovery handler. But this work is not required if the
suspend/resume timeout happens due to FW down. In this case the
recovery will happen as part FW down indication and no need to
trigger recovery for suspend/resume timeout.
Change-Id: I75ea9f67efb21a3e9aaea99b53c256460ba696c5
CRs-Fixed: 2739385
Reduce wow suspend/resume timeout to 4 seconds to accommodate
lower DPM WD timeout values. WoW suspend/resume timeout value
should be less than DPM WD timeout.
Change-Id: I481ae544de0d26b49bcc0f5c4d4a384693707a5b
CRs-Fixed: 2730955
FW sends a disconnect request to HOST while roaming failure
through event WMI_VDEV_DISCONNECT_EVENTID per vdev id.
Fix is:
1. Process WMI_VDEV_DISCONNECT_EVENTID and issue disconnection.
2. Make WMI_VDEV_DISCONNECT_EVENTID event as wakable
Change-Id: Ic1e83aace48a3e8424f23641b0e77c66f4283587
CRs-Fixed: 2731952