Răsfoiți Sursa

Revert "qcacmn: Propagate config parameters to datapath"

This reverts commit 5a02b1f0531ec5b5bf68ea7566c8143097c1a9c2.

Change-Id: I52dcfb50998577df8b2b4807adcd322f91d21e45
Signed-off-by: Kalyan Muddala <[email protected]>
D Harilakshmi 7 ani în urmă
părinte
comite
5da9ee74b2
6 a modificat fișierele cu 55 adăugiri și 163 ștergeri
  1. 1 21
      dp/inc/cdp_txrx_cmn.h
  2. 0 22
      dp/inc/cdp_txrx_cmn_struct.h
  3. 0 2
      dp/inc/cdp_txrx_ops.h
  4. 32 107
      dp/wifi3.0/dp_main.c
  5. 19 1
      wlan_cfg/wlan_cfg.c
  6. 3 10
      wlan_cfg/wlan_cfg.h

+ 1 - 21
dp/inc/cdp_txrx_cmn.h

@@ -100,7 +100,7 @@ static inline struct cdp_pdev *cdp_pdev_attach
 {
 	if (soc->ops->cmn_drv_ops->txrx_pdev_attach)
 		return soc->ops->cmn_drv_ops->txrx_pdev_attach(soc, ctrl_pdev,
-						htc_pdev, osdev, pdev_id);
+			htc_pdev, osdev, pdev_id);
 	return NULL;
 }
 
@@ -559,24 +559,4 @@ static inline int cdp_set_pn_check(ol_txrx_soc_handle soc,
 	return 0;
 }
 
-/**
- * cdp_update_config_parameters(): function to propagate configuration
- *                                 parameters to datapath
- * @soc: opaque soc handle
- * @cfg: configuration handle
- *
- * Return: status: 0 - Success, non-zero: Failure
- */
-static inline
-QDF_STATUS cdp_update_config_parameters(ol_txrx_soc_handle soc,
-	struct cdp_config_params *cfg)
-{
-	struct cdp_soc *psoc = (struct cdp_soc *)soc;
-
-	if (soc->ops->cmn_drv_ops->update_config_parameters)
-		return soc->ops->cmn_drv_ops->update_config_parameters(psoc,
-									cfg);
-
-	return QDF_STATUS_SUCCESS;
-}
 #endif /* _CDP_TXRX_CMN_H_ */

+ 0 - 22
dp/inc/cdp_txrx_cmn_struct.h

@@ -1166,26 +1166,4 @@ struct cdp_rx_indication_msdu {
 		 resvd1:19;
 	struct cdp_rate_stats extd;
 };
-
-/**
- * struct cdp_config_params - Propagate configuration parameters to datapath
- * @tso_enable: Enable/Disable TSO
- * @lro_enable: Enable/Disable LRO
- * @flow_steering_enable: Enable/Disable Rx Hash
- * @tcp_Udp_ChecksumOffload: Enable/Disable tcp-Udp checksum Offload
- * @napi_enable: Enable/Disable Napi
- * @tx_flow_stop_queue_threshold: Value to Pause tx queues
- * @tx_flow_start_queue_offset: Available Tx descriptors to unpause
- *				tx queue
- */
-struct cdp_config_params {
-	unsigned int tso_enable:1;
-	unsigned int lro_enable:1;
-	unsigned int flow_steering_enable:1;
-	unsigned int tcp_udp_checksumoffload:1;
-	unsigned int napi_enable:1;
-	/* Set when QCA_LL_TX_FLOW_CONTROL_V2 is enabled */
-	uint8_t tx_flow_stop_queue_threshold;
-	uint8_t tx_flow_start_queue_offset;
-};
 #endif

+ 0 - 2
dp/inc/cdp_txrx_ops.h

