Przeglądaj źródła

qcacmn: Rename cmd ring to cmd_credit ring

Command ring is now renamed to credit ring on QCN9000
and used for credit based flow.
Renaming the ring to give meaningful name.

Change-Id: I726aed19477fcfb256e4e0cca8ddb9389035b58c
CRs-Fixed: 2562640
Ankit Kumar 5 lat temu
rodzic
commit
f63aaef3d3

+ 13 - 11
dp/wifi3.0/dp_main.c

@@ -1050,7 +1050,8 @@ static int dp_srng_calculate_msi_group(struct dp_soc *soc,
 	break;
 
 	case TCL_DATA:
-	case TCL_CMD:
+	/* CMD_CREDIT_RING is used as command in 8074 and credit in 9000 */
+	case TCL_CMD_CREDIT:
 	case REO_CMD:
 	case SW2WBM_RELEASE:
 	case WBM_IDLE_LINK:
@@ -2976,12 +2977,11 @@ static int dp_soc_cmn_setup(struct dp_soc *soc)
 		goto fail1;
 	}
 
-	entries = wlan_cfg_get_dp_soc_tcl_cmd_ring_size(soc_cfg_ctx);
-	/* TCL command and status rings */
-	if (dp_srng_setup(soc, &soc->tcl_cmd_ring, TCL_CMD, 0, 0,
+	entries = wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(soc_cfg_ctx);
+	if (dp_srng_setup(soc, &soc->tcl_cmd_credit_ring, TCL_CMD_CREDIT, 0, 0,
 			  entries, 0)) {
 		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
-			FL("dp_srng_setup failed for tcl_cmd_ring"));
+			FL("dp_srng_setup failed for tcl_cmd_credit_ring."));
 		goto fail2;
 	}
 
@@ -4360,8 +4360,9 @@ static void dp_soc_deinit(void *txrx_soc)
 		}
 	}
 
-	/* TCL command and status rings */
-	dp_srng_deinit(soc, &soc->tcl_cmd_ring, TCL_CMD, 0);
+	/* TCL command/credit ring */
+	dp_srng_deinit(soc, &soc->tcl_cmd_credit_ring, TCL_CMD_CREDIT, 0);
+	/* TCL status ring */
 	dp_srng_deinit(soc, &soc->tcl_status_ring, TCL_STATUS, 0);
 
 	/* Rx data rings */
@@ -4462,8 +4463,9 @@ static void dp_soc_detach(struct cdp_soc_t *txrx_soc)
 		}
 	}
 
-	/* TCL command and status rings */
-	dp_srng_cleanup(soc, &soc->tcl_cmd_ring, TCL_CMD, 0);
+	/* TCL command/credit ring */
+	dp_srng_cleanup(soc, &soc->tcl_cmd_credit_ring, TCL_CMD_CREDIT, 0);
+	/* TCL status rings */
 	dp_srng_cleanup(soc, &soc->tcl_status_ring, TCL_STATUS, 0);
 
 	/* Rx data rings */
@@ -7332,8 +7334,8 @@ char *dp_srng_get_str_from_hal_ring_type(enum hal_ring_type ring_type)
 		return "wbm2sw_release";
 	case TCL_DATA:
 		return "tcl_data";
-	case TCL_CMD:
-		return "tcl_cmd";
+	case TCL_CMD_CREDIT:
+		return "tcl_cmd_credit";
 	case TCL_STATUS:
 		return "tcl_status";
 	case SW2WBM_RELEASE:

+ 4 - 4
dp/wifi3.0/dp_stats.c

@@ -4689,8 +4689,8 @@ void dp_print_soc_cfg_params(struct dp_soc *soc)
 		       soc_cfg_ctx->rx_defrag_min_timeout);
 	DP_PRINT_STATS("WBM release ring: %u ",
 		       soc_cfg_ctx->wbm_release_ring);
