Commit Graph

284 Commits

Author SHA1 Message Date
Aditya Kodukula
87db27184b qcacld-3.0: Avoid ARP and NS offloads for MLO partner links
In case of MLO connection, whenever firmware receives
enable or disable ARP/NS offload request from host on any vdev,
firmware enables/disables ARP/NS offload for all MLO vdevs.

So, during system resume though host sends disable ARP offload
only for MLO partner link vdev, firmware disables ARP offload
for all MLO vdevs. But during system suspend, as host is unaware
of ARP offload disabled on all vdevs, it will not send enable ARP
offload request to firmware. Because of this, all ARP requests are
forwarded to host instead of firmware in suspend mode.

To address this issue, add logic in host to avoid ARP/NS offload
requests for MLO partner link vdevs.

Change-Id: I1ffe503911705a41be26e44d1db6d15a5988e34d
CRs-Fixed: 3295050
2022-09-28 13:25:00 -07:00
Yu Ouyang
85f34a3bb9 qcacld-3.0: Shutdown WLAN in system suspend prepare
This re-introduces the orignal patch which shutdowns WLAN in system
suspend prepare.

Orignal patch Id1f5172a7fc1792c83c8c1c20127de815f7e4980 is reverted by
Ic82db9dc0ca9d6686df99926335af27abc61cdb5 for deadlock issue.

However, deadlock between cnss_pm_notify and unregister_pm_notifier is
not caused by Id1f5172a7fc1792c83c8c1c20127de815f7e4980. So restore it
and add flag to enable/disable feature shutdown wlan in system suspend.

Deadlock issue is caused by "up_write(&cnss_pm_sem) is invoked before
down_write(&cnss_pm_sem) in function cnss_pm_notify". The issue can be
fixed by changes I533c373b85f554fbcceb562d9f56c6b88e5155bb and
I7768fdbeb1fa8cd6ef3b260eb0aafb231aeed324.

Change-Id: I25e4398a8d3b1a52cf7bc554af74d123ec797c6e
CRs-Fixed: 3287742
2022-09-27 11:57:08 -07:00
Jeff Johnson
20929e67b8 qcacld-3.0: Fix misspelling "patern"
Fix misspelling: patern ==> pattern

Change-Id: I4e850c7908f267cfc37fafe42ac3eda51937ebdf
CRs-Fixed: 3275698
2022-09-07 06:12:46 -07:00
Vinod Kumar Pirla
1e3a6f347e qcacld-3.0: Use MLD address for ML VDEV as WOW pattern
In certain concurrencies the total WOW patterns sent
to FW is exceeding the FW limit of five patterns which
can lead to ping failure as FW may drop the packet.

For STA mode ML adapter, send only the MLD MAC address
on which the data packet will be received.

Do not send ARP pattern in SAP/P2P-GO mode which is
sent with length zero.

On successful pattern delete request sent to FW,
decrement the default pattern count.

Change-Id: Ib45cf797a4bc3c6fbc23a2a95e877d7d8af34629
CRs-Fixed: 3257348
2022-08-27 15:15:27 -07:00
Aditya Kodukula
2b0915517c Revert "qcacld-3.0: Idle shutdown in suspend prepare"
This reverts Change-Id: Id1f5172a7fc1792c83c8c1c20127de815f7e4980
to avoid deadlock between cnss_pm_notify and unregister_pm_notifier
during soft driver unload.

Change-Id: Ic82db9dc0ca9d6686df99926335af27abc61cdb5
CRs-Fixed: 3266366
2022-08-13 02:59:12 -07:00
Azmath Mohammed
842dc538f3 qcacld-3.0: Display control pipes info on WOW ack failure
Display control pipes info on WOW ack failure which helps to
debug issues when full debug history is not available.

Change-Id: I6a84aa01c07831b7109d0741337cae6ac0be2f44
CRs-Fixed: 3246284
2022-07-22 02:43:38 -07:00
Vinod Kumar Pirla
6fad793761 qcacld-3.0: Check dynamic NS offload based on trigger
Currently a userspace request to enable NS offload dynamically
gets rejected if the offloads are in disabled state.

After this change, when a request to enable or disable of NS offloads
is received in the host and if the trigger type is to dynamically update
the NS offloads, then update the dynamic offload configuations and inform
the FW.