@@ -213,8 +213,6 @@ struct cdp_cmn_ops {
 	void  (*set_pn_check)(struct cdp_vdev *vdev,
 		struct cdp_peer *peer_handle, enum cdp_sec_type sec_type,
 		 uint32_t *rx_pn);
-	QDF_STATUS (*update_config_parameters)(struct cdp_soc *psoc,
-			struct cdp_config_params *params);
 };
 
 struct cdp_ctrl_ops {

+ 32 - 107
dp/wifi3.0/dp_main.c

@@ -961,6 +961,38 @@ static QDF_STATUS dp_soc_interrupt_attach_poll(void *txrx_soc)
 
 	return QDF_STATUS_SUCCESS;
 }
+
+#ifdef CONFIG_MCL
+extern int con_mode_monitor;
+static QDF_STATUS dp_soc_interrupt_attach(void *txrx_soc);
+
+/*
+ * dp_soc_interrupt_attach_wrapper() - Register handlers for DP interrupts
+ * @txrx_soc: DP SOC handle
+ *
+ * Call the appropriate attach function based on the mode of operation.
+ * This is a WAR for enabling monitor mode.
+ *
+ * Return: 0 for success. nonzero for failure.
+ */
+static QDF_STATUS dp_soc_interrupt_attach_wrapper(void *txrx_soc)
+{
+	if (con_mode_monitor == QDF_GLOBAL_MONITOR_MODE) {
+		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
+			FL("Attach interrupts in Poll mode"));
+		return dp_soc_interrupt_attach_poll(txrx_soc);
+	} else {
+		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
+			FL("Attach interrupts in MSI mode"));
+		return dp_soc_interrupt_attach(txrx_soc);
+	}
+}
+#else
+static QDF_STATUS dp_soc_interrupt_attach_wrapper(void *txrx_soc)
+{
+	return dp_soc_interrupt_attach_poll(txrx_soc);
+}
+#endif
 #endif
 
 static void dp_soc_interrupt_map_calculate_integrated(struct dp_soc *soc,
@@ -1135,42 +1167,6 @@ static QDF_STATUS dp_soc_interrupt_attach(void *txrx_soc)
 	return QDF_STATUS_SUCCESS;
 }
 
