Ver código fonte

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
Rajeev Kumar 3 anos atrás
pai
commit
e59ae1bbe5

+ 19 - 1
components/ipa/dispatcher/inc/wlan_ipa_obj_mgmt_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, 2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2018, 2020-2021 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -24,6 +24,7 @@
 
 #include "wlan_ipa_public_struct.h"
 #include "wlan_objmgr_pdev_obj.h"
+#include "wlan_ipa_main.h"
 
 #ifdef IPA_OFFLOAD
 
@@ -57,6 +58,17 @@ QDF_STATUS ipa_register_is_ipa_ready(struct wlan_objmgr_pdev *pdev);
  */
 void ipa_disable_register_cb(void);
 
+/**
+ * wlan_ipa_config_is_enabled() - api to get IPA enable status
+ *
+ * Return: true - ipa is enabled
+ *         false - ipa is not enabled
+ */
+static inline bool wlan_ipa_config_is_enabled(void)
+{
+	return ipa_config_is_enabled();
+}
+
 #else
 
 static inline QDF_STATUS ipa_init(void)
@@ -78,6 +90,12 @@ static inline QDF_STATUS ipa_register_is_ipa_ready(
 static inline void ipa_disable_register_cb(void)
 {
 }
+
+static inline bool wlan_ipa_config_is_enabled(void)
+{
+	return false;
+}
+
 #endif /* IPA_OFFLOAD */
 
 #endif /* _WLAN_IPA_OBJ_MGMT_H_ */

+ 6 - 0
components/pmo/core/src/wlan_pmo_main.c

@@ -25,6 +25,7 @@
 #include "wlan_pmo_cfg.h"
 #include "cfg_ucfg_api.h"
 #include "wlan_fwol_ucfg_api.h"
+#include "wlan_ipa_obj_mgmt_api.h"
 
 static struct wlan_pmo_ctx *gp_pmo_ctx;
 
@@ -240,6 +241,11 @@ static void wlan_pmo_init_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_ENABLE_BUS_SUSPEND_IN_SAP_MODE);
 	psoc_cfg->is_bus_suspend_enabled_in_go_mode =
 		cfg_get(psoc, CFG_ENABLE_BUS_SUSPEND_IN_GO_MODE);
+	if (wlan_ipa_config_is_enabled()) {
+		pmo_info("ipa is enabled and hence disable sap/go d3 wow");
+		psoc_cfg->is_bus_suspend_enabled_in_sap_mode = 0;
+		psoc_cfg->is_bus_suspend_enabled_in_go_mode = 0;
+	}
 	psoc_cfg->is_dynamic_pcie_gen_speed_change_enabled =
 		cfg_get(psoc, CFG_ENABLE_DYNAMIC_PCIE_GEN_SPEED_SWITCH);
 	psoc_cfg->default_power_save_mode = psoc_cfg->power_save_mode;