Browse Source

qcacmn: Add support to get Rx contexts count for SOFTUMAC target

Add support to get number of Rx contexts for SOFTUMAC
based targets.

Change-Id: I71ee96e3230a198b82b0e633fbe67a8690097f74
CRs-Fixed: 3486660
Karthik Kantamneni 2 years ago
parent
commit
3987bb28f6
1 changed files with 15 additions and 0 deletions
  1. 15 0
      dp/wifi3.0/dp_main.c

+ 15 - 0
dp/wifi3.0/dp_main.c

@@ -364,6 +364,20 @@ static int dp_get_num_rx_contexts(struct cdp_soc_t *soc_hdl)
 	return num_rx_contexts;
 }
 #else
+#ifdef WLAN_SOFTUMAC_SUPPORT
+static int dp_get_num_rx_contexts(struct cdp_soc_t *soc_hdl)
+{
+	uint32_t rx_rings_config;
+	struct dp_soc *soc = (struct dp_soc *)soc_hdl;
+
+	rx_rings_config = wlan_cfg_get_rx_rings_mapping(soc->wlan_cfg_ctx);
+	/*
+	 * qdf_get_hweight32 prefer over qdf_get_hweight8 in case map is scaled
+	 * in future
+	 */
+	return qdf_get_hweight32(rx_rings_config);
+}
+#else
 static int dp_get_num_rx_contexts(struct cdp_soc_t *soc_hdl)
 {
 	int num_rx_contexts;
@@ -379,6 +393,7 @@ static int dp_get_num_rx_contexts(struct cdp_soc_t *soc_hdl)
 
 	return num_rx_contexts;
 }
+#endif /* WLAN_SOFTUMAC_SUPPORT */
 #endif
 
 #endif