qcacmn: INI support for optional wifi dp

This change can enable/disable optional
wifi datapath feature from INI.

Change-Id: If380ee1e367f144f258a1e452cb3ab0cab2e33bc
CRs-Fixed: 3424492
This commit is contained in:
Namita Nair
2023-03-02 15:32:38 -08:00
committed by Madan Koyyalamudi
parent 800bc3ca85
commit 72beba762d
6 changed files with 39 additions and 3 deletions

View File

@@ -47,6 +47,18 @@ static inline bool wlan_ipa_uc_is_enabled(struct wlan_ipa_config *ipa_cfg)
return WLAN_IPA_IS_CONFIG_ENABLED(ipa_cfg, WLAN_IPA_UC_ENABLE_MASK);
}
/**
* wlan_ipa_is_opt_wifi_dp_enabled() - Is IPA optional wifi dp enabled?
* @ipa_cfg: IPA config
*
* Return: true if IPA opt wifi dp is enabled, false otherwise
*/
static inline bool wlan_ipa_is_opt_wifi_dp_enabled(
struct wlan_ipa_config *ipa_cfg)
{
return WLAN_IPA_IS_CONFIG_ENABLED(ipa_cfg, WLAN_IPA_OPT_WIFI_DP);
}
/**
* wlan_ipa_is_rt_debugging_enabled() - Is IPA RT debugging enabled?
* @ipa_cfg: IPA config

View File

@@ -158,6 +158,13 @@ bool ipa_config_is_enabled(void);
*/
bool ipa_config_is_uc_enabled(void);
/**
* ipa_config_is_opt_wifi_dp_enabled() - Is IPA optional wifi dp enabled?
*
* Return: true if IPA opt wifi dp is enabled in IPA config
*/
bool ipa_config_is_opt_wifi_dp_enabled(void);
/**
* ipa_config_is_vlan_enabled() - Is IPA vlan config enabled?
*

View File

@@ -84,6 +84,7 @@
#define WLAN_IPA_UC_ENABLE_MASK BIT(5)
#define WLAN_IPA_UC_STA_ENABLE_MASK BIT(6)
#define WLAN_IPA_REAL_TIME_DEBUGGING BIT(8)
#define WLAN_IPA_OPT_WIFI_DP BIT(9)
#ifdef QCA_IPA_LL_TX_FLOW_CONTROL
#define WLAN_IPA_MAX_BANDWIDTH 4800

View File

@@ -4144,8 +4144,15 @@ QDF_STATUS wlan_ipa_setup(struct wlan_ipa_priv *ipa_ctx,
/* Register call backs for opt wifi dp */
if (ipa_ctx->opt_wifi_datapath) {
if (ipa_config_is_opt_wifi_dp_enabled()) {
status = wlan_ipa_reg_flt_cbs(ipa_ctx);
ipa_info("opt_dp: Register cb status %d", status);
ipa_info("opt_dp: Register cb. status %d",
status);
} else {
ipa_info("opt_dp: Disabled from WLAN INI");
}
} else {
ipa_info("opt_dp: Disabled from IPA");
}
qdf_event_create(&ipa_ctx->ipa_resource_comp);

View File

@@ -97,6 +97,11 @@ bool ipa_config_is_uc_enabled(void)
return g_ipa_config ? wlan_ipa_uc_is_enabled(g_ipa_config) : 0;
}
bool ipa_config_is_opt_wifi_dp_enabled(void)
{
return g_ipa_config ? wlan_ipa_is_opt_wifi_dp_enabled(g_ipa_config) : 0;
}
bool ipa_config_is_vlan_enabled(void)
{
if (!ipa_config_is_enabled())

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-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
@@ -34,6 +34,10 @@
* bit2 - IPv6 enable
* bit3 - IPA Resource Manager (RM) enable
* bit4 - IPA Clock scaling enable
* bit5 - IPA UC enable
* bit6 - IPA UC STA enable
* bit8 - IPA real time debugging
* bit9 - IPA Optional wifi dp enable
*/
/*