-
-#ifdef CONFIG_MCL
-extern int con_mode_monitor;
-
-/*
- * dp_soc_interrupt_attach_wrapper() - Register handlers for DP interrupts
- * @txrx_soc: DP SOC handle
- *
- * Call the appropriate attach function based on the mode of operation.
- * This is a WAR for enabling monitor mode.
- *
- * Return: 0 for success. nonzero for failure.
- */
-static QDF_STATUS dp_soc_interrupt_attach_wrapper(void *txrx_soc)
-{
-	struct dp_soc *soc = (struct dp_soc *)txrx_soc;
-
-	if (!(soc->wlan_cfg_ctx->napi_enabled) ||
-	     con_mode_monitor == QDF_GLOBAL_MONITOR_MODE) {
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"%s: Poll mode", __func__);
-		return dp_soc_interrupt_attach_poll(txrx_soc);
-	} else {
-
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_DEBUG,
-			"%s: Interrupt  mode", __func__);
-		return dp_soc_interrupt_attach(txrx_soc);
-	}
-}
-#else
-static QDF_STATUS dp_soc_interrupt_attach_wrapper(void *txrx_soc)
-{
-	return dp_soc_interrupt_attach_poll(txrx_soc);
-}
-#endif
-
 /*
  * dp_soc_interrupt_detach() - Deregister any allocations done for interrupts
  * @txrx_soc: DP SOC handle
@@ -3745,7 +3741,6 @@ void dp_aggregate_vdev_stats(struct dp_vdev *vdev)
 	if (soc->cdp_soc.ol_ops->update_dp_stats)
 		soc->cdp_soc.ol_ops->update_dp_stats(vdev->pdev->osif_pdev,
 			&vdev->stats, vdev->vdev_id, UPDATE_VDEV_STATS);
-
 }
 
 /**
@@ -5034,17 +5029,6 @@ static void dp_txrx_path_stats(struct dp_soc *soc)
 			 pdev->stats.rx_ind_histogram.pkts_101_200);
 		DP_TRACE(FATAL, "   201+ Packets: %u",
 			 pdev->stats.rx_ind_histogram.pkts_201_plus);
-
-		DP_TRACE_STATS(ERROR, "%s: tso_enable: %u lro_enable: %u rx_hash: %u napi_enable: %u",
-			__func__,
-			pdev->soc->wlan_cfg_ctx->tso_enabled,
-			pdev->soc->wlan_cfg_ctx->lro_enabled,
-			pdev->soc->wlan_cfg_ctx->rx_hash,
-			pdev->soc->wlan_cfg_ctx->napi_enabled);
-		DP_TRACE_STATS(ERROR, "%s: Tx flow stop queue: %u tx flow start queue offset: %u",
-			__func__,
-			pdev->soc->wlan_cfg_ctx->tx_flow_stop_queue_threshold,
-			pdev->soc->wlan_cfg_ctx->tx_flow_start_queue_offset);
 	}
 }
 
@@ -5098,64 +5082,6 @@ static QDF_STATUS dp_txrx_dump_stats(void *psoc, uint16_t value)
 
 }
 
-#ifdef QCA_LL_TX_FLOW_CONTROL_V2
-/**
- * dp_update_flow_control_parameters() - API to store datapath
- *                            config parameters
- * @soc: soc handle
- * @cfg: ini parameter handle
- *
- * Return: void
- */
-static inline
-void dp_update_flow_control_parameters(struct dp_soc *soc,
-				struct cdp_config_params *params)
-{
-	soc->wlan_cfg_ctx->tx_flow_stop_queue_threshold =
-					params->tx_flow_stop_queue_threshold;
-	soc->wlan_cfg_ctx->tx_flow_start_queue_offset =
-					params->tx_flow_start_queue_offset;
-}
-#else
-static inline
-void dp_update_flow_control_parameters(struct dp_soc *soc,
-				struct cdp_config_params *params)
-{
-}
-#endif
-
-/**
- * dp_update_config_parameters() - API to store datapath
- *                            config parameters
- * @soc: soc handle
- * @cfg: ini parameter handle
- *
- * Return: status
- */
-static
-QDF_STATUS dp_update_config_parameters(struct cdp_soc *psoc,
-				struct cdp_config_params *params)
-{
-	struct dp_soc *soc = (struct dp_soc *)psoc;
-
-	if (!(soc)) {
-		QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
-				"%s: Invalid handle", __func__);
-		return QDF_STATUS_E_INVAL;
-	}
-
-	soc->wlan_cfg_ctx->tso_enabled = params->tso_enable;
-	soc->wlan_cfg_ctx->lro_enabled = params->lro_enable;
-	soc->wlan_cfg_ctx->rx_hash = params->flow_steering_enable;
-	soc->wlan_cfg_ctx->tcp_udp_checksumoffload =
-				params->tcp_udp_checksumoffload;
-	soc->wlan_cfg_ctx->napi_enabled = params->napi_enable;
-
-	dp_update_flow_control_parameters(soc, params);
-
-	return QDF_STATUS_SUCCESS;
-}
-
 static struct cdp_wds_ops dp_ops_wds = {
 	.vdev_set_wds = dp_vdev_set_wds,
 };
@@ -5241,7 +5167,6 @@ static struct cdp_cmn_ops dp_ops_cmn = {
 #endif
 	.txrx_intr_detach = dp_soc_interrupt_detach,
 	.set_pn_check = dp_set_pn_check_wifi3,
-	.update_config_parameters = dp_update_config_parameters,
 	/* TODO: Add other functions */
 };
 

+ 19 - 1
wlan_cfg/wlan_cfg.c

@@ -181,6 +181,11 @@
 #define WLAN_CFG_HTT_PKT_TYPE 2
 #define WLAN_CFG_MAX_PEER_ID 64
 
