1 /*
2  * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
3  * Copyright (c) 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_POLICY_MGR_TABLES_2X2_5G_1X1_2G_DBS_H
21 #define __WLAN_POLICY_MGR_TABLES_2X2_5G_1X1_2G_DBS_H
22 
23 #include "wlan_policy_mgr_api.h"
24 
25 /*
26  * next_action_two_connection_table - table which provides next
27  * action while a new connection is coming up, with one
28  * connection already in the system
29  */
30 static policy_mgr_next_action_two_connection_table_type
31 	pm_next_action_two_connection_dbs_2x2_5g_1x1_2g_table = {
32 	[PM_STA_24_1x1] = {PM_NOP,		PM_DBS1},
33 	[PM_STA_24_2x2] = {PM_NOP,		PM_DBS1},
34 	[PM_STA_5_1x1] = {PM_DBS1,		PM_NOP},
35 	[PM_STA_5_2x2] = {PM_DBS1,		PM_NOP},
36 	[PM_P2P_CLI_24_1x1] = {PM_NOP,	        PM_DBS1},
37 	[PM_P2P_CLI_24_2x2] = {PM_NOP,	        PM_DBS1},
38 	[PM_P2P_CLI_5_1x1] = {PM_DBS1,		PM_NOP},
39 	[PM_P2P_CLI_5_2x2] = {PM_DBS1,		PM_NOP},
40 	[PM_P2P_GO_24_1x1] = {PM_NOP,		PM_DBS1},
41 	[PM_P2P_GO_24_2x2] = {PM_NOP,		PM_DBS1_DOWNGRADE},
42 	[PM_P2P_GO_5_1x1] = {PM_DBS1,		PM_NOP},
43 	[PM_P2P_GO_5_2x2] = {PM_DBS1,		PM_NOP},
44 	[PM_SAP_24_1x1] = {PM_NOP,		PM_DBS1},
45 	[PM_SAP_24_2x2] = {PM_NOP,		PM_DBS1_DOWNGRADE},
46 	[PM_SAP_5_1x1] = {PM_DBS1,		PM_NOP},
47 	[PM_SAP_5_2x2] = {PM_DBS1,		PM_NOP},
48 };
49 
50 /*
51  * next_action_three_connection_table - table which provides next
52  * action while a new connection is coming up, with two
53  * connections already in the system
54  */
55 static policy_mgr_next_action_three_connection_table_type
56 	pm_next_action_three_connection_dbs_2x2_5g_1x1_2g_table = {
57 	[PM_STA_SAP_SCC_24_1x1] = {PM_NOP, PM_DBS1},
58 	[PM_STA_SAP_SCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
59 	[PM_STA_SAP_MCC_24_1x1] = {PM_NOP, PM_DBS1},
60 	[PM_STA_SAP_MCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
61 	[PM_STA_SAP_SCC_5_1x1] = {PM_DBS1, PM_NOP},
62 	[PM_STA_SAP_SCC_5_2x2] = {PM_DBS1, PM_NOP},
63 	[PM_STA_SAP_MCC_5_1x1] = {PM_DBS1, PM_NOP},
64 	[PM_STA_SAP_MCC_5_2x2] = {PM_DBS1, PM_NOP},
65 	[PM_STA_SAP_MCC_24_5_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
66 	[PM_STA_SAP_MCC_24_5_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
67 	[PM_STA_SAP_DBS_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
68 	[PM_STA_SAP_DBS_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
69 
70 	[PM_STA_P2P_GO_SCC_24_1x1] = {PM_NOP, PM_DBS1},
71 	[PM_STA_P2P_GO_SCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
72 	[PM_STA_P2P_GO_MCC_24_1x1] = {PM_NOP, PM_DBS1},
73 	[PM_STA_P2P_GO_MCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
74 	[PM_STA_P2P_GO_SCC_5_1x1] = {PM_DBS1, PM_NOP},
75 	[PM_STA_P2P_GO_SCC_5_2x2] = {PM_DBS1, PM_NOP},
76 	[PM_STA_P2P_GO_MCC_5_1x1] = {PM_DBS1, PM_NOP},
77 	[PM_STA_P2P_GO_MCC_5_2x2] = {PM_DBS1, PM_NOP},
78 	[PM_STA_P2P_GO_MCC_24_5_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
79 	[PM_STA_P2P_GO_MCC_24_5_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
80 	[PM_STA_P2P_GO_DBS_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
81 	[PM_STA_P2P_GO_DBS_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
82 
83 	[PM_STA_P2P_CLI_SCC_24_1x1] = {PM_NOP, PM_DBS1},
84 	[PM_STA_P2P_CLI_SCC_24_2x2] = {PM_NOP, PM_DBS1},
85 	[PM_STA_P2P_CLI_MCC_24_1x1] = {PM_NOP, PM_DBS1},
86 	[PM_STA_P2P_CLI_MCC_24_2x2] = {PM_NOP, PM_DBS1},
87 	[PM_STA_P2P_CLI_SCC_5_1x1] = {PM_DBS1, PM_NOP},
88 	[PM_STA_P2P_CLI_SCC_5_2x2] = {PM_DBS1, PM_NOP},
89 	[PM_STA_P2P_CLI_MCC_5_1x1] = {PM_DBS1, PM_NOP},
90 	[PM_STA_P2P_CLI_MCC_5_2x2] = {PM_DBS1, PM_NOP},
91 	[PM_STA_P2P_CLI_MCC_24_5_1x1] = {PM_DBS1, PM_DBS1},
92 	[PM_STA_P2P_CLI_MCC_24_5_2x2] = {PM_DBS1, PM_DBS1},
93 	[PM_STA_P2P_CLI_DBS_1x1] = {PM_DBS1, PM_DBS1},
94 	[PM_STA_P2P_CLI_DBS_2x2] = {PM_DBS1, PM_DBS1},
95 
96 	[PM_P2P_GO_P2P_CLI_SCC_24_1x1] = {PM_NOP, PM_DBS1},
97 	[PM_P2P_GO_P2P_CLI_SCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
98 	[PM_P2P_GO_P2P_CLI_MCC_24_1x1] = {PM_NOP, PM_DBS1},
99 	[PM_P2P_GO_P2P_CLI_MCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
100 	[PM_P2P_GO_P2P_CLI_SCC_5_1x1] = {PM_DBS1, PM_NOP},
101 	[PM_P2P_GO_P2P_CLI_SCC_5_2x2] = {PM_DBS1, PM_NOP},
102 	[PM_P2P_GO_P2P_CLI_MCC_5_1x1] = {PM_DBS1, PM_NOP},
103 	[PM_P2P_GO_P2P_CLI_MCC_5_2x2] = {PM_DBS1, PM_NOP},
104 	[PM_P2P_GO_P2P_CLI_MCC_24_5_1x1] = {PM_DBS1_DOWNGRADE,
105 					    PM_DBS1_DOWNGRADE},
106 	[PM_P2P_GO_P2P_CLI_MCC_24_5_2x2] = {PM_DBS1_DOWNGRADE,
107 					    PM_DBS1_DOWNGRADE},
108 	[PM_P2P_GO_P2P_CLI_DBS_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
109 	[PM_P2P_GO_P2P_CLI_DBS_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
110 
111 	[PM_P2P_GO_SAP_SCC_24_1x1] = {PM_NOP, PM_DBS1},
112 	[PM_P2P_GO_SAP_SCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
113 	[PM_P2P_GO_SAP_MCC_24_1x1] = {PM_NOP, PM_DBS1},
114 	[PM_P2P_GO_SAP_MCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
115 	[PM_P2P_GO_SAP_SCC_5_1x1] = {PM_DBS1, PM_NOP},
116 	[PM_P2P_GO_SAP_SCC_5_2x2] = {PM_DBS1, PM_NOP},
117 	[PM_P2P_GO_SAP_MCC_5_1x1] = {PM_DBS1, PM_NOP},
118 	[PM_P2P_GO_SAP_MCC_5_2x2] = {PM_DBS1, PM_NOP},
119 	[PM_P2P_GO_SAP_MCC_24_5_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
120 	[PM_P2P_GO_SAP_MCC_24_5_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
121 	[PM_P2P_GO_SAP_DBS_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
122 	[PM_P2P_GO_SAP_DBS_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
123 
124 	[PM_P2P_CLI_SAP_SCC_24_1x1] = {PM_NOP, PM_DBS1},
125 	[PM_P2P_CLI_SAP_SCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
126 	[PM_P2P_CLI_SAP_MCC_24_1x1] = {PM_NOP, PM_DBS1},
127 	[PM_P2P_CLI_SAP_MCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
128 	[PM_P2P_CLI_SAP_SCC_5_1x1] = {PM_DBS1, PM_NOP},
129 	[PM_P2P_CLI_SAP_SCC_5_2x2] = {PM_DBS1, PM_NOP},
130 	[PM_P2P_CLI_SAP_MCC_5_1x1] = {PM_DBS1, PM_NOP},
131 	[PM_P2P_CLI_SAP_MCC_5_2x2] = {PM_DBS1, PM_NOP},
132 	[PM_P2P_CLI_SAP_MCC_24_5_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
133 	[PM_P2P_CLI_SAP_MCC_24_5_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
134 	[PM_P2P_CLI_SAP_DBS_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
135 	[PM_P2P_CLI_SAP_DBS_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
136 
137 	[PM_SAP_SAP_SCC_24_1x1] = {PM_NOP, PM_DBS1},
138 	[PM_SAP_SAP_SCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
139 	[PM_SAP_SAP_MCC_24_1x1] = {PM_NOP, PM_DBS1},
140 	[PM_SAP_SAP_MCC_24_2x2] = {PM_NOP, PM_DBS1_DOWNGRADE},
141 	[PM_SAP_SAP_SCC_5_1x1] = {PM_DBS1, PM_NOP},
142 	[PM_SAP_SAP_SCC_5_2x2] = {PM_DBS1, PM_NOP},
143 	[PM_SAP_SAP_MCC_5_1x1] = {PM_DBS1, PM_NOP},
144 	[PM_SAP_SAP_MCC_5_2x2] = {PM_DBS1, PM_NOP},
145 	[PM_SAP_SAP_MCC_24_5_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
146 	[PM_SAP_SAP_MCC_24_5_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
147 	[PM_SAP_SAP_DBS_1x1] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
148 	[PM_SAP_SAP_DBS_2x2] = {PM_DBS1_DOWNGRADE, PM_DBS1_DOWNGRADE},
149 };
150 
151 #endif
152