Change-Id: Ifb4a1d37b5f2e6c89d043b00f9cc0aaf426d870e
CRs-Fixed: 3237980
2022-07-19 01:35:44 -07:00
Ananya Gupta
346a64fc9c qcacld-3.0: Register PM QOS and bus suspend module
With restructuring in hif runtime pm module, modules are
required to register with the hif runtime pm module. Also,
link states are depreciated.
This change registers PM QOS and bus suspend modules which
use runtime PM module and replace link state with resuming
link up state in PMO resume.

Change-Id: I0df48e3d31a1fb0f03faaa0617b48937c9bc224b
CRs-Fixed: 3169425
2022-06-18 23:11:04 -07:00
Yu Ouyang
a2a82c280d qcacld-3.0: Idle shutdown in suspend prepare
To support shutdown WLAN when system goes into suspend, add idle shutdown
when got PM_SUSPEND_PREPARE/PM_HIBERNATION_PREPARE.

Before suspend/shutdown, user space should stop adapter. And after resume,
user space should restart adapter. This can ensure user and kernel space
to sync adapter's state.

Change-Id: Id1f5172a7fc1792c83c8c1c20127de815f7e4980
CRs-Fixed: 3208931
2022-06-17 03:43:03 -07:00
David Oladunjoye
5f4f7cf521 qcacld-3.0: pmo: Replace fallthrough comment withattribute
-Wimplicit-fallthrough is being enabled by default. Some compilers
such as clang require the attribute instead of just a fallthrough comment.

Change-Id: If55d68cb76589b39b88d859ea4d9fa6e10246c7e
CRs-Fixed: 3217399
2022-06-16 18:49:36 -07:00
Yu Ouyang
6b2b1cfb27 Revert "qcacld-3.0: Add the Full Power Down feature support"
This reverts commit I293647175c151da0fd6628345f98ea65c83b1bb3.

New solution idle shutdown in suspend prepare is better.

Change-Id: I69a0e7401c811e4a9656fcc8e3dd069f4317cc35
CRs-Fixed: 3213236
2022-06-09 19:37:09 -07:00
Yu Ouyang
3fbdeb8f84 Revert "qcacld-3.0: Idle shutdown in suspend"
This reverts commit I08818517d05e7866d50e3f92cfdc9fa1a4d0e63f.

New solution idle shutdown in suspend prepare is better.

Change-Id: I76b1ef8e6f945bbcba3955ff625484ebee727670
CRs-Fixed: 3213236
2022-06-09 19:37:03 -07:00
Rajeev Kumar
c5190e4605 qcacld-3.0: Enable SAP/GO D3 WoW feature by default
Enable SAP and GO D3 WoW feature by default since these features
are controlled by FW WMI service capability as well and hence for
older FW which does not support SAP/Go D3 WoW there is no impact.

Change-Id: I13597c2ee790270b295101252c4548d7c1c93f29
CRs-Fixed: 3199070
2022-05-18 01:40:27 -07:00
Aravind Kishore Sukla
8282e8af3c qcacld-3.0: Replace kmsg logs to debug logs
Change kernel log level to debug level

Change-Id: I1efa9a0498acd81f2a9a12d5712299609eb5bd06
CRs-Fixed: 3182121
2022-05-06 09:49:38 -07:00
Jianmin Zhu
255d161802 qcacld-3.0: Revert "Reconfig ITO when enter WoW for runtime pm"
Avoid sending any new WMI command during RTPM WoW sequence.

Change-Id: I4313257cbf8f83e79a74970cdff5a91d9c1eebb0
CRs-Fixed: 3157005
2022-03-24 18:16:11 -07:00
Jianmin Zhu
89d99afd4c qcacld-3.0: Revert "Fix assert for wmi cmd for invalid vdev"
Avoid sending any new WMI command during RTPM WoW sequence.

Change-Id: I78554358c2f225a9ead0dd347174b1a3189300f3
CRs-Fixed: 3157005
2022-03-24 18:16:05 -07:00
Ashish
f853df3d5b Revert "qcacld-3.0: Fix arp offload not sent when suspend"
This reverts commit I06ea617df49287ee87e7b5bf8b20971b581dedf1

