Эх сурвалжийг харах

qcacmn: Use module specific kbuilds for config params

write module specific macros inside module/config and
use these inc files inside the kbuild of the module using those
macros.

Change-Id: Ide18770973f35d0e5c45e2474b24256107f40d8c
Akshay Kosigi 5 жил өмнө
parent
commit
fb0877f2d6

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

@@ -8922,7 +8922,7 @@ static struct cdp_raw_ops dp_ops_raw = {
 	/* TODO */
 };
 
-#ifdef CONFIG_WIN
+#ifdef PEER_FLOW_CONTROL
 static struct cdp_pflow_ops dp_ops_pflow = {
 	dp_tx_flow_ctrl_configure_pdev,
 };
@@ -9203,9 +9203,9 @@ static struct cdp_ops dp_txrx_ops = {
 	.host_stats_ops = &dp_ops_host_stats,
 	.wds_ops = &dp_ops_wds,
 	.raw_ops = &dp_ops_raw,
-#ifdef CONFIG_WIN
+#ifdef PEER_FLOW_CONTROL
 	.pflow_ops = &dp_ops_pflow,
-#endif /* CONFIG_WIN */
+#endif /* PEER_FLOW_CONTROL */
 #ifndef CONFIG_WIN
 	.misc_ops = &dp_ops_misc,
 	.cfg_ops = &dp_ops_cfg,

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

@@ -3834,11 +3834,9 @@ void dp_htt_stats_print_tag(uint8_t tag_type, uint32_t *tag_buf)
 		dp_print_tx_tid_stats_tlv(tag_buf);
 		break;
 
-#ifdef CONFIG_WIN
 	case HTT_STATS_TX_TID_DETAILS_V1_TAG:
 		dp_print_tx_tid_stats_v1_tlv(tag_buf);
 		break;
-#endif
 
 	case HTT_STATS_RX_TID_DETAILS_TAG:
 		dp_print_rx_tid_stats_tlv(tag_buf);

+ 0 - 44
wlan_cfg/cfg_dp.h

@@ -46,9 +46,6 @@
 #define WLAN_CFG_TX_FLOW_START_QUEUE_OFFSET 0
 #define WLAN_CFG_TX_FLOW_STOP_QUEUE_TH 0
 #endif
-#else
-#define WLAN_CFG_TX_FLOW_START_QUEUE_OFFSET 0
-#define WLAN_CFG_TX_FLOW_STOP_QUEUE_TH 0
 #endif
 
 #define WLAN_CFG_PER_PDEV_TX_RING_MIN 0
@@ -88,47 +85,6 @@
 #define WLAN_CFG_INT_TIMER_THRESHOLD_TX 8
 #define WLAN_CFG_INT_TIMER_THRESHOLD_RX 8
 #define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER 8
-#else
-#define WLAN_CFG_PER_PDEV_TX_RING 0
-#define WLAN_CFG_IPA_UC_TX_BUF_SIZE 0
-#define WLAN_CFG_IPA_UC_TX_PARTITION_BASE 0
-#define WLAN_CFG_IPA_UC_RX_IND_RING_COUNT 0
-#endif
-
-#ifdef CONFIG_WIN
-#define WLAN_CFG_PER_PDEV_RX_RING 0
-#define WLAN_CFG_PER_PDEV_LMAC_RING 1
-#define WLAN_LRO_ENABLE 0
-#define WLAN_CFG_MAC_PER_TARGET 3
-/* Tx Descriptor and Tx Extension Descriptor pool sizes */
-#ifndef QCA_WIFI_QCA8074_VP
-#define WLAN_CFG_NUM_TX_DESC  0x320000
-#else
-#define WLAN_CFG_NUM_TX_DESC  (8 << 10)
-#endif
-#define WLAN_CFG_NUM_TX_EXT_DESC 0x80000
-
-/* Interrupt Mitigation - Batch threshold in terms of number of frames */
-#define WLAN_CFG_INT_BATCH_THRESHOLD_TX 256
-#define WLAN_CFG_INT_BATCH_THRESHOLD_RX 128
-#define WLAN_CFG_INT_BATCH_THRESHOLD_OTHER 1
-
-/* Interrupt Mitigation - Timer threshold in us */
-#define WLAN_CFG_INT_TIMER_THRESHOLD_TX 1000
-#define WLAN_CFG_INT_TIMER_THRESHOLD_RX 500
-#define WLAN_CFG_INT_TIMER_THRESHOLD_OTHER 1000
-
-#define WLAN_CFG_TX_RING_SIZE 512
-
-/* Size the completion ring using following 2 parameters
- * - NAPI schedule latency (assuming 1 netdev competing for CPU)
- *   = 20 ms (2 jiffies)
- * - Worst case PPS requirement = 400K PPS
- *
- * Ring size = 20 * 400 = 8000
- * 8192 is nearest power of 2
- */
-#define WLAN_CFG_TX_COMP_RING_SIZE 0x80000
 #endif
 
 #define WLAN_CFG_PER_PDEV_RX_RING_MIN 0

+ 30 - 0
wlan_cfg/config/ap_device.inc

@@ -0,0 +1,30 @@
+COPTS += -DWLAN_CFG_PER_PDEV_TX_RING=0
+COPTS += -DWLAN_CFG_IPA_UC_TX_BUF_SIZE=0
+COPTS += -DWLAN_CFG_IPA_UC_TX_PARTITION_BASE=0
+COPTS += -DWLAN_CFG_IPA_UC_RX_IND_RING_COUNT=0
+COPTS += -DWLAN_CFG_PER_PDEV_RX_RING=0
+COPTS += -DWLAN_CFG_PER_PDEV_LMAC_RING=1
+COPTS += -DWLAN_LRO_ENABLE=0
+COPTS += -DWLAN_CFG_NUM_TX_EXT_DESC=0x80000
+COPTS += -DWLAN_CFG_INT_BATCH_THRESHOLD_TX=256
+COPTS += -DWLAN_CFG_INT_BATCH_THRESHOLD_RX=128
+COPTS += -DWLAN_CFG_INT_BATCH_THRESHOLD_OTHER=1
+COPTS += -DWLAN_CFG_INT_TIMER_THRESHOLD_TX=1000
+COPTS += -DWLAN_CFG_INT_TIMER_THRESHOLD_RX=500
+COPTS += -DWLAN_CFG_INT_TIMER_THRESHOLD_OTHER=1000
+COPTS += -DWLAN_CFG_TX_RING_SIZE=512
+COPTS += -DWLAN_CFG_TX_COMP_RING_SIZE=0x80000
+COPTS += -DWLAN_CFG_TX_FLOW_START_QUEUE_OFFSET=0
+COPTS += -DWLAN_CFG_TX_FLOW_STOP_QUEUE_TH=0
+COPTS += -DWLAN_CFG_RXDMA1_ENABLE=1
+COPTS += -DDP_PPDU_TXLITE_STATS_BITMASK_CFG=0xFFFF
+COPTS += -DDP_TX_NAPI_BUDGET_DIV_MASK=0xFFFF
+COPTS += -DCONFIG_PROCESS_RX_STATUS=0
+COPTS += -DCONFIG_PROCESS_TX_STATUS=0
+COPTS += -DWLAN_CFG_MAC_PER_TARGET=3
+ifeq ($(strip ${QCA_WIFI_QCA8074_VP}),1)
+COPTS+= -DWLAN_CFG_NUM_TX_DESC=0x2000
+else
+COPTS+= -DWLAN_CFG_NUM_TX_DESC=0x320000
+endif
+

+ 0 - 10
wlan_cfg/wlan_cfg.h

@@ -42,16 +42,6 @@
 #define WLAN_CFG_DST_RING_CACHED_DESC 1
 #define MAX_PDEV_CNT 3
 #define WLAN_CFG_INT_NUM_CONTEXTS 11
-#define WLAN_CFG_RXDMA1_ENABLE 1
-/*
- * This mask defines how many transmit frames account for 1 NAPI work unit
- * 0xFFFF means each 64K tx frame completions account for 1 unit of NAPI budget
- */
-#define DP_TX_NAPI_BUDGET_DIV_MASK 0xFFFF
-
-/* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */
-#define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0xFFFF
-
 #define NUM_RXDMA_RINGS_PER_PDEV 1
 #endif