Revert "qcacmn: WAR for opt_wifi_dp feature to disable IPA(1)"
This reverts Change-Id: I7aad275f4d86a2ffc239f1fe343de31ec2988fad. Change-Id: I875e8d15430c3f0a0f4bf10d275b203b24023a64 CRs-Fixed: 3483264
This commit is contained in:

committed by
Madan Koyyalamudi

parent
d8e1a8418c
commit
2613f207e0
@@ -15,6 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
#include <wlan_ipa_ucfg_api.h>
|
||||
#include <wlan_ipa_core.h>
|
||||
#include <qdf_ipa_wdi3.h>
|
||||
@@ -43,8 +45,6 @@
|
||||
#include <pld_common.h>
|
||||
#endif
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
/* Hard coded config parameters until dp_ops_cfg.cfg_attach implemented */
|
||||
#define CFG_IPA_UC_TX_BUF_SIZE_DEFAULT (2048)
|
||||
|
||||
|
@@ -20,11 +20,11 @@
|
||||
#ifndef _WLAN_IPA_CORE_H_
|
||||
#define _WLAN_IPA_CORE_H_
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
#include "wlan_ipa_priv.h"
|
||||
#include "wlan_ipa_public_struct.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
/**
|
||||
* wlan_ipa_is_enabled() - Is IPA enabled?
|
||||
* @ipa_cfg: IPA config
|
||||
|
@@ -24,15 +24,22 @@
|
||||
#ifndef _WLAN_IPA_MAIN_H_
|
||||
#define _WLAN_IPA_MAIN_H_
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
#include <wlan_objmgr_pdev_obj.h>
|
||||
#include <wlan_ipa_public_struct.h>
|
||||
#include <wlan_ipa_priv.h>
|
||||
#include "cfg_ucfg_api.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
/* Declare a variable for IPA instancess added based on pdev */
|
||||
extern uint8_t g_instances_added;
|
||||
#define IPA_INVALID_HDL 0xFF
|
||||
#define IPA_OFFLOAD_CFG 0x7D
|
||||
|
||||
#define INTRL_MODE_DISABLE 0xEEEEEEEE
|
||||
#define INTRL_MODE_ENABLE 0x27D
|
||||
|
||||
#define ipa_fatal(params...) \
|
||||
QDF_TRACE_FATAL(QDF_MODULE_ID_IPA, params)
|
||||
#define ipa_err(params...) \
|
||||
@@ -111,6 +118,14 @@ ipa_pdev_get_priv_obj(struct wlan_objmgr_pdev *pdev)
|
||||
return pdev_obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_ipa_config() - API to get IPAConfig INI
|
||||
* @psoc : psoc handle
|
||||
*
|
||||
* Return: IPA config value
|
||||
*/
|
||||
uint32_t get_ipa_config(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* ipa_priv_obj_get_pdev() - API to get pdev from IPA object
|
||||
* @ipa_obj: IPA object
|
||||
|
@@ -25,6 +25,8 @@
|
||||
#ifndef _WLAN_IPA_PRIV_STRUCT_H_
|
||||
#define _WLAN_IPA_PRIV_STRUCT_H_
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
@@ -46,7 +48,6 @@
|
||||
#include "cdp_txrx_ipa.h"
|
||||
#endif
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
#define WLAN_IPA_RX_INACTIVITY_MSEC_DELAY 1000
|
||||
#define WLAN_IPA_UC_WLAN_8023_HDR_SIZE 14
|
||||
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include <wmi_unified_param.h>
|
||||
#include <wlan_osif_priv.h>
|
||||
#include <net/cfg80211.h>
|
||||
#ifdef IPA_OFFLOAD
|
||||
#ifdef IPA_OPT_WIFI_DP
|
||||
#include "init_deinit_lmac.h"
|
||||
#endif
|
||||
@@ -5344,4 +5343,3 @@ void wlan_ipa_wdi_opt_dpath_notify_flt_add_rem_cb(int flt0_rslt, int flt1_rslt)
|
||||
qdf_event_set(&ipa_obj->ipa_flt_evnt);
|
||||
}
|
||||
#endif /* IPA_OPT_WIFI_DP */
|
||||
#endif /* IPA_OFFLOAD */
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include "cfg_ucfg_api.h"
|
||||
#include "wlan_ipa_obj_mgmt_api.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
static struct wlan_ipa_config *g_ipa_config;
|
||||
static bool g_ipa_hw_support;
|
||||
static bool g_ipa_pld_enable = true;
|
||||
@@ -824,6 +823,34 @@ void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
|
||||
return wlan_ipa_fw_rejuvenate_send_msg(ipa_obj);
|
||||
}
|
||||
|
||||
#ifdef IPA_OPT_WIFI_DP
|
||||
uint32_t get_ipa_config(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
uint32_t val = cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG);
|
||||
|
||||
if (val == INTRL_MODE_DISABLE) {
|
||||
val = 0;
|
||||
} else {
|
||||
if (val == IPA_OFFLOAD_CFG)
|
||||
ipa_err("Invalid IPA Config 0x%x", val);
|
||||
val = INTRL_MODE_ENABLE;
|
||||
}
|
||||
ipa_info("IPAConfig set as 0x%x", val);
|
||||
return val;
|
||||
}
|
||||
#else
|
||||
uint32_t get_ipa_config(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
uint32_t val = cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG);
|
||||
|
||||
if (val & WLAN_IPA_OPT_WIFI_DP) {
|
||||
val &= ~WLAN_IPA_OPT_WIFI_DP;
|
||||
ipa_info("Resetting IPAConfig val to 0x%x", val);
|
||||
}
|
||||
return val;
|
||||
}
|
||||
#endif
|
||||
|
||||
void ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
@@ -835,8 +862,7 @@ void ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
||||
}
|
||||
|
||||
if (g_ipa_pld_enable) {
|
||||
g_ipa_config->ipa_config = cfg_get(psoc,
|
||||
CFG_DP_IPA_OFFLOAD_CONFIG);
|
||||
g_ipa_config->ipa_config = get_ipa_config(psoc);
|
||||
ipa_info("IPA ini configuration: 0x%x",
|
||||
g_ipa_config->ipa_config);
|
||||
} else {
|
||||
@@ -921,4 +947,3 @@ bool ipa_is_wds_enabled(void)
|
||||
{
|
||||
return g_ipa_config ? g_ipa_config->ipa_wds : 0;
|
||||
}
|
||||
#endif /* IPA_OFFLOAD */
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include "host_diag_core_event.h"
|
||||
#include "wlan_reg_services_api.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
QDF_STATUS wlan_ipa_set_perf_level(struct wlan_ipa_priv *ipa_ctx,
|
||||
uint64_t tx_packets,
|
||||
uint64_t rx_packets)
|
||||
@@ -543,4 +542,3 @@ bool wlan_ipa_is_rm_released(struct wlan_ipa_priv *ipa_ctx)
|
||||
return true;
|
||||
}
|
||||
#endif /* CONFIG_IPA_WDI_UNIFIED_API */
|
||||
#endif
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include "cdp_txrx_ipa.h"
|
||||
#include "qdf_platform.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
/**
|
||||
* wlan_ipa_uc_rt_debug_host_fill - fill rt debug buffer
|
||||
* @ctext: pointer to ipa context.
|
||||
@@ -1033,4 +1032,3 @@ void wlan_ipa_wdi_meter_notifier_cb(qdf_ipa_wdi_meter_evt_type_t evt,
|
||||
qdf_op_unprotect(op_sync);
|
||||
}
|
||||
#endif /* FEATURE_METERING */
|
||||
#endif /* IPA_OFFLOAD */
|
||||
|
@@ -29,7 +29,6 @@
|
||||
#include "qdf_platform.h"
|
||||
#include "qdf_module.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
/* This is as per IPA capbility */
|
||||
#define MAX_INSTANCES_SUPPORTED 2
|
||||
|
||||
@@ -373,4 +372,3 @@ bool wlan_ipa_is_vlan_enabled(void)
|
||||
}
|
||||
|
||||
qdf_export_symbol(wlan_ipa_is_vlan_enabled);
|
||||
#endif
|
||||
|
@@ -27,7 +27,6 @@
|
||||
#include <wlan_objmgr_pdev_obj.h>
|
||||
#include <wlan_lmac_if_def.h>
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
QDF_STATUS tgt_ipa_uc_offload_enable_disable(struct wlan_objmgr_pdev *pdev,
|
||||
struct ipa_uc_offload_control_params *req)
|
||||
{
|
||||
@@ -80,4 +79,4 @@ tgt_ipa_intrabss_enable_disable(struct wlan_objmgr_pdev *pdev,
|
||||
IPA_EXIT();
|
||||
return status;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@@ -25,7 +25,6 @@
|
||||
#include "cfg_ucfg_api.h"
|
||||
#include "qdf_module.h"
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
void ucfg_ipa_set_pld_enable(bool flag)
|
||||
{
|
||||
ipa_set_pld_enable(flag);
|
||||
@@ -362,4 +361,3 @@ bool ucfg_ipa_is_wds_enabled(void)
|
||||
}
|
||||
|
||||
qdf_export_symbol(ucfg_ipa_is_wds_enabled);
|
||||
#endif
|
||||
|
@@ -30,7 +30,6 @@
|
||||
#include <target_if_ipa.h>
|
||||
#include <wlan_objmgr_psoc_obj.h>
|
||||
|
||||
#ifdef IPA_OFFLOAD
|
||||
/**
|
||||
* target_if_ipa_uc_offload_control_req() - send IPA offload control to FW
|
||||
* @psoc: pointer to PSOC object
|
||||
@@ -90,4 +89,3 @@ target_if_ipa_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
|
||||
#include "wlan_ipa_ucfg_api.h"
|
||||
#include "wlan_ipa_main.h"
|
||||
#if defined(CONFIG_HL_SUPPORT)
|
||||
#include "wlan_tgt_def_config_hl.h"
|
||||
#else
|
||||
@@ -3534,7 +3535,7 @@ wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
|
||||
{
|
||||
if (ucfg_ipa_get_pld_enable()) {
|
||||
wlan_cfg_ctx->ipa_enabled =
|
||||
(cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
|
||||
(get_ipa_config((struct wlan_objmgr_psoc *)psoc) &
|
||||
WLAN_CFG_IPA_ENABLE_MASK);
|
||||
dp_info("is IPA enabled from ini: %d",
|
||||
wlan_cfg_ctx->ipa_enabled);
|
||||
@@ -3566,7 +3567,7 @@ wlan_soc_ipa_cfg_attach(struct cdp_ctrl_objmgr_psoc *psoc,
|
||||
{
|
||||
if (ucfg_ipa_get_pld_enable()) {
|
||||
wlan_cfg_ctx->ipa_enabled =
|
||||
(cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG) &
|
||||
(get_ipa_config((struct wlan_objmgr_psoc *)psoc) &
|
||||
WLAN_CFG_IPA_ENABLE_MASK);
|
||||
dp_info("is IPA enabled from ini: %d",
|
||||
wlan_cfg_ctx->ipa_enabled);
|
||||
|
Reference in New Issue
Block a user