Browse Source

qcacmn: add INI to place FST in CMEM

In addition to firmware capability, add INI param to decide FST
placement in CMEM.

Change-Id: Icc5fdfa49e35665b59efce3fc1f1855d84c16140
CRs-Fixed: 2778898
Manikanta Pubbisetty 4 years ago
parent
commit
905d9e33fb
4 changed files with 22 additions and 2 deletions
  1. 2 1
      dp/wifi3.0/dp_main.c
  2. 5 1
      wlan_cfg/cfg_dp.h
  3. 6 0
      wlan_cfg/wlan_cfg.c
  4. 9 0
      wlan_cfg/wlan_cfg.h

+ 2 - 1
dp/wifi3.0/dp_main.c

@@ -10339,7 +10339,8 @@ static QDF_STATUS dp_soc_set_param(struct cdp_soc_t  *soc_hdl,
 			value);
 		break;
 	case DP_SOC_PARAM_CMEM_FSE_SUPPORT:
-		soc->fst_in_cmem = !!value;
+		if (wlan_cfg_is_fst_in_cmem_enabled(soc->wlan_cfg_ctx))
+			soc->fst_in_cmem = !!value;
 		dp_info("FW supports CMEM FSE %u", value);
 		break;
 	default:

+ 5 - 1
wlan_cfg/cfg_dp.h

@@ -973,6 +973,9 @@
 		CFG_INI_BOOL("dp_poll_mode_enable", false, \
 		"Enable/Disable Polling mode for data path")
 
+#define CFG_DP_RX_FST_IN_CMEM \
+	CFG_INI_BOOL("dp_rx_fst_in_cmem", false, \
+		     "Enable/Disable flow search table in CMEM")
 /*
  * <ini>
  * gEnableSWLM - Control DP Software latency manager
@@ -1077,5 +1080,6 @@
 		CFG(CFG_DP_LEGACY_MODE_CSUM_DISABLE) \
 		CFG(CFG_DP_POLL_MODE_ENABLE) \
 		CFG(CFG_DP_SWLM_ENABLE) \
-		CFG(CFG_DP_TX_PER_PKT_VDEV_ID_CHECK)
+		CFG(CFG_DP_TX_PER_PKT_VDEV_ID_CHECK) \
+		CFG(CFG_DP_RX_FST_IN_CMEM)
 #endif /* _CFG_DP_H_ */

+ 6 - 0
wlan_cfg/wlan_cfg.c

@@ -621,6 +621,7 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
 	wlan_cfg_ctx->is_poll_mode_enabled =
 			cfg_get(psoc, CFG_DP_POLL_MODE_ENABLE);
 	wlan_cfg_ctx->is_swlm_enabled = cfg_get(psoc, CFG_DP_SWLM_ENABLE);
+	wlan_cfg_ctx->fst_in_cmem = cfg_get(psoc, CFG_DP_RX_FST_IN_CMEM);
 	wlan_cfg_ctx->tx_per_pkt_vdev_id_check =
 			cfg_get(psoc, CFG_DP_TX_PER_PKT_VDEV_ID_CHECK);
 
@@ -1430,6 +1431,11 @@ wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
 	return cfg->pext_stats_enabled;
 }
 
+bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
+{
+	return cfg->fst_in_cmem;
+}
+
 #ifdef WLAN_FEATURE_RX_PREALLOC_BUFFER_POOL
 bool wlan_cfg_is_rx_buffer_pool_enabled(struct wlan_cfg_dp_soc_ctxt *cfg)
 {

+ 9 - 0
wlan_cfg/wlan_cfg.h

@@ -301,6 +301,7 @@ struct wlan_cfg_dp_soc_ctxt {
 	uint32_t rx_pending_low_threshold;
 	bool is_poll_mode_enabled;
 	uint8_t is_swlm_enabled;
+	bool fst_in_cmem;
 	bool tx_per_pkt_vdev_id_check;
 };
 
@@ -1457,6 +1458,14 @@ wlan_cfg_is_peer_ext_stats_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
 
 bool wlan_cfg_is_poll_mode_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
 
+/**
+ * wlan_cfg_is_fst_in_cmem_enabled() - Check if FST in CMEM is enabled
+ * @cfg: soc configuration context
+ *
+ * Return: true if enabled, false otherwise.
+ */
+bool wlan_cfg_is_fst_in_cmem_enabled(struct wlan_cfg_dp_soc_ctxt *cfg);
+
 /**
  * wlan_cfg_is_swlm_enabled() - Get SWLMenabled flag
  * @cfg: soc configuration context