qcacmn: WAR for opt_wifi_dp feature to disable IPA(1)

IPA_OFFLOAD will be enabled by  default for MSM.
This is a WAR to disable IPA offload during compile
time, based on the IPA_WDI_OPT_DPATH feature flag from IPA.
If the flag is not defined in the IPA test
module file, IPA offload path will be disabled.
This is a WAR, and will be fixed once a Kernel config is
available to enable or disable the optional wifi datapath
feature.

Change-Id: I7aad275f4d86a2ffc239f1fe343de31ec2988fad
CRs-Fixed: 3431972
This commit is contained in:
Namita Nair
2023-03-14 12:40:30 -07:00
committed by Madan Koyyalamudi
parent d252ffb791
commit d33baafbe5
12 changed files with 26 additions and 13 deletions

View File

@@ -15,8 +15,6 @@
* 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>
@@ -42,6 +40,8 @@
#include "dp_txrx_wds.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)

View File

@@ -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

View File

@@ -24,13 +24,12 @@
#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>
#ifdef IPA_OFFLOAD
/* Declare a variable for IPA instancess added based on pdev */
extern uint8_t g_instances_added;
#define IPA_INVALID_HDL 0xFF

View File

@@ -25,8 +25,6 @@
#ifndef _WLAN_IPA_PRIV_STRUCT_H_
#define _WLAN_IPA_PRIV_STRUCT_H_
#ifdef IPA_OFFLOAD
#include <linux/version.h>
#include <linux/kernel.h>
@@ -48,6 +46,7 @@
#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

View File

@@ -30,6 +30,7 @@
#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
@@ -5208,3 +5209,4 @@ 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 */

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -27,6 +27,7 @@
#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;
@@ -911,3 +912,4 @@ bool ipa_is_wds_enabled(void)
{
return g_ipa_config ? g_ipa_config->ipa_wds : 0;
}
#endif /* IPA_OFFLOAD */

View File

@@ -25,6 +25,7 @@
#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)
@@ -542,3 +543,4 @@ bool wlan_ipa_is_rm_released(struct wlan_ipa_priv *ipa_ctx)
return true;
}
#endif /* CONFIG_IPA_WDI_UNIFIED_API */
#endif

View File

@@ -23,6 +23,7 @@
#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.
@@ -1032,3 +1033,4 @@ 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 */

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018, 2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -29,6 +29,7 @@
#include "qdf_platform.h"
#include "qdf_module.h"
#ifdef IPA_OFFLOAD
/* This is as per IPA capbility */
#define MAX_INSTANCES_SUPPORTED 2
@@ -370,3 +371,4 @@ bool wlan_ipa_is_vlan_enabled(void)
}
qdf_export_symbol(wlan_ipa_is_vlan_enabled);
#endif

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018, 2020-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. 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
@@ -27,6 +27,7 @@
#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)
{
@@ -79,4 +80,4 @@ tgt_ipa_intrabss_enable_disable(struct wlan_objmgr_pdev *pdev,
IPA_EXIT();
return status;
}
#endif

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
@@ -25,6 +25,7 @@
#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);
@@ -361,3 +362,4 @@ bool ucfg_ipa_is_wds_enabled(void)
}
qdf_export_symbol(ucfg_ipa_is_wds_enabled);
#endif

View File

@@ -30,6 +30,7 @@
#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
@@ -89,3 +90,4 @@ target_if_ipa_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
return QDF_STATUS_SUCCESS;
}
#endif