qcacld-3.0: Add IPA CFG items and APIs
Add IPA related INI config to IPA component. Change-Id: I5bea63b83ddac62504ef38019aa4034c4e18bca7 CRs-Fixed: 2320921
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include "cfg_converged.h"
|
#include "cfg_converged.h"
|
||||||
#include "cfg_mlme.h"
|
#include "cfg_mlme.h"
|
||||||
#include "cfg_fwol.h"
|
#include "cfg_fwol.h"
|
||||||
|
#include "cfg_ipa.h"
|
||||||
|
|
||||||
#ifdef CONVERGED_P2P_ENABLE
|
#ifdef CONVERGED_P2P_ENABLE
|
||||||
#include "wlan_p2p_cfg.h"
|
#include "wlan_p2p_cfg.h"
|
||||||
@@ -49,6 +50,7 @@
|
|||||||
CFG_FWOL_ALL \
|
CFG_FWOL_ALL \
|
||||||
CFG_HDD_ALL \
|
CFG_HDD_ALL \
|
||||||
CFG_HDD_DP_ALL \
|
CFG_HDD_DP_ALL \
|
||||||
|
CFG_IPA \
|
||||||
CFG_MLME_ALL \
|
CFG_MLME_ALL \
|
||||||
CFG_NAN_ALL \
|
CFG_NAN_ALL \
|
||||||
CFG_P2P_ALL \
|
CFG_P2P_ALL \
|
||||||
|
@@ -114,14 +114,6 @@ QDF_STATUS ipa_config_mem_alloc(void);
|
|||||||
*/
|
*/
|
||||||
void ipa_config_mem_free(void);
|
void ipa_config_mem_free(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* ipa_config_update() - IPA component config update
|
|
||||||
* @config: IPA config
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void ipa_config_update(struct wlan_ipa_config *config);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ipa_config_is_enabled() - Is IPA config enabled?
|
* ipa_config_is_enabled() - Is IPA config enabled?
|
||||||
*
|
*
|
||||||
@@ -422,5 +414,20 @@ void ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev);
|
|||||||
*/
|
*/
|
||||||
void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev);
|
void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ipa_component_config_update() - update ipa config from psoc
|
||||||
|
* @psoc: psoc obj
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void ipa_component_config_update(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ipa_get_tx_buf_count() - get IPA config tx buffer count
|
||||||
|
*
|
||||||
|
* Return: IPA config tx buffer count
|
||||||
|
*/
|
||||||
|
|
||||||
|
uint32_t ipa_get_tx_buf_count(void);
|
||||||
#endif /* IPA_OFFLOAD */
|
#endif /* IPA_OFFLOAD */
|
||||||
#endif /* end of _WLAN_IPA_MAIN_H_ */
|
#endif /* end of _WLAN_IPA_MAIN_H_ */
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include "wlan_ipa_main.h"
|
#include "wlan_ipa_main.h"
|
||||||
#include "wlan_ipa_core.h"
|
#include "wlan_ipa_core.h"
|
||||||
#include "wlan_ipa_tgt_api.h"
|
#include "wlan_ipa_tgt_api.h"
|
||||||
|
#include "cfg_ucfg_api.h"
|
||||||
|
|
||||||
static struct wlan_ipa_config *g_ipa_config;
|
static struct wlan_ipa_config *g_ipa_config;
|
||||||
static bool g_ipa_hw_support;
|
static bool g_ipa_hw_support;
|
||||||
@@ -69,16 +70,6 @@ bool ipa_is_hw_support(void)
|
|||||||
return g_ipa_hw_support;
|
return g_ipa_hw_support;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ipa_config_update(struct wlan_ipa_config *config)
|
|
||||||
{
|
|
||||||
if (!g_ipa_config) {
|
|
||||||
ipa_err("IPA config already freed");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
qdf_mem_copy(g_ipa_config, config, sizeof(*g_ipa_config));
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ipa_config_is_enabled(void)
|
bool ipa_config_is_enabled(void)
|
||||||
{
|
{
|
||||||
return g_ipa_config ? wlan_ipa_is_enabled(g_ipa_config) : 0;
|
return g_ipa_config ? wlan_ipa_is_enabled(g_ipa_config) : 0;
|
||||||
@@ -602,3 +593,36 @@ void ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
|
|||||||
|
|
||||||
return wlan_ipa_fw_rejuvenate_send_msg(ipa_obj);
|
return wlan_ipa_fw_rejuvenate_send_msg(ipa_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
if (!g_ipa_config) {
|
||||||
|
ipa_err("g_ipa_config is NULL");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_ipa_config->ipa_config =
|
||||||
|
cfg_get(psoc, CFG_DP_IPA_OFFLOAD_CONFIG);
|
||||||
|
g_ipa_config->desc_size =
|
||||||
|
cfg_get(psoc, CFG_DP_IPA_DESC_SIZE);
|
||||||
|
g_ipa_config->txbuf_count =
|
||||||
|
qdf_rounddown_pow_of_two(cfg_get(psoc,
|
||||||
|
CFG_DP_IPA_UC_TX_BUF_COUNT));
|
||||||
|
g_ipa_config->ipa_bw_high =
|
||||||
|
cfg_get(psoc, CFG_DP_IPA_HIGH_BANDWIDTH_MBPS);
|
||||||
|
g_ipa_config->ipa_bw_medium =
|
||||||
|
cfg_get(psoc, CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS);
|
||||||
|
g_ipa_config->ipa_bw_low =
|
||||||
|
cfg_get(psoc, CFG_DP_IPA_LOW_BANDWIDTH_MBPS);
|
||||||
|
g_ipa_config->bus_bw_high =
|
||||||
|
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_HIGH_THRESHOLD);
|
||||||
|
g_ipa_config->bus_bw_medium =
|
||||||
|
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_MEDIUM_THRESHOLD);
|
||||||
|
g_ipa_config->bus_bw_low =
|
||||||
|
cfg_get(psoc, CFG_DP_BUS_BANDWIDTH_LOW_THRESHOLD);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ipa_get_tx_buf_count(void)
|
||||||
|
{
|
||||||
|
return g_ipa_config ? g_ipa_config->txbuf_count : 0;
|
||||||
|
}
|
||||||
|
190
ipa/dispatcher/inc/cfg_ipa.h
Normal file
190
ipa/dispatcher/inc/cfg_ipa.h
Normal file
@@ -0,0 +1,190 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2012-2018 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
|
||||||
|
* above copyright notice and this permission notice appear in all
|
||||||
|
* copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||||
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||||
|
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
||||||
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
||||||
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||||
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||||
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DOC: This file contains definitions of Data Path configuration.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _CFG_IPA_H_
|
||||||
|
#define _CFG_IPA_H_
|
||||||
|
|
||||||
|
#include "cfg_define.h"
|
||||||
|
|
||||||
|
/* DP INI Declerations */
|
||||||
|
/*
|
||||||
|
* IPA Offload configuration - Each bit enables a feature
|
||||||
|
* bit0 - IPA Enable
|
||||||
|
* bit1 - IPA Pre filter enable
|
||||||
|
* bit2 - IPv6 enable
|
||||||
|
* bit3 - IPA Resource Manager (RM) enable
|
||||||
|
* bit4 - IPA Clock scaling enable
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gIPAConfig - IPA configuration
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 0xFFFFFFFF
|
||||||
|
* @Default: 0
|
||||||
|
*
|
||||||
|
* This ini specifies the IPA configuration
|
||||||
|
*
|
||||||
|
* Related: N/A
|
||||||
|
*
|
||||||
|
* Supported Feature: IPA
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_DP_IPA_OFFLOAD_CONFIG \
|
||||||
|
CFG_INI_UINT("gIPAConfig", \
|
||||||
|
0, \
|
||||||
|
0xFFFFFFFF, \
|
||||||
|
0, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "IPA offload configuration")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* GIPADescSize - IPA descriptor size
|
||||||
|
* @Min: 800
|
||||||
|
* @Max: 8000
|
||||||
|
* @Default: 800
|
||||||
|
*
|
||||||
|
* This ini specifies the IPA descriptor size
|
||||||
|
*
|
||||||
|
* Related: N/A
|
||||||
|
*
|
||||||
|
* Supported Feature: IPA
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_DP_IPA_DESC_SIZE \
|
||||||
|
CFG_INI_UINT("GIPADescSize", \
|
||||||
|
800, \
|
||||||
|
8000, \
|
||||||
|
800, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "IPA DESC SIZE")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gIPAHighBandwidthMbps - IPA high bw threshold
|
||||||
|
* @Min: 200
|
||||||
|
* @Max: 1000
|
||||||
|
* @Default: 400
|
||||||
|
*
|
||||||
|
* This ini specifies the IPA high bw threshold
|
||||||
|
*
|
||||||
|
* Related: N/A
|
||||||
|
*
|
||||||
|
* Supported Feature: IPA
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_DP_IPA_HIGH_BANDWIDTH_MBPS \
|
||||||
|
CFG_INI_UINT("gIPAHighBandwidthMbps", \
|
||||||
|
200, \
|
||||||
|
1000, \
|
||||||
|
400, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "IPA high bw threshold")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gIPAHighBandwidthMbps - IPA medium bw threshold
|
||||||
|
* @Min: 100
|
||||||
|
* @Max: 400
|
||||||
|
* @Default: 200
|
||||||
|
*
|
||||||
|
* This ini specifies the IPA medium bw threshold
|
||||||
|
*
|
||||||
|
* Related: N/A
|
||||||
|
*
|
||||||
|
* Supported Feature: IPA
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS \
|
||||||
|
CFG_INI_UINT("gIPAMediumBandwidthMbps", \
|
||||||
|
100, \
|
||||||
|
400, \
|
||||||
|
200, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "IPA medium bw threshold")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* gIPAHighBandwidthMbps - IPA low bw threshold
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 100
|
||||||
|
* @Default: 100
|
||||||
|
*
|
||||||
|
* This ini specifies the IPA low bw threshold
|
||||||
|
*
|
||||||
|
* Related: N/A
|
||||||
|
*
|
||||||
|
* Supported Feature: IPA
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_DP_IPA_LOW_BANDWIDTH_MBPS \
|
||||||
|
CFG_INI_UINT("gIPALowBandwidthMbps", \
|
||||||
|
0, \
|
||||||
|
100, \
|
||||||
|
100, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "IPA low bw threshold")
|
||||||
|
|
||||||
|
/*
|
||||||
|
* <ini>
|
||||||
|
* IpaUcTxBufCount - IPA tx buffer count
|
||||||
|
* @Min: 0
|
||||||
|
* @Max: 2048
|
||||||
|
* @Default: 512
|
||||||
|
*
|
||||||
|
* This ini specifies the IPA tx buffer count
|
||||||
|
*
|
||||||
|
* Related: N/A
|
||||||
|
*
|
||||||
|
* Supported Feature: IPA
|
||||||
|
*
|
||||||
|
* Usage: Internal
|
||||||
|
*
|
||||||
|
* </ini>
|
||||||
|
*/
|
||||||
|
#define CFG_DP_IPA_UC_TX_BUF_COUNT \
|
||||||
|
CFG_INI_UINT("IpaUcTxBufCount", \
|
||||||
|
0, \
|
||||||
|
2048, \
|
||||||
|
512, \
|
||||||
|
CFG_VALUE_OR_DEFAULT, "IPA tx buffer count")
|
||||||
|
|
||||||
|
#define CFG_IPA \
|
||||||
|
CFG(CFG_DP_IPA_OFFLOAD_CONFIG) \
|
||||||
|
CFG(CFG_DP_IPA_DESC_SIZE) \
|
||||||
|
CFG(CFG_DP_IPA_HIGH_BANDWIDTH_MBPS) \
|
||||||
|
CFG(CFG_DP_IPA_MEDIUM_BANDWIDTH_MBPS) \
|
||||||
|
CFG(CFG_DP_IPA_LOW_BANDWIDTH_MBPS) \
|
||||||
|
CFG(CFG_DP_IPA_UC_TX_BUF_COUNT)
|
||||||
|
|
||||||
|
#endif /* _CFG_IPA_H_ */
|
@@ -26,6 +26,7 @@
|
|||||||
#include "wlan_ipa_obj_mgmt_api.h"
|
#include "wlan_ipa_obj_mgmt_api.h"
|
||||||
#include "wlan_objmgr_pdev_obj.h"
|
#include "wlan_objmgr_pdev_obj.h"
|
||||||
#include "qdf_types.h"
|
#include "qdf_types.h"
|
||||||
|
#include "wlan_ipa_main.h"
|
||||||
|
|
||||||
#ifdef IPA_OFFLOAD
|
#ifdef IPA_OFFLOAD
|
||||||
|
|
||||||
@@ -57,13 +58,6 @@ bool ucfg_ipa_is_enabled(void);
|
|||||||
*/
|
*/
|
||||||
bool ucfg_ipa_uc_is_enabled(void);
|
bool ucfg_ipa_uc_is_enabled(void);
|
||||||
|
|
||||||
/**
|
|
||||||
* ucfg_ipa_update_config() - Update IPA component config
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
void ucfg_ipa_update_config(struct wlan_ipa_config *config);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_ipa_set_dp_handle() - register DP handle
|
* ucfg_ipa_set_dp_handle() - register DP handle
|
||||||
* @psoc: psoc handle
|
* @psoc: psoc handle
|
||||||
@@ -332,6 +326,21 @@ void ucfg_ipa_uc_ssr_cleanup(struct wlan_objmgr_pdev *pdev);
|
|||||||
*/
|
*/
|
||||||
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev);
|
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_ipa_component_config_update() - update IPA component config
|
||||||
|
* @psoc: pointer to psoc object
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void ucfg_ipa_component_config_update(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_get_ipa_tx_buf_count() - get IPA tx buffer count
|
||||||
|
*
|
||||||
|
* Return: IPA tx buffer count
|
||||||
|
*/
|
||||||
|
uint32_t ucfg_ipa_get_tx_buf_count(void);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static inline bool ucfg_ipa_is_present(void)
|
static inline bool ucfg_ipa_is_present(void)
|
||||||
@@ -517,5 +526,16 @@ static inline
|
|||||||
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
|
void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
void ucfg_ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
uint32_t ucfg_ipa_get_tx_buf_count(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif /* IPA_OFFLOAD */
|
#endif /* IPA_OFFLOAD */
|
||||||
#endif /* _WLAN_IPA_UCFG_API_H_ */
|
#endif /* _WLAN_IPA_UCFG_API_H_ */
|
||||||
|
@@ -21,6 +21,8 @@
|
|||||||
|
|
||||||
#include "wlan_ipa_ucfg_api.h"
|
#include "wlan_ipa_ucfg_api.h"
|
||||||
#include "wlan_ipa_main.h"
|
#include "wlan_ipa_main.h"
|
||||||
|
#include "cfg_ucfg_api.h"
|
||||||
|
|
||||||
|
|
||||||
bool ucfg_ipa_is_present(void)
|
bool ucfg_ipa_is_present(void)
|
||||||
{
|
{
|
||||||
@@ -49,11 +51,6 @@ void ucfg_ipa_set_dp_handle(struct wlan_objmgr_psoc *psoc,
|
|||||||
return ipa_set_dp_handle(psoc, dp_soc);
|
return ipa_set_dp_handle(psoc, dp_soc);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ucfg_ipa_update_config(struct wlan_ipa_config *config)
|
|
||||||
{
|
|
||||||
ipa_config_update(config);
|
|
||||||
}
|
|
||||||
|
|
||||||
QDF_STATUS ucfg_ipa_set_perf_level(struct wlan_objmgr_pdev *pdev,
|
QDF_STATUS ucfg_ipa_set_perf_level(struct wlan_objmgr_pdev *pdev,
|
||||||
uint64_t tx_packets, uint64_t rx_packets)
|
uint64_t tx_packets, uint64_t rx_packets)
|
||||||
{
|
{
|
||||||
@@ -196,3 +193,13 @@ void ucfg_ipa_fw_rejuvenate_send_msg(struct wlan_objmgr_pdev *pdev)
|
|||||||
{
|
{
|
||||||
return ipa_fw_rejuvenate_send_msg(pdev);
|
return ipa_fw_rejuvenate_send_msg(pdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ucfg_ipa_component_config_update(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
ipa_component_config_update(psoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t ucfg_ipa_get_tx_buf_count(void)
|
||||||
|
{
|
||||||
|
return ipa_get_tx_buf_count();
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user