From b3d6b4e44647e2fd8ba3157f3ad5ee9f0689cfa8 Mon Sep 17 00:00:00 2001 From: Venkateswara Swamy Bandaru Date: Thu, 7 Sep 2017 17:33:31 +0530 Subject: [PATCH] qcacmn: remove module parameter from dp code Remove napi_budget module parameter from dp code. Change-Id: Ib48d08044977da9091f1a1264d219420d7f53962 CRs-Fixed: 2096650 --- dp/wifi3.0/dp_main.c | 7 +------ hif/inc/hif.h | 3 ++- hif/src/hif_exec.c | 15 ++++++++------- hif/src/hif_exec.h | 4 +++- 4 files changed, 14 insertions(+), 15 deletions(-) diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index f8091db1ef..9a51b7ace3 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -71,11 +71,6 @@ cdp_dump_flow_pool_info(struct cdp_soc_t *soc) #define RX_RING_MASK_VAL 0xF #endif -unsigned int napi_budget = 128; -module_param(napi_budget, uint, 0644); -MODULE_PARM_DESC(napi_budget, - "tasklet mode: more than 0xffff , napi budget if <= 0xffff"); - bool rx_hash = 1; qdf_declare_param(rx_hash, bool); @@ -1154,7 +1149,7 @@ static QDF_STATUS dp_soc_interrupt_attach(void *txrx_soc) ret = hif_register_ext_group(soc->hif_handle, num_irq, irq_id_map, dp_service_srngs, &soc->intr_ctx[i], "dp_intr", - napi_budget); + HIF_EXEC_NAPI_TYPE, 2); if (ret) { QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR, diff --git a/hif/inc/hif.h b/hif/inc/hif.h index b6f8ca20f8..889c8ab639 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -890,7 +890,8 @@ uint32_t hif_configure_ext_group_interrupts(struct hif_opaque_softc *hif_ctx); uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx, uint32_t numirq, uint32_t irq[], ext_intr_handler handler, void *cb_ctx, const char *context_name, - uint32_t budget); + enum hif_exec_type type, uint32_t scale); + void hif_deregister_exec_group(struct hif_opaque_softc *hif_ctx, const char *context_name); diff --git a/hif/src/hif_exec.c b/hif/src/hif_exec.c index 1447eaa0cc..15d8f60e3f 100644 --- a/hif/src/hif_exec.c +++ b/hif/src/hif_exec.c @@ -342,7 +342,8 @@ void hif_exec_kill(struct hif_opaque_softc *hif_ctx) */ uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx, uint32_t numirq, uint32_t irq[], ext_intr_handler handler, - void *cb_ctx, const char *context_name, uint32_t budget) + void *cb_ctx, const char *context_name, + enum hif_exec_type type, uint32_t scale) { struct hif_softc *scn = HIF_GET_SOFTC(hif_ctx); struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); @@ -363,7 +364,7 @@ uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx, return QDF_STATUS_E_FAILURE; } - hif_ext_group = hif_exec_create(budget); + hif_ext_group = hif_exec_create(type, scale); if (hif_ext_group == NULL) return QDF_STATUS_E_FAILURE; @@ -387,15 +388,15 @@ uint32_t hif_register_ext_group(struct hif_opaque_softc *hif_ctx, * hif_exec_create() - create an execution context * @type: the type of execution context to create */ -struct hif_exec_context *hif_exec_create(uint32_t budget) +struct hif_exec_context *hif_exec_create(enum hif_exec_type type, + uint32_t scale) { - uint32_t type = budget <= 0xFFFF ? - HIF_EXEC_NAPI_TYPE : HIF_EXEC_TASKLET_TYPE; + HIF_INFO("%s: create exec_type %d budget %d\n", + __func__, type, QCA_NAPI_BUDGET * scale); - HIF_INFO("%s: create exec_type %d budget %d\n", __func__, type, budget); switch (type) { case HIF_EXEC_NAPI_TYPE: - return hif_exec_napi_create(budget); + return hif_exec_napi_create(QCA_NAPI_BUDGET * scale); case HIF_EXEC_TASKLET_TYPE: return hif_exec_tasklet_create(); diff --git a/hif/src/hif_exec.h b/hif/src/hif_exec.h index 7334f17e23..a3e7ea1754 100644 --- a/hif/src/hif_exec.h +++ b/hif/src/hif_exec.h @@ -107,7 +107,9 @@ static inline struct hif_tasklet_exec_context* return (struct hif_tasklet_exec_context *) ctx; } -struct hif_exec_context *hif_exec_create(enum hif_exec_type type); +struct hif_exec_context *hif_exec_create(enum hif_exec_type type, + uint32_t scale); + void hif_exec_destroy(struct hif_exec_context *ctx); int hif_grp_irq_configure(struct hif_softc *scn,