which introduced a fix to enable/disable arp offload on every
suspend/resume even if gActiveModeOffload is enabled, which is
not correct. The expectation here is that if gActiveModeOffload
is enabled, host should enable arp offload only onece and it
should not disable on any condition.

Change-Id: Ifc4ff1c0a39cc4c17e9a292ef8b0ebabd766a710
CRs-Fixed: 3147896
2022-03-23 11:06:21 -07:00
Arun Kumar Khandavalli
2fa9d87942 qcacld-3.0: Configure the mld address wow pattern during vdev create
Currently mac address is getting configured as the wow pattern
while the vdev is getting created, configure the mld address also
during the vdev creation so during legacy connection or roaming
between the ml-legacy vice versa there wont be packet drops because
of pattern mismatch.

Change-Id: I9b98649bca132a6665f2e4dd94d9c6b840223827
CRs-Fixed: 3124115
2022-03-22 10:43:52 -07:00
Jianmin Zhu
24bfb9a343 qcacld-3.0: Fix assert for wmi cmd for invalid vdev
During vdev creating, RTPM suspend/resume may happen, after vdev
created in host, if ITO config wmi cmd is sent to firmware
before vdev create wmi cmd, firmware will assert for invalid
vdev.

To fix it, only config ITO when vdev is up.

Change-Id: I3d744d7fffd9afc7780d3a19c92613a94556cfa0
CRs-Fixed: 3152034
2022-03-16 22:01:28 -07:00
Pragaspathi Thilagaraj
c5e40fc31a qcacld-3.0: Make PASN events as wakeable
PASN peer create request event and deauth events need
host actions and notifying the userspace.

So register for PASN events to wake up host.

Change-Id: Ic83f10984d4e4d5ee0f1e8a5d7c4fbc321395a26
CRs-Fixed: 3150120
2022-03-15 20:43:47 -07:00
Jianmin Zhu
d813137bb6 qcacld-3.0: Reconfig ITO when enter WoW for runtime pm
Some rogue AP sends beacon frames with TIM bit set for long time,
DUT STA need response a qos null frame, if ITO(inactive timeout) is 200ms,
STA can't get a chance go to sleep for long time during WoW, assert will
happen at last.
To fix it, for both system suspend and runtime suspend/resume, config
ITO to short value(50ms) when trigger FW to enter WoW mode, and config
ITO to default value(200ms) after exiting WoW mode.

Change-Id: I8f84afaf2ba030bbb9acf5c7ea78de583c634424
CRs-Fixed: 3146685
2022-03-09 08:04:08 -08:00
Yu Ouyang
675b9de61a qcacld-3.0: Idle shutdown in suspend
To support shutdown WLAN when system goes into suspend, add idle shutdown
in cfg80211 suspend function.

Before suspend/shutdown, user space should stop adapter. And after resume,
user space should restart adapter. This can ensure user and kernel space
to sync adapter state.

Idle shutdown must be processed in system active, so schedule delayed
work to execute it. After calling schedule, retrun EAGAIN directly to PM.

Change-Id: I08818517d05e7866d50e3f92cfdc9fa1a4d0e63f
CRs-Fixed: 3081480
2022-01-26 20:47:11 -08:00
Jianmin Zhu
d79afa8020 qcacld-3.0: Fix arp offload not sent when suspend
When host resume, check arp offload status wrongly, so arp offload
disable cmd isn't sent to F/W. when next suspend comes, arp offload
enable cmd isn't sent too.

Change-Id: I06ea617df49287ee87e7b5bf8b20971b581dedf1
CRs-Fixed: 3106172
2022-01-13 19:13:12 -08:00
Aditya Kodukula
cefd0f71e9 qcacld-3.0: Remove ADDBA_REQ to avoid overwriting spec_mgmt
As per the current implementation, the ADDBA_REQ bitmap setting
overwrites DROP_SPEC_MGMT_ACTION_FRAME_BITMAP. Hence, to avoid it,
remove the ADDBA_REQ bitmap setting.

Change-Id: I1135a64de99248b67e477d3276b217c128c1a721
CRs-Fixed: 3081291
2021-11-25 20:04:50 -08:00
Ke Huang
b43015863f qcacld-3.0: Add the Full Power Down feature support
Add the support for the feature of Full Power Down while
in low power mode.
For this feature, it need to power down wlan chip when
suspend, and power up wlan chip when resume, so need to
change to call wlan driver shutdown and then power off the
wlan chip instead of calling wlan driver suspend when do
suspend, and changing to do power on wlan chip, download
wlan firmware, and calling wlan driver reinit instead of
calling wlan driver resume when do resume.

