Commit Graph

138 Commits

Author SHA1 Message Date
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
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
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
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
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
Srinivas Girigowda
d36054fbd2 qcacld-3.0: components: Remove logs for qdf_mem_malloc() checks
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
2020-09-25 12:59:42 -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
Srinivas Dasari
4670f330c1 qcacld-3.0: Replace WLAN_FEATURE_NAN_DATAPATH with WLAN_FEATURE_NAN
WLAN_FEATURE_NAN_DATAPATH is deprecated and the define is also
removed. But there is still some code(NDP wakelock event
configuration) which is guarded in this flag and it never gets
compiled. So replace WLAN_FEATURE_NAN_DATAPATH with overall
NAN feature define WLAN_FEATURE_NAN and move it to a separate
API.
Also, enhance log to print the complete 16-byte bitmap in hex
format.

Change-Id: I1ad51efc2b6a088022601686744802995fb7b4b7
CRs-Fixed: 2679286
2020-05-15 21:45:29 -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
Abhishek Singh
d043d18792 qcacld-3.0: Optimize PMO logs
Optimize PMO logs.

Change-Id: I99122adece0991711961344cfe69e2869386fef1
CRs-Fixed: 2633552
2020-03-05 22:07:42 -08:00
Abhishek Singh
a7d74b38d6 qcacld-3.0: Remove unnecessary enter exit from PMO functions
Remove unnecessary enter exit from PMO functions.

Change-Id: I5b15d5d943f91fad68dfdf98a0f343e6c1379364
CRs-Fixed: 2628634
2020-02-26 16:33:23 -08:00
Jingxiang Ge
ad6337f2b0 qcacld-3.0: Fix spin_lock deadlock issue for resume/wakeup
If resume and fw wakeup happens at the same time.
psoc_ctx->lock maybe doing bottom half operation for resume,
then wakeup interrupt comes on same cpu, the interrupt
handler will also acquire psoc_ctx->lock in
pmo_core_update_wow_initial_wake_up, which cause dead lock.

Using atomic for wow_initial_wake_up, so the interrupt handler
can avoid using spin_lock.

Change-Id: Id0e963a0924415e9660c57a1c1b776d3e609213d
CRs-Fixed: 2624899
2020-02-20 04:51:04 -08:00
Jianmin Zhu
5b0746560d qcacld-3.0: suspend scan before scheduler thread suspended
Scan cmd still can be exist after scheduler thread is suspended
when host suspend, the scan cmd can't be removed from
serialization list by either complete or cancel any more since
both depends on scheduler thread, suspend thread blocked 30s to
wait scan cmd cleared.

Roam sync event from F/W can't be handled and Roam sync complete
can't be sent to F/W since scheduler thread suspended, then F/W
assert for roam sync cmd timeout.

After receive F/W down event, host will try SSR, but blocked by
unfinished suspend thread too.

Fix: suspend all components including scan before suspend
scheduler thread, make sure scan cmd is cleared and no new scan
is allowed any more before scheduler thread suspended.

Change-Id: I7a3badeedea018e4d92bbe8660692e42923852aa
CRs-Fixed: 2620650
2020-02-15 01:58:26 -08:00
Abhishek Singh
a7efaea28f qcacld-3.0: Optimize PMO prints
Optimize PMO prints.

Change-Id: I0595e5b51edfe3ad0a0abb239cb53e67938d2efa
CRs-Fixed: 2621351
2020-02-14 12:09:29 -08:00
Vevek Venkatesan
0ac759fc1c qcacld-3.0: cdp: Converge cdp_cmn_ops
Currently cdp ops are given pdev/vdev/peer
handle as its arguments which is directly
accessed in those APIs. This can cause a
race-condition in access of the respective
handles if it has been deleted in parallel.

Hence as a part of cdp convergence, pass only
the pdev_id or vdev_id or peer mac address,
which will be used to get the respective handles,
and hence avoiding the unwanted access of the
handles if it has been deleted.

- txrx_data_tx_cb_set
- txrx_mgmt_tx_cb_set
- txrx_mgmt_send_ext
- txrx_pdev_attach_target
- txrx_pdev_detach
- txrx_vdev_attach
- txrx_vdev_register
- txrx_vdev_detach
- txrx_peer_create
- txrx_peer_delete
- txrx_peer_delete_sync
- txrx_fw_stats_get
- txrx_get_vdev_from_vdev_id
- txrx_pdev_set_ctrl_pdev
- txrx_pdev_attach
- txrx_get_vdev_mac_addr
- txrx_pdev_post_attach
- txrx_pdev_pre_detach
- txrx_get_ctrl_pdev_from_vdev
- txrx_get_mon_vdev_from_pdev

Change-Id: Ib8b0b1edd63e7c3f8813b11ca26b50ec121fe255
CRs-Fixed: 2541459
2019-12-27 03:24:09 -08:00
Sourav Mohapatra
60c3b2b014 qcacld-3.0: Add checks to NS and ARP offload requests
Currently the offloading of the NS and ARP to firmware is inefficient;
redundant caching is performed even if offload is not sent. This causes
wastage of resources and increases code complexity.

Introduce checks before caching and offload to ensure that the mentioned
inefficiencies are taken care of.

Change-Id: I6013810e1e08adb15c801f4fc21e1b50371bacda
CRs-Fixed: 2569763
2019-11-22 05:35:35 -08:00