+#ifdef WLAN_RX_HASH
+#define WLAN_RX_HASH_ENABLE 1
+#else
+#define WLAN_RX_HASH_ENABLE 0
+#endif
 
 #ifdef CONFIG_MCL
 static const int tx_ring_mask[WLAN_CFG_INT_NUM_CONTEXTS] = {
@@ -324,6 +329,9 @@ struct wlan_cfg_dp_soc_ctxt *wlan_cfg_soc_attach()
 			rxdma2host_ring_mask[i];
 	}
 
+	wlan_cfg_ctx->rx_hash = WLAN_RX_HASH_ENABLE;
+	wlan_cfg_ctx->lro_enabled = WLAN_LRO_ENABLE;
+
 	/* This is default mapping and can be overridden by HW config
 	 * received from FW */
 	wlan_cfg_set_hw_macid(wlan_cfg_ctx, 0, 1);
@@ -667,7 +675,12 @@ int wlan_cfg_get_int_timer_threshold_other(struct wlan_cfg_dp_soc_ctxt *cfg)
  */
 int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
 {
-	return cfg->tx_flow_stop_queue_threshold;
+#ifdef QCA_WIFI_NAPIER_EMULATION
+	/* TODO remove this hack when INI hookup is ready */
+	return 15;
+#else
+	return cfg->tx_flow_stop_queue_th;
+#endif
 }
 
 /**
@@ -679,6 +692,11 @@ int wlan_cfg_get_tx_flow_stop_queue_th(struct wlan_cfg_dp_soc_ctxt *cfg)
  */
 int wlan_cfg_get_tx_flow_start_queue_offset(struct wlan_cfg_dp_soc_ctxt *cfg)
 {
+#ifdef QCA_WIFI_NAPIER_EMULATION
+	/* TODO remove this hack when INI hookup is ready */
+	return 10;
+#else
 	return cfg->tx_flow_start_queue_offset;
+#endif
 }
 #endif /* QCA_LL_TX_FLOW_CONTROL_V2 */

+ 3 - 10
wlan_cfg/wlan_cfg.h

@@ -62,7 +62,6 @@
 #define DP_NON_QOS_TID 16
 
 struct wlan_cfg_dp_pdev_ctxt;
-
 /**
  * struct wlan_cfg_dp_soc_ctxt - Configuration parameters for SoC (core TxRx)
  * @num_int_ctxts - Number of NAPI/Interrupt contexts to be registered for DP
@@ -91,11 +90,8 @@ struct wlan_cfg_dp_pdev_ctxt;
  * @int_reo_status_ring_mask - Bitmap of reo status ring interrupts mapped to each
  *                        NAPI/Intr context
  * @int_ce_ring_mask - Bitmap of CE interrupts mapped to each NAPI/Intr context
- * @lro_enabled - enable/disable lro feature
+ * @lro_enabled - is LRO enabled
  * @rx_hash - Enable hash based steering of rx packets
- * @tso_enabled - enable/disable tso feature
- * @napi_enabled - enable/disable interrupt mode for reaping tx and rx packets
- * @tcp_Udp_Checksumoffload - enable/disable checksum offload
  * @nss_cfg - nss configuration
  */
 struct wlan_cfg_dp_soc_ctxt {
@@ -132,13 +128,10 @@ struct wlan_cfg_dp_soc_ctxt {
 	int base_hw_macid;
 	bool lro_enabled;
 	bool rx_hash;
-	bool tso_enabled;
-	bool napi_enabled;
-	bool tcp_udp_checksumoffload;
 	int nss_cfg;
 #ifdef QCA_LL_TX_FLOW_CONTROL_V2
-	uint32_t tx_flow_stop_queue_threshold;
-	uint32_t tx_flow_start_queue_offset;
+	int tx_flow_stop_queue_th;
+	int tx_flow_start_queue_offset;
 #endif
 };