Change-Id: I293647175c151da0fd6628345f98ea65c83b1bb3
CRs-Fixed: 3061366
2021-11-11 03:12:28 -08:00
Will Huang
eb218a1c61 qcacld-3.0: Add vendor attribute to configure ARP/NS offload
In some scenario, it is required to receive every ARP/NS packet even
it is not to solicit address itself. So add this vendor attribute
configuration to enable/disable ARP/NS offload on fly.

On some platform, if target suspend to WoW mode, APF filter will drop
such ARP/NS packet in the front, so prevent runtime suspend happen
if disable ARP/NS offload. System suspend still allow in consideration
of potential power impact.

It only support on STA/P2P-Client mode device, and this configure is
optional, while default behavior is ARP/NS offload enable. It will
restore to default behavior if interface being closed.

Change-Id: Icd49e230024bc1ce51519cd9fafee9bc9f79f382
CRs-Fixed: 3058494
2021-11-10 23:02:37 -08:00
Alan Chen
d60caf55b0 qcacld-3.0: Delete use cases of INI enable_dynamic_pcie_gen_speed_switch
INI item enable_dynamic_pcie_gen_speed_switch is no longer. Hence,
delete all uses cases of it.

Change-Id: I1082620c4354bda48ebc54aae7e72e5a81c4aa94
CRs-Fixed: 3068122
2021-11-03 21:11:10 -07:00
Li Feng
1331092b43 qcacld-3.0: Configure magic pattern in line with ini setting
The ini gEnableWoW was designed to enable or disable both magic
pattern match and pattern byte match, but now host ignore the
magic pattern setting from the ini, always enable the magic
pattern instead.

configure magic pattern in line with ini gEnableWoW setting.

Change-Id: I309aff03de9bdbd36fe391784ba54cbfa0cad67b
CRs-Fixed: 3047199
2021-10-18 09:43:05 -07:00
Aditya Kodukula
25130a97ab qcacld-3.0: Correct the kernel doc of ICMP APIs
Correct the Kernel documentation of ICMP feature APIs.

Change-Id: Iec2fe332c24e11835ebd6546dda40603f6f0173d
CRs-Fixed: 3055077
2021-10-13 17:42:25 -07:00
Aditya Kodukula
37026bc3ff qcacld-3.0: Add Support to offload icmp feature to fw
Add support to offload icmp feature to fw in case of
suspended state to avoid high power consumption.

Change-Id: I3ff19d71eac530c75be57e6b52b975e755ff2a53
CRs-Fixed: 3042452
2021-10-12 00:08:44 -07:00
Alan Chen
0c0edb5670 qcacld-3.0: Always enable WoW for RTPM suspend
gSuspendMode is for system suspend to choose between WoW and pdev
suspend. For RTPM suspend, should always enable WoW.

Change-Id: Ibf95ca79ded73f9c68e14b8dac4ec68d979f9db6
CRs-Fixed: 3047812
2021-09-30 01:00:01 -07:00
abhinav kumar
0fae493005 qcacld-3.0: Register DSCP action frame for wake up
Currently, the bitmap of action frames that can wake up the
host during suspend is sent via the wmi command
WMI_WOW_SET_ACTION_WAKE_UP_CMDID. This bitmap doesn't include
DSCP action frames so currently the host doesn't wake up for
DSCP action frames when in suspend mode.

Enable wake up for DSCP action frame for runtime PM as well
as for wow mode.

Change-Id: I51ba3e8ef52755af25ed922161028dfbaccaa250
CRs-Fixed: 3046595
2021-09-29 17:20:15 -07:00
Rajeev Kumar
dc2d3d1d6b qcacld-3.0: Correct default value comment for INI igmp_version_support
By default INI item igmp_version_support has value 0x7. Fix the comment
to match with the correct default value.

Change-Id: Iab0caf41b3f3a57873b8cae1188d475adcfe9cc5
CRs-Fixed: 3042427
2021-09-23 19:19:23 -07:00
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