Commit Graph

251 次程式碼提交

作者 SHA1 備註 提交日期
Aditya Kodukula
4d93a28a54 qcacld-3.0: Add a new ini item gEnableIcmpOffload
Add new ini item gEnableIcmpOffload to enable/disable
ICMP offload to firmware.

Change-Id: I107aeec4c75ae18fbe37d373e48339a5b76797aa
CRs-Fixed: 3025650
2021-08-31 22:23:37 -07:00
Rajeev Kumar
e59ae1bbe5 qcacld-3.0: Disable SAP/GO D3 WoW features if IPA is enabled
SAP/GO D3 WoW feature is not supported when IPA is enabled and hence
disable SAP/GO D3 WoW features when IPA is enabled.

Change-Id: Ia3da37087a0ca79c81c546f43a0893e46cf08c3c
CRs-Fixed: 3015104
2021-08-27 15:12:30 -07:00
Ashish Kumar Dhanotiya
d89f39b0bd qcacld-3.0: Add aliasing for INI names
Currently driver has only one name for an INI, with
this change add second name as well for few INIs based on
new requirement.

Change-Id: I6eee13935d1c5c74794027b88d94cbb572339e9e
CRs-Fixed: 3007209
2021-08-09 22:25:05 -07:00
Karthik Kantamneni
dd234699a9 qcacld-3.0: Wait for reg work completion before EP access state transistion
Currently intermediate EP vote access is set without checking
for previous state and reg work handler completion.
In some of the error scenarios when resume is triggered from
suspend path, EP vote access is still enabled and work handler
will be scheduled for register updates.
So make sure reg work is completed before setting intermediate access.

Change-Id: I7a1e55c188b9a9e85309dd44ac03651181499674
CRs-Fixed: 2994039
2021-07-23 18:01:30 -07:00
Rajeev Kumar
e2405723d9 qcacld-3.0: Add IPA dependency note in SAP/GO D3 WoW feature INIs
SAP/GO clients connected D3 Wow feature is only supported when IPA
is disabled and hence add dependency note to display the dependency
between SAP/GO client connected D3 WoW feature and IPA.

Change-Id: Icca4de1082090f5d740acf3b2b449b425b19ffce
CRs-Fixed: 2996992
2021-07-23 01:55:15 -07:00
Alan Chen
62341748f0 qcacld-3.0: Add new ini item enable_dynamic_pcie_gen_speed_switch
Add new ini item enable_dynamic_pcie_gen_speed_switch for enabling
dynamic PCIe gen speed change.

Change-Id: I7dde4e40e56bf894c7edd0805d09425444648e6b
CRs-Fixed: 2977079
2021-07-07 06:41:27 -07:00
Li Feng
3d05280c82 qcacld-3.0: Avoid fw crash in some wow case on third party
Due to the limitation on third party platform, add ini to take
special care of the below wow case to avoid fw crash.
The sap/p2p_go shall kick out all the connected sta/p2p_gc and
then go to suspend if d0wow/d3wow is not supported.
Although there is wakelock try to prevent suspend after tdls link
setup, it won't take effect because auto sleep mechanism is not
supported on some third party platform, so teardown tdls link
by force before suspend.

Change-Id: I14bfe32f04cfc34d4f55a09820e42e65a1d9f925
CRs-Fixed: 2935295
2021-07-02 05:02:36 -07:00
Li Feng
4548644d92 qcacld-3.0: Set moddtim dynamically in the li offload mode
Extend hdd_config_modulated_dtim() to configure moddtim
dynamically in the both non li offload and li offload mode.

Change-Id: I8669ec618d4aa9cd87c4c234972ca500c98119b6
CRs-Fixed: 2970090
2021-07-01 04:24:12 -07:00
sheenam monga
9742335f49 qcacld-3.0: keep pmo_enable_igmp_offload inside igmp feature flag
Currently ucfg_pmo_enable_igmp_offload is conditionally compiled
with feature flag WLAN_FEATURE_BIG_DATA_STATS which may introduce
compilation issue when WLAN_FEATURE_BIG_DATA_STATS is disabled
but WLAN_FEATURE_IGMP_OFFLOAD is enabled.

Fix is to use WLAN_FEATURE_IGMP_OFFLOAD feature flag for
pmo_enable_igmp_offload.

Change-Id: I647ad960f5c0abc14449f0af9430f867ddcdf1e3
CRs-Fixed: 2981344
2021-07-01 02:04:03 -07:00
Yu Wang
c96692a0f9 qcacld-3.0: allow DCS interference event to wake up host
Set WOW event bitmap for WMI_DCS_INTERFERENCE_EVENTID.

Change-Id: I41d9101789adfdc954e4bade974113c51c7f6141
CRs-Fixed: 2960240
2021-06-29 15:04:53 -07:00
Alan Chen
27aeb4863e qcacld-3.0: Add debug log to print link vote id
Add debug log to print more details about the link vote id when
PCIe link suspend is not allowed.

