mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
qcacmn: Replace target related feature values with INI parameters
Introduce INI parameters to fetch feature related values based on target type and add CDP interface to get dp INI parameters to control path Change-Id: Id6a3f409106eb7dc01b08a3f1ec00dbe7efc359f
This commit is contained in:
parent
169fce61ef
commit
a4f6e173c1
7 changed files with 138 additions and 7 deletions
|
|
@ -426,10 +426,6 @@
|
|||
0, 1, 1, \
|
||||
CFG_VALUE_OR_DEFAULT, "DP Base HW Mac ID")
|
||||
|
||||
#define CFG_DP_LRO \
|
||||
CFG_INI_BOOL("LROEnable", WLAN_LRO_ENABLE, \
|
||||
"DP LRO Enable")
|
||||
|
||||
#define CFG_DP_RX_HASH \
|
||||
CFG_INI_BOOL("dp_rx_hash", true, \
|
||||
"DP Rx Hash")
|
||||
|
|
@ -438,6 +434,34 @@
|
|||
CFG_INI_BOOL("TSOEnable", false, \
|
||||
"DP TSO Enabled")
|
||||
|
||||
#define CFG_DP_LRO \
|
||||
CFG_INI_BOOL("LROEnable", WLAN_LRO_ENABLE, \
|
||||
"DP LRO Enable")
|
||||
|
||||
#define CFG_DP_SG \
|
||||
CFG_INI_BOOL("dp_sg_support", false, \
|
||||
"DP SG Enable")
|
||||
|
||||
#define CFG_DP_GRO \
|
||||
CFG_INI_BOOL("GROEnable", false, \
|
||||
"DP GRO Enable")
|
||||
|
||||
#define CFG_DP_OL_TX_CSUM \
|
||||
CFG_INI_BOOL("dp_offload_tx_csum_support", false, \
|
||||
"DP tx csum Enable")
|
||||
|
||||
#define CFG_DP_OL_RX_CSUM \
|
||||
CFG_INI_BOOL("dp_offload_rx_csum_support", false, \
|
||||
"DP rx csum Enable")
|
||||
|
||||
#define CFG_DP_RAWMODE \
|
||||
CFG_INI_BOOL("dp_rawmode_support", false, \
|
||||
"DP rawmode Enable")
|
||||
|
||||
#define CFG_DP_PEER_FLOW_CTRL \
|
||||
CFG_INI_BOOL("dp_peer_flow_control_support", false, \
|
||||
"DP peer flow ctrl Enable")
|
||||
|
||||
#define CFG_DP_NAPI \
|
||||
CFG_INI_BOOL("dp_napi_enabled", MCL_OR_WIN_VALUE(true, false), \
|
||||
"DP Napi Enabled")
|
||||
|
|
@ -579,9 +603,15 @@
|
|||
CFG(CFG_DP_NSS_COMP_RING_SIZE) \
|
||||
CFG(CFG_DP_PDEV_LMAC_RING) \
|
||||
CFG(CFG_DP_BASE_HW_MAC_ID) \
|
||||
CFG(CFG_DP_LRO) \
|
||||
CFG(CFG_DP_RX_HASH) \
|
||||
CFG(CFG_DP_TSO) \
|
||||
CFG(CFG_DP_LRO) \
|
||||
CFG(CFG_DP_SG) \
|
||||
CFG(CFG_DP_GRO) \
|
||||
CFG(CFG_DP_OL_TX_CSUM) \
|
||||
CFG(CFG_DP_OL_RX_CSUM) \
|
||||
CFG(CFG_DP_RAWMODE) \
|
||||
CFG(CFG_DP_PEER_FLOW_CTRL) \
|
||||
CFG(CFG_DP_NAPI) \
|
||||
CFG(CFG_DP_TCP_UDP_CKSUM_OFFLOAD) \
|
||||
CFG(CFG_DP_DEFRAG_TIMEOUT_CHECK) \
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
#include "qdf_trace.h"
|
||||
#include "qdf_mem.h"
|
||||
#include <cdp_txrx_ops.h>
|
||||
#include "wlan_cfg.h"
|
||||
#include "cfg_ucfg_api.h"
|
||||
|
||||
|
|
@ -273,9 +274,16 @@ struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach(void *psoc)
|
|||
|
||||
wlan_cfg_ctx->base_hw_macid = cfg_get(psoc, CFG_DP_BASE_HW_MAC_ID);
|
||||
|
||||
wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
|
||||
wlan_cfg_ctx->rx_hash = cfg_get(psoc, CFG_DP_RX_HASH);
|
||||
wlan_cfg_ctx->tso_enabled = cfg_get(psoc, CFG_DP_TSO);
|
||||
wlan_cfg_ctx->lro_enabled = cfg_get(psoc, CFG_DP_LRO);
|
||||
wlan_cfg_ctx->sg_enabled = cfg_get(psoc, CFG_DP_SG);
|
||||
wlan_cfg_ctx->gro_enabled = cfg_get(psoc, CFG_DP_GRO);
|
||||
wlan_cfg_ctx->ol_tx_csum_enabled = cfg_get(psoc, CFG_DP_OL_TX_CSUM);
|
||||
wlan_cfg_ctx->ol_rx_csum_enabled = cfg_get(psoc, CFG_DP_OL_RX_CSUM);
|
||||
wlan_cfg_ctx->rawmode_enabled = cfg_get(psoc, CFG_DP_RAWMODE);
|
||||
wlan_cfg_ctx->peer_flow_ctrl_enabled =
|
||||
cfg_get(psoc, CFG_DP_PEER_FLOW_CTRL);
|
||||
wlan_cfg_ctx->napi_enabled = cfg_get(psoc, CFG_DP_NAPI);
|
||||
/*Enable checksum offload by default*/
|
||||
wlan_cfg_ctx->tcp_udp_checksumoffload =
|
||||
|
|
@ -780,6 +788,32 @@ wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
|
|||
return cfg->rxdma_err_dst_ring;
|
||||
}
|
||||
|
||||
bool
|
||||
wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
|
||||
enum cdp_capabilities dp_caps)
|
||||
{
|
||||
switch (dp_caps) {
|
||||
case CDP_CFG_DP_TSO:
|
||||
return cfg->tso_enabled;
|
||||
case CDP_CFG_DP_LRO:
|
||||
return cfg->lro_enabled;
|
||||
case CDP_CFG_DP_SG:
|
||||
return cfg->sg_enabled;
|
||||
case CDP_CFG_DP_GRO:
|
||||
return cfg->gro_enabled;
|
||||
case CDP_CFG_DP_OL_TX_CSUM:
|
||||
return cfg->ol_tx_csum_enabled;
|
||||
case CDP_CFG_DP_OL_RX_CSUM:
|
||||
return cfg->ol_rx_csum_enabled;
|
||||
case CDP_CFG_DP_RAWMODE:
|
||||
return cfg->rawmode_enabled;
|
||||
case CDP_CFG_DP_PEER_FLOW_CTRL:
|
||||
return cfg->peer_flow_ctrl_enabled;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
|
||||
/**
|
||||
* wlan_cfg_get_tx_flow_stop_queue_th() - Get flow control stop threshold
|
||||
|
|
|
|||
|
|
@ -164,9 +164,15 @@ struct wlan_cfg_dp_soc_ctxt {
|
|||
int int_host2rxdma_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS];
|
||||
int hw_macid[MAX_PDEV_CNT];
|
||||
int base_hw_macid;
|
||||
bool lro_enabled;
|
||||
bool rx_hash;
|
||||
bool tso_enabled;
|
||||
bool lro_enabled;
|
||||
bool sg_enabled;
|
||||
bool gro_enabled;
|
||||
bool ol_tx_csum_enabled;
|
||||
bool ol_rx_csum_enabled;
|
||||
bool rawmode_enabled;
|
||||
bool peer_flow_ctrl_enabled;
|
||||
bool napi_enabled;
|
||||
bool tcp_udp_checksumoffload;
|
||||
bool defrag_timeout_check;
|
||||
|
|
@ -866,6 +872,17 @@ wlan_cfg_get_dp_soc_rxdma_refill_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
|||
int
|
||||
wlan_cfg_get_dp_soc_rxdma_err_dst_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
/*
|
||||
* wlan_cfg_get_dp_caps - Get dp capablities
|
||||
* @wlan_cfg_soc_ctx
|
||||
* @dp_caps: enum for dp capablities
|
||||
*
|
||||
* Return: bool if a dp capabilities is enabled
|
||||
*/
|
||||
bool
|
||||
wlan_cfg_get_dp_caps(struct wlan_cfg_dp_soc_ctxt *cfg,
|
||||
enum cdp_capabilities dp_caps);
|
||||
|
||||
#ifdef QCA_LL_TX_FLOW_CONTROL_V2
|
||||
int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue