Commit Graph

129 Commits

Author SHA1 Message Date
Ashish Kumar Dhanotiya
062cb174f2 qcacld-3.0: Add INIs to trigger SSR for wakeup on pagefault
According to new requirement, add INIs
max_pagefault_wakeups_for_ssr,
interval_for_pagefault_wakeup_counts and
ssr_frequency_on_pagefault to trigger SSR if host wakes up
because of pagefault.

For ex: If max_pagefault_wakeups_for_ssr = 30,
interval_for_pagefault_wakeup_counts = 180000 (3 mins) and
ssr_frequency_on_pagefault = 3600000 (1hr), in this case host
will trigger the SSR if it receives 30 wakeups because of
pagefaults in 3 mins, host will trigger SSR only once in 1 hr.
Once the SSR is triggered, host will not trigger next SSR for
next 1 hr even if it receives 30 wakeups from fw because of pagefaults.
This 1 hr time is getting monitored from last SSR.

Change-Id: Ic122a7d8e8749870bfa5d28e74f6e9ee19493d04
CRs-Fixed: 3378492
2023-01-14 18:15:50 -08:00
Jeff Johnson
bf0930cb1a qcacld-3.0: Fix PMO Documentation
The kernel-doc script identified a multitude of documentation issues
in components/pmo, so fix them.

Note that there is currently one false positive error being flagged in
the documentation for typedef pmo_get_vdev_dp_handle.

Change-Id: Iddaccbf1b55557a82af34d2b6b4913d37c71123a
CRs-Fixed: 3359766
2023-01-10 11:30:38 -08:00
Divyajyothi Goparaju
017f34dd8d qcacld-3.0: configure valid range of value for aliasing INI
There are two different names with different range of
value for aliasing INI's.
So, it should pick the valid range of value wrt INI
name.

Change-Id: I58d4797a0fa598a1e44349c8954dac3378f1a751
CRs-Fixed: 3352412
2022-12-14 02:02:52 -08:00
Asutosh Mohapatra
7b4c3a6fb3 qcacld-3.0: Set PM delay to 1200 ms for WOW_REASON_LOCAL_DATA_UC_DROP
Currently general PM delay is 500 ms. If fw sends wow wakeup with reason
code WOW_REASON_LOCAL_DATA_UC_DROP host wakes up, 500 ms after the
transactions again runtime suspend takes effect. Every time FW sends wow
wake there will be a small delay induced. It is noticed that large
frames are getting dropped for continuous wow wakeup events.

To address this issue increase PM delay to 1200 ms if fw sends
wow wake for reason WOW_REASON_LOCAL_DATA_UC_DROP and again
revert it back to 500 ms on next WoW enter.

Change-Id: I57bafc5ae8a633f1f685201ceb5936b59c985148
CRs-Fixed: 3330844
2022-11-16 15:36:38 -08:00
Jeff Johnson
6c88cf1b32 qcacld-3.0: components: pmo: Fix misspellings
Fix misspellings in components/pmo/...

Change-Id: I2394b572f07bc02d029a4f4381c76f11143ea475
CRs-Fixed: 3303636
2022-10-08 13:55:32 -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
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
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
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
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
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
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
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
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
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
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 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
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
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
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
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
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
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
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
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
Alan Chen
8cc132d398 qcacld-3.0: Add a new ini item for modulated DTIM on system suspend
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
2020-10-01 06:00:43 -07:00
Alan Chen
53d838dcb3 qcacld-3.0: Add check for OPM power save enabled
Qpower config should not be allowed if Qpower config/OPM power save config
is disabled in ini file.

Change-Id: Iff21159f30731f7188506ab5e5e3133d02203b6b
CRs-Fixed: 2778632
2020-09-17 10:18:06 -07:00
Rajeev Kumar
e050826d17 qcacld-3.0: Reduce wow suspend/resume timeout to 4 seconds
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
2020-07-20 04:46:45 -07:00
Li Feng
0e6dc924e5 qcacld-3.0: Add ini entry for wow pulse configuration
qcacld-2.0 to qcacld-3.0 propagation

Add ini entry to configure wow pulse repetition count
and wow pulse init level.

Change-Id: Ic23d2ae80f6f0adef9f35bfef5a59eb0220c70ae
CRs-Fixed: 2722997
2020-07-08 06:51:42 -07:00
Alan Chen
9e714990e7 qcacld-3.0: Rename gAdvancedPowerSaveMode to gOptimizedPowerManagement
Rename gAdvancedPowerSaveMode to gOptimizedPowerManagement.

Change-Id: Ie6260a030ab94c27c993987168d70b768184a91f
CRs-Fixed: 2693883
2020-05-23 21:09:18 -07:00
Bapiraju Alla
920ca1e805 qcacld-3.0: Remove unused wowlan INIs
Remove wowlan_deauth_enable and wowlan_disassoc_enable INI params as
these are unused

Change-Id: I90d10995365771359f1bcd029b9193437ad67a18
CRs-Fixed: 2678156
2020-05-22 04:36:31 -07:00
Alan Chen
06551ba572 qcacld-3.0: Rename gEnablePowerSaveOffload to gAdvancedPowerSaveMode
gEnablePowerSaveOffload is confusing, so change it to
gAdvancedPowerSaveMode.

Value 0: Disable advanced power save
Value 1: Enable advanced power save

Change-Id: Ib5593ef31eedacdc232ffbad183974e2cd847e83
CRs-Fixed: 2676664
2020-05-04 23:12:06 -07:00
sheenam monga
bf390c6c5c qcacld-3.0: Register RVS action frames for wake up
Currently the bitmap of action frames that can wake up the host
is sent via the wmi command WMI_WOW_SET_ACTION_WAKE_UP_CMDID.
This bitmap doesn't include RVS action frames so currently the
host doesn't wake up for rvs action frames.

Enable wake up for rvs action frames during runtime.

Change-Id: I9fac8e74cdb7b529f858f7f2027906ca2b3083b3
CRs-Fixed: 2649927
2020-03-30 04:25:36 -07:00