Change-Id: I5069202436e0da37b8ae22f84e28ac06d35002b5
CRs-Fixed: 2964957
2021-06-24 16:32:02 -07:00
Alan Chen
547911c026 qcacld-3.0: Add debug log for prevent suspend
Add debug log to find more details when PCIe link suspend is not allowed.

Change-Id: I0305f6aaabfcff630e863018a7e768531a9cb890
CRs-Fixed: 2963988
2021-06-18 03:22:16 -07:00
Karthik Kantamneni
239913e04c qcacld-3.0: Set intermediate EP vote access
Set intermediate EP vote access before host
wake up indication smp2p is sent to F.W,
this helps to avoid smp2p override.

Change-Id: I4b998ee5ea6b26921855bfbae434869fb93accf9
CRs-Fixed: 2953883
2021-05-28 18:30:37 -07:00
Yu Ouyang
1a3b66cbdd qcacld-3.0: Add new ini to config suspend mode
Sometimes we need PDEV suspend mode, WMI_PDEV_SUSPEND_CMDID and
WMI_PDEV_RESUME_CMDID. But currently design, only support WoW
suspend or not support two choices. And, there are two confused
ini configuration, gDisableWow and gEnableWoW.

1. Add new ini gSuspendMode to set suspend mode. Default 2.
	0, does not support suspend
	1, legency pdev suspend mode
	2, WoW suspend mode
2. Clean gDisableWow. It is replaced by gSuspendMode=0.
   HDD suspend/resume function get the value by new API
   ucfg_pmo_get_suspend_mode().

Change-Id: Icbeef3df6879ca2054f64e0292e9b9469c4936d4
CRs-fixed: 2940788
2021-05-13 12:32:44 -07:00
Karthik Kantamneni
e7f4cae651 qcacld-3.0: Set ep vote access states during suspend and resume
Set ep vote states during wlan suspend and resume opeartions

Change-Id: I5da5fb69ca99ac1d9ecd82cc61cc106eeba8eb47
CRs-Fixed: 2939902
2021-05-11 05:54:20 -07:00
Yu Tian
99ded622dc qcacld-3.0: Set HIF PM link state on in RTPM suspend failure flow
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
2021-05-06 10:44:05 -07:00
Manikanta Pubbisetty
d60dfebd0b qcacld-3.0: enabled EXT GRP IRQs after power save exit
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
2021-04-20 09:40:52 -07:00
Abdul Muqtadeer Ahmed
de4bda2169 qcacld-3.0: Remove the NULL check for a pointer which will never be NULL
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
2021-04-20 01:32:06 -07:00
Alan Chen
753f93e6e0 qcacld-3.0: Change PMO_ACTION_BLKACK to PMO_MAC_ACTION_BLKACK
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
2021-04-15 00:12:10 -07:00
sheenam monga
6e6c139e05 qcacld-3.0: Add support to offload igmp feature to fw
offload igmp feature to fw in case of suspended state
to avoid high power consumption.

Change-Id: I05fbf23dc2836f8f5dc6e2f45b35bf2d30c39790
CRs-Fixed: 2907644
2021-04-05 15:22:23 -07:00
sheenam monga
70f283c5d8 qcacld-3.0: Add ini to enable disable igmp offload
enable/disable the IGMP offload feature to FW.

Change-Id: I57241b193598124cba147e86c2d5199c1d5c53ee
CRs-Fixed: 2904964
2021-04-05 15:22:14 -07:00
Karthik Kantamneni
54860cdcc8 qcacld-3.0: In resume sequence mark runtime resume as success properly
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
2021-04-05 08:50:39 -07:00
sheenam monga
f8314f95bc qcacld-3.0: Add ini to support different versions of IGMP
Add bit mask ini support to decide IGMP version

Change-Id: I2676f9adb83c421c28a1d19efb8fe13a64f34de9
CRs-Fixed: 2907553
2021-03-31 17:11:55 -07:00
Yeshwanth Sriram Guntuka
43a40f83b0 qcacld-3.0: Set system suspend/resume state in hif ctx
Set system state in hif ctx to suspend or resume on
system suspend and resume respectively.

Change-Id: If1904a4fe5c861deed1b35071be10cb8cc8d6407
CRs-Fixed: 2899520
2021-03-31 01:03:47 -07:00
Aditya Kodukula
7beff561cc qcacld-3.0: Remove INI parameter gDataInactivityTimeout
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
2021-03-28 23:36:47 -07:00
Jingxiang Ge
333dc4602d qcacld-3.0: Add detection for tasklet delay
This is to enable feature for detection CE tasklet
scheduling delay and credit response delay issue.

