summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Guo <kangxu@codeaurora.org>2017-06-15 17:46:12 +0800
committersnandini <snandini@codeaurora.org>2017-06-26 12:06:52 -0700
commitbab445b075f00a9e22c68d0439d3588e2ee54761 (patch)
treef09b2c6cac6fa21ee020d0b4c7fa219448dd7110
parent5d59b7353f470bfa0d52de7251a42f89d5a3c7a9 (diff)
qcacld-2.0: Disable credit flow control for HTT mapped HTC EP
When PTP is enabled, WLAN FW will disable HTC credit report to WLAN host to enhance performance. Thus, WLAN host need to disable credit flow control to align this change accordingly. Change-Id: I243a5fb9ce006e4c4cd46d7777a38431118fadf7 CRs-Fixed: 2061837
-rw-r--r--CORE/CLD_TXRX/HTT/htt.c5
-rw-r--r--CORE/CLD_TXRX/TXRX/ol_cfg.c25
-rw-r--r--CORE/MAC/inc/aniGlobal.h3
-rw-r--r--CORE/SERVICES/COMMON/ol_cfg.h17
-rw-r--r--CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h6
-rw-r--r--CORE/SERVICES/WMA/wma.c25
-rw-r--r--CORE/VOSS/src/vos_api.c22
7 files changed, 99 insertions, 4 deletions
diff --git a/CORE/CLD_TXRX/HTT/htt.c b/CORE/CLD_TXRX/HTT/htt.c
index 9a03cc1c3723..a430daa9f2cc 100644
--- a/CORE/CLD_TXRX/HTT/htt.c
+++ b/CORE/CLD_TXRX/HTT/htt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011, 2014-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -461,7 +461,8 @@ htt_htc_attach(struct htt_pdev_t *pdev)
* TODO:Conditional disabling will be removed once firmware
* with reduced tx completion is pushed into release builds.
*/
- if (!pdev->cfg.default_tx_comp_req) {
+ if ((!pdev->cfg.default_tx_comp_req) ||
+ ol_cfg_is_ptp_enabled(pdev->ctrl_pdev)) {
connect.ConnectionFlags |= HTC_CONNECT_FLAGS_DISABLE_CREDIT_FLOW_CTRL;
}
#else
diff --git a/CORE/CLD_TXRX/TXRX/ol_cfg.c b/CORE/CLD_TXRX/TXRX/ol_cfg.c
index 54f1f5f3a5f6..5b5f7519a232 100644
--- a/CORE/CLD_TXRX/TXRX/ol_cfg.c
+++ b/CORE/CLD_TXRX/TXRX/ol_cfg.c
@@ -124,6 +124,7 @@ ol_pdev_handle ol_pdev_cfg_attach(adf_os_device_t osdev,
#endif /* IPA_UC_OFFLOAD */
ol_cfg_update_bundle_params(cfg_ctx, cfg_param);
+ ol_cfg_update_ptp_params(cfg_ctx, cfg_param);
for (i = 0; i < OL_TX_NUM_WMM_AC; i++) {
cfg_ctx->ac_specs[i].wrr_skip_weight =
@@ -233,6 +234,30 @@ u_int8_t ol_cfg_is_ptp_rx_opt_enabled(ol_pdev_handle pdev)
return cfg->is_ptp_rx_opt_enabled;
}
+/**
+ * ol_cfg_is_ptp_enabled() - check if ptp feature is enabled
+ * @pdev: cfg handle to PDEV
+ *
+ * Return: is_ptp_enabled
+ */
+a_bool_t ol_cfg_is_ptp_enabled(ol_pdev_handle pdev)
+{
+ struct txrx_pdev_cfg_t *cfg = (struct txrx_pdev_cfg_t *)pdev;
+
+ return cfg->is_ptp_enabled;
+}
+/**
+ * ol_cfg_update_ptp_params() - update ptp params
+ * @cfg_ctx: cfg context
+ * @cfg_param: parameters
+ *
+ * Return: none
+ */
+void ol_cfg_update_ptp_params(struct txrx_pdev_cfg_t *cfg_ctx,
+ struct txrx_pdev_cfg_param_t cfg_param)
+{
+ cfg_ctx->is_ptp_enabled = cfg_param.is_ptp_enabled;
+}
#endif
int ol_cfg_rx_fwd_disabled(ol_pdev_handle pdev)
diff --git a/CORE/MAC/inc/aniGlobal.h b/CORE/MAC/inc/aniGlobal.h
index 53e01d23e794..528f279c11a6 100644
--- a/CORE/MAC/inc/aniGlobal.h
+++ b/CORE/MAC/inc/aniGlobal.h
@@ -1141,6 +1141,9 @@ typedef struct sMacOpenParameters
#ifdef WLAN_FEATURE_NAN
bool is_nan_enabled;
#endif
+#ifdef WLAN_FEATURE_TSF_PLUS
+ bool is_ptp_enabled;
+#endif
uint16_t max_mgmt_tx_fail_count;
bool force_target_assert_enabled;
uint16_t pkt_bundle_timer_value;
diff --git a/CORE/SERVICES/COMMON/ol_cfg.h b/CORE/SERVICES/COMMON/ol_cfg.h
index 28c14efcaf07..59b3dd7eb29e 100644
--- a/CORE/SERVICES/COMMON/ol_cfg.h
+++ b/CORE/SERVICES/COMMON/ol_cfg.h
@@ -91,6 +91,7 @@ struct txrx_pdev_cfg_t {
u8 is_full_reorder_offload;
#ifdef WLAN_FEATURE_TSF_PLUS
u8 is_ptp_rx_opt_enabled;
+ a_bool_t is_ptp_enabled;
#endif
#ifdef IPA_UC_OFFLOAD
struct wlan_ipa_uc_rsc_t ipa_uc_rsc;
@@ -482,6 +483,9 @@ u_int8_t ol_cfg_is_packet_log_enabled(ol_pdev_handle pdev);
#ifdef WLAN_FEATURE_TSF_PLUS
void ol_set_cfg_ptp_rx_opt_enabled(ol_pdev_handle pdev, u_int8_t val);
u_int8_t ol_cfg_is_ptp_rx_opt_enabled(ol_pdev_handle pdev);
+a_bool_t ol_cfg_is_ptp_enabled(ol_pdev_handle pdev);
+void ol_cfg_update_ptp_params(struct txrx_pdev_cfg_t *cfg_ctx,
+ struct txrx_pdev_cfg_param_t cfg_param);
#else
static inline void
ol_set_cfg_ptp_rx_opt_enabled(ol_pdev_handle pdev, u_int8_t val)
@@ -493,6 +497,19 @@ ol_cfg_is_ptp_rx_opt_enabled(ol_pdev_handle pdev)
{
return 0;
}
+
+static inline a_bool_t
+ol_cfg_is_ptp_enabled(ol_pdev_handle pdev)
+{
+ return 0;
+}
+
+static inline void
+ol_cfg_update_ptp_params(struct txrx_pdev_cfg_t *cfg_ctx,
+ struct txrx_pdev_cfg_param_t cfg_param)
+{
+ return;
+}
#endif
#ifdef IPA_UC_OFFLOAD
diff --git a/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h b/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
index cc18608858fa..4c2f78ab8386 100644
--- a/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
+++ b/CORE/SERVICES/COMMON/ol_txrx_ctrl_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1007,6 +1007,10 @@ struct txrx_pdev_cfg_param_t {
uint16_t pkt_bundle_timer_value;
uint16_t pkt_bundle_size;
+ /* PTP feature enabled\disable status */
+#ifdef WLAN_FEATURE_TSF_PLUS
+ a_bool_t is_ptp_enabled;
+#endif
struct ol_tx_sched_wrr_ac_specs_t ac_specs[OL_TX_NUM_WMM_AC];
};
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index a75627e6c291..116e8c924880 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -8587,6 +8587,29 @@ static void wma_set_nan_enable(tp_wma_handle wma_handle,
}
#endif
+#ifdef WLAN_FEATURE_TSF_PLUS
+/**
+ * wma_update_ptp_params() - update bundle params
+ * @olCfg: cfg handle
+ * @mac_params: mac params
+ *
+ * Return: none
+ */
+static
+void wma_update_ptp_params(struct txrx_pdev_cfg_param_t *olCfg,
+ tMacOpenParameters *mac_params)
+{
+ olCfg->is_ptp_enabled = mac_params->is_ptp_enabled;
+}
+#else
+static
+void wma_update_ptp_params(struct txrx_pdev_cfg_param_t *olCfg,
+ tMacOpenParameters *mac_params)
+{
+ return;
+}
+#endif
+
#ifdef QCA_SUPPORT_TXRX_HL_BUNDLE
/**
* ol_cfg_update_bundle_params() - update bundle params
@@ -8941,7 +8964,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
ol_cfg_update_bundle_params(&olCfg, mac_params);
ol_cfg_update_ac_specs_params(&olCfg, mac_params);
-
+ wma_update_ptp_params(&olCfg, mac_params);
((pVosContextType) vos_context)->cfg_ctx =
ol_pdev_cfg_attach(((pVosContextType) vos_context)->adf_ctx, olCfg);
if (!(((pVosContextType) vos_context)->cfg_ctx)) {
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index c030168c75ab..c80a62559618 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -255,6 +255,27 @@ static inline void vos_fw_hash_check_config(struct ol_softc *scn,
hdd_context_t *pHddCtx) { }
#endif
+#ifdef WLAN_FEATURE_TSF_PLUS
+/**
+ * vos_set_ptp_enable() - set ptp enable flag in mac open param
+ * @wma_handle: Pointer to mac open param
+ * @hdd_ctx: Pointer to hdd context
+ *
+ * Return: none
+ */
+static void vos_set_ptp_enable(tMacOpenParameters *param,
+ hdd_context_t *hdd_ctx)
+{
+ param->is_ptp_enabled =
+ (hdd_ctx->cfg_ini->tsf_ptp_options != 0);
+}
+#else
+static void vos_set_ptp_enable(tMacOpenParameters *param,
+ hdd_context_t *pHddCtx)
+{
+}
+#endif
+
#ifdef WLAN_FEATURE_NAN
/**
* vos_set_nan_enable() - set nan enable flag in mac open param
@@ -646,6 +667,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize )
vos_set_nan_enable(&macOpenParms, pHddCtx);
vos_set_bundle_params(&macOpenParms, pHddCtx);
vos_set_ac_specs_params(&macOpenParms, pHddCtx);
+ vos_set_ptp_enable(&macOpenParms, pHddCtx);
vStatus = WDA_open( gpVosContext, gpVosContext->pHDDContext,
hdd_update_tgt_cfg,