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
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
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
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
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
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
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
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
-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
This reverts commit I293647175c151da0fd6628345f98ea65c83b1bb3.
New solution idle shutdown in suspend prepare is better.
Change-Id: I69a0e7401c811e4a9656fcc8e3dd069f4317cc35
CRs-Fixed: 3213236
This reverts commit I08818517d05e7866d50e3f92cfdc9fa1a4d0e63f.
New solution idle shutdown in suspend prepare is better.
Change-Id: I76b1ef8e6f945bbcba3955ff625484ebee727670
CRs-Fixed: 3213236
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
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
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
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
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
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
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
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
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
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
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
INI item enable_dynamic_pcie_gen_speed_switch is no longer. Hence,
delete all uses cases of it.
Change-Id: I1082620c4354bda48ebc54aae7e72e5a81c4aa94
CRs-Fixed: 3068122
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
Add support to offload icmp feature to fw in case of
suspended state to avoid high power consumption.
Change-Id: I3ff19d71eac530c75be57e6b52b975e755ff2a53
CRs-Fixed: 3042452
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
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
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
Add new ini item gEnableIcmpOffload to enable/disable
ICMP offload to firmware.
Change-Id: I107aeec4c75ae18fbe37d373e48339a5b76797aa
CRs-Fixed: 3025650
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
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
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
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
Add new ini item enable_dynamic_pcie_gen_speed_switch for enabling
dynamic PCIe gen speed change.
Change-Id: I7dde4e40e56bf894c7edd0805d09425444648e6b
CRs-Fixed: 2977079
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
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
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
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
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
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
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