Browse Source

qcacmn: Check DBS capable to determine max_mac_rings

For 1x1 DBS case, host also need to configure max_mac_rings
as 2 and initialize each RX ring, currently host only consider
2x2 DBS case.

Check DBS capable instead of 2x2 DBS capable only.

Change-Id: Ic2d4fda9be245a3d0448b6b87ba8676f41d9187e
CRs-Fixed: 3129165
Jinwei Chen 3 years ago
parent
commit
a2f8cef72d
2 changed files with 10 additions and 27 deletions
  1. 1 1
      dp/inc/cdp_txrx_ops.h
  2. 9 26
      dp/wifi3.0/dp_main.c

+ 1 - 1
dp/inc/cdp_txrx_ops.h

@@ -1141,7 +1141,7 @@ struct ol_if_ops {
 				 uint8_t pdev_id,
 				 uint8_t *peer_mac,
 				 uint8_t *vdev_mac, enum wlan_op_mode opmode);
-	bool (*is_hw_dbs_2x2_capable)(struct wlan_objmgr_psoc *psoc);
+	bool (*is_hw_dbs_capable)(struct wlan_objmgr_psoc *psoc);
 	int (*peer_add_wds_entry)(struct cdp_ctrl_objmgr_psoc *soc,
 				  uint8_t vdev_id,
 				  uint8_t *peer_macaddr,

+ 9 - 26
dp/wifi3.0/dp_main.c

@@ -5811,7 +5811,6 @@ static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
 
 		if (pdev) {
 			int mac_id;
-			bool dbs_enable = 0;
 			int max_mac_rings =
 				 wlan_cfg_get_num_mac_rings
 				(pdev->wlan_cfg_ctx);
@@ -5828,29 +5827,10 @@ static QDF_STATUS dp_rxdma_ring_config(struct dp_soc *soc)
 					       .hal_srng,
 					       RXDMA_BUF);
 
-			if (soc->cdp_soc.ol_ops->
-				is_hw_dbs_2x2_capable) {
-				dbs_enable = soc->cdp_soc.ol_ops->
-					is_hw_dbs_2x2_capable(
-							(void *)soc->ctrl_psoc);
-			}
-
-			if (dbs_enable) {
-				QDF_TRACE(QDF_MODULE_ID_TXRX,
-				QDF_TRACE_LEVEL_ERROR,
-				FL("DBS enabled max_mac_rings %d"),
-					 max_mac_rings);
-			} else {
-				max_mac_rings = 1;
-				QDF_TRACE(QDF_MODULE_ID_TXRX,
-					 QDF_TRACE_LEVEL_ERROR,
-					 FL("DBS disabled, max_mac_rings %d"),
-					 max_mac_rings);
-			}
-
-			QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
-					 FL("pdev_id %d max_mac_rings %d"),
-					 pdev->pdev_id, max_mac_rings);
+			/* get max_mac_rings based on DBS */
+			dp_is_hw_dbs_enable(soc, &max_mac_rings);
+			dp_err("pdev_id %d max_mac_rings %d",
+			       pdev->pdev_id, max_mac_rings);
 
 			for (mac_id = 0; mac_id < max_mac_rings; mac_id++) {
 				int mac_for_pdev =
@@ -13572,11 +13552,14 @@ void dp_is_hw_dbs_enable(struct dp_soc *soc,
 				int *max_mac_rings)
 {
 	bool dbs_enable = false;
-	if (soc->cdp_soc.ol_ops->is_hw_dbs_2x2_capable)
+
+	if (soc->cdp_soc.ol_ops->is_hw_dbs_capable)
 		dbs_enable = soc->cdp_soc.ol_ops->
-		is_hw_dbs_2x2_capable((void *)soc->ctrl_psoc);
+				is_hw_dbs_capable((void *)soc->ctrl_psoc);
 
 	*max_mac_rings = (dbs_enable)?(*max_mac_rings):1;
+	dp_info("dbs_enable %d, max_mac_rings %d",
+		dbs_enable, *max_mac_rings);
 }
 
 qdf_export_symbol(dp_is_hw_dbs_enable);