-	DP_PRINT_STATS("TCL CMD ring: %u ",
-		       soc_cfg_ctx->tcl_cmd_ring);
+	DP_PRINT_STATS("TCL CMD_CREDIT ring: %u ",
+		       soc_cfg_ctx->tcl_cmd_credit_ring);
 	DP_PRINT_STATS("TCL Status ring: %u ",
 		       soc_cfg_ctx->tcl_status_ring);
 	DP_PRINT_STATS("REO Reinject ring: %u ",
@@ -4903,8 +4903,8 @@ dp_print_ring_stats(struct dp_pdev *pdev)
 				    &pdev->soc->rx_rel_ring,
 				    WBM2SW_RELEASE);
 	dp_print_ring_stat_from_hal(pdev->soc,
-				    &pdev->soc->tcl_cmd_ring,
-				    TCL_CMD);
+				    &pdev->soc->tcl_cmd_credit_ring,
+				    TCL_CMD_CREDIT);
 	dp_print_ring_stat_from_hal(pdev->soc,
 				    &pdev->soc->tcl_status_ring,
 				    TCL_STATUS);

+ 3 - 2
dp/wifi3.0/dp_types.h

@@ -1014,8 +1014,9 @@ struct dp_soc {
 	/* Number of TCL data rings */
 	uint8_t num_tcl_data_rings;
 
-	/* TCL command ring */
-	struct dp_srng tcl_cmd_ring;
+	/* TCL CMD_CREDIT ring */
+	/* It is used as credit based ring on QCN9000 else command ring */
+	struct dp_srng tcl_cmd_credit_ring;
 
 	/* TCL command status ring */
 	struct dp_srng tcl_status_ring;

+ 1 - 1
hal/wifi3.0/hal_api.h

@@ -552,7 +552,7 @@ enum hal_ring_type {
 	REO_CMD = 3,
 	REO_STATUS = 4,
 	TCL_DATA = 5,
-	TCL_CMD = 6,
+	TCL_CMD_CREDIT = 6,
 	TCL_STATUS = 7,
 	CE_SRC = 8,
 	CE_DST = 9,

+ 10 - 10
wlan_cfg/cfg_dp.h

@@ -188,9 +188,9 @@
 #define WLAN_CFG_WBM_RELEASE_RING_SIZE_MIN 64
 #define WLAN_CFG_WBM_RELEASE_RING_SIZE_MAX 64
 
-#define WLAN_CFG_TCL_CMD_RING_SIZE 32
-#define WLAN_CFG_TCL_CMD_RING_SIZE_MIN 32
-#define WLAN_CFG_TCL_CMD_RING_SIZE_MAX 32
+#define WLAN_CFG_TCL_CMD_CREDIT_RING_SIZE 32
+#define WLAN_CFG_TCL_CMD_CREDIT_RING_SIZE_MIN 32
+#define WLAN_CFG_TCL_CMD_CREDIT_RING_SIZE_MAX 32
 
 #define WLAN_CFG_TCL_STATUS_RING_SIZE 32
 #define WLAN_CFG_TCL_STATUS_RING_SIZE_MIN 32
@@ -550,12 +550,12 @@
 		WLAN_CFG_WBM_RELEASE_RING_SIZE, \
 		CFG_VALUE_OR_DEFAULT, "DP WBM Release Ring")
 
-#define CFG_DP_TCL_CMD_RING \
-		CFG_INI_UINT("dp_tcl_cmd_ring", \
-		WLAN_CFG_TCL_CMD_RING_SIZE_MIN, \
-		WLAN_CFG_TCL_CMD_RING_SIZE_MAX, \
-		WLAN_CFG_TCL_CMD_RING_SIZE, \
-		CFG_VALUE_OR_DEFAULT, "DP TCL command ring")
+#define CFG_DP_TCL_CMD_CREDIT_RING \
+		CFG_INI_UINT("dp_tcl_cmd_credit_ring", \
+		WLAN_CFG_TCL_CMD_CREDIT_RING_SIZE_MIN, \
+		WLAN_CFG_TCL_CMD_CREDIT_RING_SIZE_MAX, \
+		WLAN_CFG_TCL_CMD_CREDIT_RING_SIZE, \
+		CFG_VALUE_OR_DEFAULT, "DP TCL Cmd_Credit ring")
 
 #define CFG_DP_TCL_STATUS_RING \
 		CFG_INI_UINT("dp_tcl_status_ring",\
@@ -825,7 +825,7 @@
 		CFG(CFG_DP_TCP_UDP_CKSUM_OFFLOAD) \
 		CFG(CFG_DP_DEFRAG_TIMEOUT_CHECK) \
 		CFG(CFG_DP_WBM_RELEASE_RING) \
-		CFG(CFG_DP_TCL_CMD_RING) \
+		CFG(CFG_DP_TCL_CMD_CREDIT_RING) \
 		CFG(CFG_DP_TCL_STATUS_RING) \
 		CFG(CFG_DP_REO_REINJECT_RING) \
 		CFG(CFG_DP_RX_RELEASE_RING) \

+ 5 - 5
wlan_cfg/wlan_cfg.c

@@ -342,7 +342,7 @@ void wlan_set_srng_cfg(struct wlan_srng_cfg **wlan_cfg)
 	g_wlan_srng_cfg[REO_CMD] = wlan_srng_default_cfg;
 	g_wlan_srng_cfg[REO_STATUS] = wlan_srng_default_cfg;
 	g_wlan_srng_cfg[TCL_DATA] = wlan_srng_default_cfg;
-	g_wlan_srng_cfg[TCL_CMD] = wlan_srng_default_cfg;
+	g_wlan_srng_cfg[TCL_CMD_CREDIT] = wlan_srng_default_cfg;
 	g_wlan_srng_cfg[TCL_STATUS] = wlan_srng_default_cfg;
 	g_wlan_srng_cfg[WBM_IDLE_LINK] = wlan_srng_default_cfg;
 	g_wlan_srng_cfg[SW2WBM_RELEASE] = wlan_srng_default_cfg;
@@ -516,8 +516,8 @@ wlan_cfg_soc_attach(struct cdp_ctrl_objmgr_psoc *psoc)
 
 	wlan_cfg_ctx->wbm_release_ring = cfg_get(psoc,
 						 CFG_DP_WBM_RELEASE_RING);
-	wlan_cfg_ctx->tcl_cmd_ring = cfg_get(psoc,
-					     CFG_DP_TCL_CMD_RING);
+	wlan_cfg_ctx->tcl_cmd_credit_ring = cfg_get(psoc,
+					     CFG_DP_TCL_CMD_CREDIT_RING);
 	wlan_cfg_ctx->tcl_status_ring = cfg_get(psoc,
 						CFG_DP_TCL_STATUS_RING);
 	wlan_cfg_ctx->reo_reinject_ring = cfg_get(psoc,
@@ -1068,9 +1068,9 @@ wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
 }
 
 int
-wlan_cfg_get_dp_soc_tcl_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
+wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg)
 {
-	return cfg->tcl_cmd_ring;
+	return cfg->tcl_cmd_credit_ring;
 }
 
 int

+ 5 - 5
wlan_cfg/wlan_cfg.h

@@ -143,7 +143,7 @@ struct wlan_srng_cfg {
  * @nss_cfg: nss configuration
  * @rx_defrag_min_timeout: rx defrag minimum timeout
  * @wbm_release_ring: wbm release ring size
- * @tcl_cmd_ring: tcl cmd ring size
+ * @tcl_cmd_credit_ring: tcl command/credit ring size
  * @tcl_status_ring: tcl status ring size
  * @reo_reinject_ring: reo reinject ring
  * @rx_release_ring: rx release ring size
@@ -241,7 +241,7 @@ struct wlan_cfg_dp_soc_ctxt {
 	int rx_defrag_min_timeout;
 	int reo_dst_ring_size;
 	int wbm_release_ring;
-	int tcl_cmd_ring;
+	int tcl_cmd_credit_ring;
 	int tcl_status_ring;
 	int reo_reinject_ring;
 	int rx_release_ring;
@@ -998,13 +998,13 @@ int
 wlan_cfg_get_dp_soc_wbm_release_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
 
 /*
- * wlan_cfg_get_dp_soc_tcl_cmd_ring_size - Get tcl_cmd_ring size
+ * wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size - Get command/credit ring size
  * @wlan_cfg_soc_ctx
  *
- * Return: tcl_cmd_ring size
+ * Return: tcl_cmd_credit_ring size
  */
 int
-wlan_cfg_get_dp_soc_tcl_cmd_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
+wlan_cfg_get_dp_soc_tcl_cmd_credit_ring_size(struct wlan_cfg_dp_soc_ctxt *cfg);
 
 /*
  * wlan_cfg_get_dp_soc_tcl_status_ring_size - Get tcl_status_ring size