qcacld-3.0: Configure CFG_TGT_NUM_MSDU_DESC through driver config

Configure CFG_TGT_NUM_MSDU_DESC through driver config.

Change-Id: I9667414e526fa7e3e735a209b074db4777c6e86e
CRs-Fixed: 2463898
diff --git a/configs/default_defconfig b/configs/default_defconfig
index 9241cb2..5734ae8 100644
--- a/configs/default_defconfig
+++ b/configs/default_defconfig
@@ -93,6 +93,7 @@
 	CONFIG_WLAN_SYNC_TSF_PLUS := y
 	CONFIG_WLAN_SYNC_TSF_PLUS_NOIRQ := y
 	CONFIG_RX_PERFORMANCE := y
+	CONFIG_TGT_NUM_MSDU_DESC := 900
 endif
 CONFIG_WLAN_FEATURE_MBSSID := y
 #Flag to enable Legacy Fast Roaming2(LFR2)
diff --git a/configs/qcs40x.snoc.perf_defconfig b/configs/qcs40x.snoc.perf_defconfig
index 0229172..b7f84ed 100644
--- a/configs/qcs40x.snoc.perf_defconfig
+++ b/configs/qcs40x.snoc.perf_defconfig
@@ -63,6 +63,7 @@
 CONFIG_DEBUG_RX_RING_BUFFER := n
 CONFIG_RX_PERFORMANCE := y
 CONFIG_QCS403_MEM_OPTIMIZE := y
+CONFIG_TGT_NUM_MSDU_DESC := 900
 
 ifeq ($(CONFIG_INET_LRO), y)
 CONFIG_WLAN_LRO := y
diff --git a/core/dp/ol/inc/ol_cfg.h b/core/dp/ol/inc/ol_cfg.h
index 79ef270..b58dbd8 100644
--- a/core/dp/ol/inc/ol_cfg.h
+++ b/core/dp/ol/inc/ol_cfg.h
@@ -49,12 +49,6 @@
 #define MAX_THROUGHPUT 800
 #endif
 
-#ifdef QCA_LL_TX_FLOW_CONTROL_V2
-#define TARGET_TX_CREDIT CFG_TGT_NUM_MSDU_DESC
-#else
-#define TARGET_TX_CREDIT 900
-#endif
-
 /* Throttle period Different level Duty Cycle values*/
 #define THROTTLE_DUTY_CYCLE_LEVEL0 (0)
 #define THROTTLE_DUTY_CYCLE_LEVEL1 (50)
diff --git a/core/dp/txrx/ol_cfg.c b/core/dp/txrx/ol_cfg.c
index 2c8fa0d..bcadadc 100644
--- a/core/dp/txrx/ol_cfg.c
+++ b/core/dp/txrx/ol_cfg.c
@@ -143,7 +143,7 @@
 	cfg_ctx->max_thruput_mbps = MAX_THROUGHPUT;
 	cfg_ctx->max_nbuf_frags = 1;
 	cfg_ctx->vow_config = vow_config;
-	cfg_ctx->target_tx_credit = TARGET_TX_CREDIT;
+	cfg_ctx->target_tx_credit = CFG_TGT_NUM_MSDU_DESC;
 	cfg_ctx->throttle_period_ms = 40;
 	cfg_ctx->dutycycle_level[0] = THROTTLE_DUTY_CYCLE_LEVEL0;
 	cfg_ctx->dutycycle_level[1] = THROTTLE_DUTY_CYCLE_LEVEL1;