xref: /wlan-driver/qca-wifi-host-cmn/wlan_cfg/wlan_init_cfg.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1 /*
2  * Copyright (c) 2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 #ifndef __WLAN_INIT_CFG_H
21 #define __WLAN_INIT_CFG_H
22 
23 /*
24  * Temporary place holders. These should come either from target config
25  * or platform configuration
26  */
27 #if defined(WLAN_MAX_PDEVS) && (WLAN_MAX_PDEVS == 1)
28 #define WLAN_CFG_DST_RING_CACHED_DESC 0
29 #define MAX_PDEV_CNT 1
30 
31 #ifdef CONFIG_BERYLLIUM
32 /* (8 REOs + 5 WBMs + 2 Near Full + 1 Error handling) */
33 #define WLAN_CFG_INT_NUM_CONTEXTS 18
34 #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 18
35 #else
36 #define WLAN_CFG_INT_NUM_CONTEXTS 7
37 #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 14
38 #endif
39 #define WLAN_CFG_RXDMA1_ENABLE 1
40 /*
41  * This mask defines how many transmit frames account for 1 NAPI work unit
42  * 0 means each tx completion is 1 unit
43  */
44 #define DP_TX_NAPI_BUDGET_DIV_MASK 0
45 
46 /* PPDU Stats Configuration - Configure bitmask for enabling tx ppdu tlv's */
47 #define DP_PPDU_TXLITE_STATS_BITMASK_CFG 0x3FFF
48 
49 #if defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_WCN6450)
50 #define NUM_RXDMA_STATUS_RINGS_PER_PDEV 1
51 #else
52 #define NUM_RXDMA_STATUS_RINGS_PER_PDEV 2
53 #endif
54 
55 #define NUM_RXDMA_RINGS_PER_PDEV 2
56 
57 #define DP_NUM_MACS_PER_PDEV 2
58 
59 /*Maximum Number of LMAC instances*/
60 #define MAX_NUM_LMAC_HW	2
61 #else
62 #ifdef DP_NO_CACHE_DESC_SUPPORT
63 #define WLAN_CFG_DST_RING_CACHED_DESC 0
64 #else
65 #define WLAN_CFG_DST_RING_CACHED_DESC 1
66 #endif
67 #define MAX_PDEV_CNT 3
68 #define WLAN_CFG_INT_NUM_CONTEXTS 16
69 #define WLAN_CFG_INT_NUM_CONTEXTS_MAX 16
70 #define NUM_RXDMA_RINGS_PER_PDEV 1
71 #define NUM_RXDMA_STATUS_RINGS_PER_PDEV 1
72 #define MAX_NUM_LMAC_HW	3
73 #define DP_NUM_MACS_PER_PDEV 1
74 
75 #endif
76 
77 /* Tx configuration */
78 #define MAX_LINK_DESC_BANKS 8
79 
80 #define MAX_REO_DEST_RINGS 8
81 #define MAX_TCL_DATA_RINGS 5
82 
83 #define MAX_RX_MAC_RINGS 2
84 
85 #define WBM2SW_TXCOMP_RING4_NUM 4
86 #endif /* __WLAN_INIT_CFG_H */
87