Change-Id: I659aa23eabaa28bfb11051bf15e0343c94061b86
CRs-Fixed: 2874867
2021-03-16 00:45:13 -07:00
Manikanta Pubbisetty
46dc98965e qcacld-3.0: disable EXT grp irqs and drain TXRX during suspend
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
2021-03-14 08:42:48 +05:30
Alan Chen
eafa002519 qcacld-3.0: Add bitmap for BLOCKACK and ADDBA_REQ
Add bitmap for BLOCKACK and ADDBA_REQ.

Change-Id: I5a6bd762bc55bc82934cf260014f55c464340c4f
CRs-Fixed: 2898545
2021-03-13 00:49:53 -08:00
Abdul Muqtadeer Ahmed
e751855624 qcacld-3.0: Add a new feature to support forced dtim
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
2021-03-11 11:58:42 -08:00
Jingxiang Ge
f375f66fe5 qcacld-3.0: Always kick htc queue if suspend failure
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
2021-03-10 07:23:12 -08:00
Dundi Raviteja
e420cbf610 qcacld-3.0: Reduce stack frame size in pmo_core_cache_ns_in_vdev_priv
Reduce stack frame size of pmo_core_cache_ns_in_vdev_priv()
by allocating dynamic memory to struct pmo_ns_offload_params.

Change-Id: I23a2bbcbc2b64c40513511479b1c8aeb9e7898d6
CRs-Fixed: 2868424
2021-02-06 22:18:41 -08:00
Pragaspathi Thilagaraj
b870f29782 qcacld-3.0: Allow TWT events to wake up wlan host
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
2021-02-05 12:05:49 -08:00
Rajeev Kumar
2906b33aa3 qcacld-3.0: Add FW capability check for sap and go d3 wow
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
2021-02-05 00:30:48 -08:00
Dundi Raviteja
21b49b36be qcacld-3.0: Reduce stack frame size while registering action frame
Reduce stack frame size of pmo_register_action_frame_patterns()
by allocating dynamic memory to struct pmo_action_wakeup_set_params.

Change-Id: I4beed12c18c4e213c76e35c7762e59fc7d2ab957
CRs-Fixed: 2865021
2021-02-01 07:52:31 -08:00
Dundi Raviteja
070737954f qcacld-3.0: Reduce stack frame size in pmo_clear_action_frame_patterns
Reduce stack frame size of pmo_clear_action_frame_patterns()
by allocating dynamic memory to struct pmo_action_wakeup_set_params.

Change-Id: If430813658aabe5459bb0c3b16f9477b1fca9ed9
CRs-Fixed: 2865035
2021-02-01 07:52:27 -08:00
Alan Chen
b52dadc0b5 qcacld-3.0: Split SAP and GO modes ini
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
2021-01-28 04:17:57 -08:00
Alan Chen
a9a470290f qcacld-3.0: Add PMO config for PCIe bus suspend in beaconing mode
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
2021-01-23 21:39:11 -08:00
Jianmin Zhu
0f3778b424 qcacld-3.0: No Tx until WoW wake up event received
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
2021-01-20 15:41:28 -08:00
Alan Chen
65119e6610 qcacld-3.0: Add case handling for unit test WoW suspend
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
2021-01-19 21:15:54 -08:00
Jianmin Zhu
3a81879ef1 qcacld-3.0: Fix long ping delay after enable RTPM
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
2021-01-14 13:27:32 -08:00
Vevek Venkatesan
7d8963e3f1 qcacld-3.0: sync rtpm suspend resume only for CE wake irq type
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
2021-01-09 09:43:41 -08:00
Arun Kumar Khandavalli
9363ae40ff qcacld-3.0: Release the vdev reference in pmo
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
2021-01-07 19:11:17 -08:00
Vevek Venkatesan
6cc1576cf0 qcacld-3.0: add sync between suspend and wow resume in runtime pm
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
2021-01-04 05:08:36 -08:00
Sachin Ahuja
592a88ad7b qcacld-3.0: Return failure for runtime resume if FW is down
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
2020-12-22 14:41:21 -08:00
Bapiraju Alla
19f4eb9bb6 qcacld-3.0: Request stats over qmi only when target suspend is success
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
2020-12-17 13:39:50 -08:00
Ashish Kumar Dhanotiya
eb23480b4e qcacld-3.0: Update max value of gEnableModulatedDTIM ini
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
2020-12-02 12:49:06 -08:00
Li Feng
292b491dd8 qcacld-3.0: Add gpio irq as wakeup source
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
2020-11-19 18:23:13 -08:00
Ananya Gupta
b205491920 qcacld-3.0: Retry sending packets in htc queue
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
2020-11-10 13:02:40 -08:00
Kai Liu
52aec7a272 qcacld-3.0: Enhance hang info feature
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
2020-10-30 13:03:23 -07:00
Abdul Muqtadeer Ahmed
8e37d3f6eb qcacld-3.0: Use objmgr api to get the vdev for pmo
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
2020-10-29 02:45:46 -07:00