bff431c52d05d904aebfae4906557002f8b2e14f
[openwrt/staging/ynezz.git] /
1 From 7837219f354524f6c2c9332a6a5aa616c28f53a9 Mon Sep 17 00:00:00 2001
2 From: Yangbo Lu <yangbo.lu@nxp.com>
3 Date: Thu, 20 Aug 2020 18:38:49 +0800
4 Subject: [PATCH] sdk_fman: fix CONFIG_COMPAT leak during headers installing
5
6 This patch is to fix CONFIG_COMPAT leak during headers installing
7 by replacing CONFIG_COMPAT kernel option with FM_COMPAT instead.
8
9 Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
10 ---
11 .../net/ethernet/freescale/sdk_fman/ncsw_config.mk | 5 ++
12 include/uapi/linux/fmd/Peripherals/fm_ioctls.h | 16 ++---
13 include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h | 72 +++++++++++-----------
14 .../uapi/linux/fmd/Peripherals/fm_port_ioctls.h | 14 ++---
15 .../uapi/linux/fmd/Peripherals/fm_test_ioctls.h | 4 +-
16 5 files changed, 58 insertions(+), 53 deletions(-)
17
18 --- a/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk
19 +++ b/drivers/net/ethernet/freescale/sdk_fman/ncsw_config.mk
20 @@ -44,6 +44,11 @@ ifdef CONFIG_FMAN_ARM
21 ccflags-y += -I$(FMAN)/inc/integrations/LS1043
22 endif
23
24 +# FM_COMPAT is used in kernel headers in case of kernel option leaking
25 +ifeq ("$(CONFIG_COMPAT)", "y")
26 +ccflags-y += -DFM_COMPAT
27 +endif
28 +
29 ccflags-y += -I$(FMAN)/src/inc
30 ccflags-y += -I$(FMAN)/src/inc/system
31 ccflags-y += -I$(FMAN)/src/inc/wrapper
32 --- a/include/uapi/linux/fmd/Peripherals/fm_ioctls.h
33 +++ b/include/uapi/linux/fmd/Peripherals/fm_ioctls.h
34 @@ -434,7 +434,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
35
36 @Retval Handle to FM VSP object, or NULL for Failure.
37 *//***************************************************************************/
38 -#if defined(CONFIG_COMPAT)
39 +#if defined(FM_COMPAT)
40 #define FM_IOC_VSP_CONFIG_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_IOC_NUM(8), ioc_compat_fm_vsp_params_t)
41 #endif
42 #define FM_IOC_VSP_CONFIG _IOWR(FM_IOC_TYPE_BASE, FM_IOC_NUM(8), ioc_fm_vsp_params_t)
43 @@ -448,7 +448,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
44
45 @Return E_OK on success; Error code otherwise.
46 *//***************************************************************************/
47 -#if defined(CONFIG_COMPAT)
48 +#if defined(FM_COMPAT)
49 #define FM_IOC_VSP_INIT_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(9), ioc_compat_fm_obj_t)
50 #endif
51 #define FM_IOC_VSP_INIT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(9), ioc_fm_obj_t)
52 @@ -464,7 +464,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
53
54 @Return E_OK on success; Error code otherwise.
55 *//***************************************************************************/
56 -#if defined(CONFIG_COMPAT)
57 +#if defined(FM_COMPAT)
58 #define FM_IOC_VSP_FREE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(10), ioc_compat_fm_obj_t)
59 #endif
60 #define FM_IOC_VSP_FREE _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(10), ioc_fm_obj_t)
61 @@ -482,7 +482,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
62
63 @Cautions Allowed only following FM_VSP_Config() and before FM_VSP_Init().
64 *//***************************************************************************/
65 -#if defined(CONFIG_COMPAT)
66 +#if defined(FM_COMPAT)
67 #define FM_IOC_VSP_CONFIG_POOL_DEPLETION_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(11), ioc_compat_fm_buf_pool_depletion_params_t)
68 #endif
69 #define FM_IOC_VSP_CONFIG_POOL_DEPLETION _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(11), ioc_fm_buf_pool_depletion_params_t)
70 @@ -512,7 +512,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
71
72 @Cautions Allowed only following FM_VSP_Config() and before FM_VSP_Init().
73 *//***************************************************************************/
74 -#if defined(CONFIG_COMPAT)
75 +#if defined(FM_COMPAT)
76 #define FM_IOC_VSP_CONFIG_BUFFER_PREFIX_CONTENT_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(12), ioc_compat_fm_buffer_prefix_content_params_t)
77 #endif
78 #define FM_IOC_VSP_CONFIG_BUFFER_PREFIX_CONTENT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(12), ioc_fm_buffer_prefix_content_params_t)
79 @@ -530,7 +530,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
80
81 @Cautions Allowed only following FM_VSP_Config() and before FM_VSP_Init().
82 *//***************************************************************************/
83 -#if defined(CONFIG_COMPAT)
84 +#if defined(FM_COMPAT)
85 #define FM_IOC_VSP_CONFIG_NO_SG_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(13), ioc_compat_fm_vsp_config_no_sg_params_t)
86 #endif
87 #define FM_IOC_VSP_CONFIG_NO_SG _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(13), ioc_fm_vsp_config_no_sg_params_t)
88 @@ -554,7 +554,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
89
90 @Cautions Allowed only following FM_VSP_Init().
91 *//***************************************************************************/
92 -#if defined(CONFIG_COMPAT)
93 +#if defined(FM_COMPAT)
94 #define FM_IOC_VSP_GET_BUFFER_PRS_RESULT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_IOC_NUM(14), ioc_compat_fm_vsp_prs_result_params_t)
95 #endif
96 #define FM_IOC_VSP_GET_BUFFER_PRS_RESULT _IOWR(FM_IOC_TYPE_BASE, FM_IOC_NUM(14), ioc_fm_vsp_prs_result_params_t)
97 @@ -612,7 +612,7 @@ typedef struct ioc_fm_ctrl_mon_counters_
98
99 @Cautions Allowed only following FM_Init().
100 *//***************************************************************************/
101 -#if defined(CONFIG_COMPAT)
102 +#if defined(FM_COMPAT)
103 #define FM_IOC_CTRL_MON_GET_COUNTERS_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(17), ioc_compat_fm_ctrl_mon_counters_params_t)
104 #endif
105 #define FM_IOC_CTRL_MON_GET_COUNTERS _IOW(FM_IOC_TYPE_BASE, FM_IOC_NUM(17), ioc_fm_ctrl_mon_counters_params_t)
106 --- a/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
107 +++ b/include/uapi/linux/fmd/Peripherals/fm_pcd_ioctls.h
108 @@ -312,7 +312,7 @@ typedef struct ioc_fm_pcd_kg_dflt_value_
109
110 @Cautions Allowed only when PCD is disabled.
111 *//***************************************************************************/
112 -#if defined(CONFIG_COMPAT)
113 +#if defined(FM_COMPAT)
114 #define FM_PCD_IOC_PRS_LOAD_SW_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(3), ioc_compat_fm_pcd_prs_sw_params_t)
115 #endif
116 #define FM_PCD_IOC_PRS_LOAD_SW _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(3), ioc_fm_pcd_prs_sw_params_t)
117 @@ -385,7 +385,7 @@ typedef struct ioc_fm_pcd_kg_dflt_value_
118
119 @Cautions Allowed only following FM_PCD_Init() & FM_PCD_KgSchemeSet().
120 *//***************************************************************************/
121 -#if defined(CONFIG_COMPAT)
122 +#if defined(FM_COMPAT)
123 #define FM_PCD_IOC_KG_SCHEME_GET_CNTR_COMPAT _IOR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(4), ioc_compat_fm_pcd_kg_scheme_spc_t)
124 #endif
125 #define FM_PCD_IOC_KG_SCHEME_GET_CNTR _IOR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(4), ioc_fm_pcd_kg_scheme_spc_t)
126 @@ -2413,7 +2413,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
127 @Cautions Allowed only following FM_PCD_MatchTableSet().
128 *//***************************************************************************/
129
130 -#if defined(CONFIG_COMPAT)
131 +#if defined(FM_COMPAT)
132 #define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_compat_fm_pcd_cc_tbl_get_stats_t)
133 #endif
134 #define FM_PCD_IOC_MATCH_TABLE_GET_KEY_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(12), ioc_fm_pcd_cc_tbl_get_stats_t)
135 @@ -2439,7 +2439,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
136 @Cautions Allowed only following FM_PCD_MatchTableSet().
137 *//***************************************************************************/
138
139 -#if defined(CONFIG_COMPAT)
140 +#if defined(FM_COMPAT)
141 #define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_compat_fm_pcd_cc_tbl_get_stats_t)
142 #endif
143 #define FM_PCD_IOC_MATCH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(13), ioc_fm_pcd_cc_tbl_get_stats_t)
144 @@ -2463,7 +2463,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
145 @Cautions Allowed only following FM_PCD_HashTableSet().
146 *//***************************************************************************/
147
148 -#if defined(CONFIG_COMPAT)
149 +#if defined(FM_COMPAT)
150 #define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), ioc_compat_fm_pcd_cc_tbl_get_stats_t)
151 #endif
152 #define FM_PCD_IOC_HASH_TABLE_GET_MISS_STAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(14), ioc_fm_pcd_cc_tbl_get_stats_t)
153 @@ -2511,7 +2511,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
154
155 @Return 0 on success; Error code otherwise.
156 *//***************************************************************************/
157 -#if defined(CONFIG_COMPAT)
158 +#if defined(FM_COMPAT)
159 #define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(20), ioc_compat_fm_pcd_net_env_params_t)
160 #endif
161 #define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(20), ioc_fm_pcd_net_env_params_t)
162 @@ -2525,7 +2525,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
163
164 @Return 0 on success; Error code otherwise.
165 *//***************************************************************************/
166 -#if defined(CONFIG_COMPAT)
167 +#if defined(FM_COMPAT)
168 #define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(21), ioc_compat_fm_obj_t)
169 #endif
170 #define FM_PCD_IOC_NET_ENV_CHARACTERISTICS_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(21), ioc_fm_obj_t)
171 @@ -2544,7 +2544,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
172
173 @Return 0 on success; Error code otherwise.
174 *//***************************************************************************/
175 -#if defined(CONFIG_COMPAT)
176 +#if defined(FM_COMPAT)
177 #define FM_PCD_IOC_KG_SCHEME_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(24), ioc_compat_fm_pcd_kg_scheme_params_t)
178 #endif
179 #define FM_PCD_IOC_KG_SCHEME_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(24), ioc_fm_pcd_kg_scheme_params_t)
180 @@ -2558,7 +2558,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
181
182 @Return 0 on success; Error code otherwise.
183 *//***************************************************************************/
184 -#if defined(CONFIG_COMPAT)
185 +#if defined(FM_COMPAT)
186 #define FM_PCD_IOC_KG_SCHEME_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(25), ioc_compat_fm_obj_t)
187 #endif
188 #define FM_PCD_IOC_KG_SCHEME_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(25), ioc_fm_obj_t)
189 @@ -2575,7 +2575,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
190
191 @Return 0 on success; Error code otherwise.
192 *//***************************************************************************/
193 -#if defined(CONFIG_COMPAT)
194 +#if defined(FM_COMPAT)
195 #define FM_PCD_IOC_CC_ROOT_BUILD_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(26), compat_uptr_t)
196 #endif
197 #define FM_PCD_IOC_CC_ROOT_BUILD _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(26), void *) /* workaround ...*/
198 @@ -2587,7 +2587,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
199
200 @Param[in] ioc_fm_obj_t - The id of a CC tree.
201 *//***************************************************************************/
202 -#if defined(CONFIG_COMPAT)
203 +#if defined(FM_COMPAT)
204 #define FM_PCD_IOC_CC_ROOT_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(27), ioc_compat_fm_obj_t)
205 #endif
206 #define FM_PCD_IOC_CC_ROOT_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(27), ioc_fm_obj_t)
207 @@ -2604,7 +2604,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
208
209 @Return 0 on success; Error code otherwise.
210 *//***************************************************************************/
211 -#if defined(CONFIG_COMPAT)
212 +#if defined(FM_COMPAT)
213 #define FM_PCD_IOC_MATCH_TABLE_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(28), compat_uptr_t)
214 #endif
215 #define FM_PCD_IOC_MATCH_TABLE_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(28), void *) /* workaround ...*/
216 @@ -2618,7 +2618,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
217
218 @Return 0 on success; Error code otherwise.
219 *//***************************************************************************/
220 -#if defined(CONFIG_COMPAT)
221 +#if defined(FM_COMPAT)
222 #define FM_PCD_IOC_MATCH_TABLE_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(29), ioc_compat_fm_obj_t)
223 #endif
224 #define FM_PCD_IOC_MATCH_TABLE_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(29), ioc_fm_obj_t)
225 @@ -2634,7 +2634,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
226
227 @Cautions Allowed only following FM_PCD_CcRootBuild().
228 *//***************************************************************************/
229 -#if defined(CONFIG_COMPAT)
230 +#if defined(FM_COMPAT)
231 #define FM_PCD_IOC_CC_ROOT_MODIFY_NEXT_ENGINE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(30), ioc_compat_fm_pcd_cc_tree_modify_next_engine_params_t)
232 #endif
233 #define FM_PCD_IOC_CC_ROOT_MODIFY_NEXT_ENGINE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(30), ioc_fm_pcd_cc_tree_modify_next_engine_params_t)
234 @@ -2650,7 +2650,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
235
236 @Cautions Allowed only following FM_PCD_MatchTableSet().
237 *//***************************************************************************/
238 -#if defined(CONFIG_COMPAT)
239 +#if defined(FM_COMPAT)
240 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_NEXT_ENGINE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(31), ioc_compat_fm_pcd_cc_node_modify_next_engine_params_t)
241 #endif
242 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_NEXT_ENGINE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(31), ioc_fm_pcd_cc_node_modify_next_engine_params_t)
243 @@ -2666,7 +2666,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
244
245 @Cautions Allowed only following FM_PCD_MatchTableSet().
246 *//***************************************************************************/
247 -#if defined(CONFIG_COMPAT)
248 +#if defined(FM_COMPAT)
249 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_MISS_NEXT_ENGINE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(32), ioc_compat_fm_pcd_cc_node_modify_next_engine_params_t)
250 #endif
251 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_MISS_NEXT_ENGINE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(32), ioc_fm_pcd_cc_node_modify_next_engine_params_t)
252 @@ -2684,7 +2684,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
253 @Cautions Allowed only after FM_PCD_MatchTableSet() has been called for this
254 node and for all of the nodes that lead to it.
255 *//***************************************************************************/
256 -#if defined(CONFIG_COMPAT)
257 +#if defined(FM_COMPAT)
258 #define FM_PCD_IOC_MATCH_TABLE_REMOVE_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(33), ioc_compat_fm_pcd_cc_node_remove_key_params_t)
259 #endif
260 #define FM_PCD_IOC_MATCH_TABLE_REMOVE_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(33), ioc_fm_pcd_cc_node_remove_key_params_t)
261 @@ -2705,7 +2705,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
262 @Cautions Allowed only after FM_PCD_MatchTableSet() has been called for this
263 node and for all of the nodes that lead to it.
264 *//***************************************************************************/
265 -#if defined(CONFIG_COMPAT)
266 +#if defined(FM_COMPAT)
267 #define FM_PCD_IOC_MATCH_TABLE_ADD_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(34), ioc_compat_fm_pcd_cc_node_modify_key_and_next_engine_params_t)
268 #endif
269 #define FM_PCD_IOC_MATCH_TABLE_ADD_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(34), ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)
270 @@ -2722,7 +2722,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
271 @Cautions Allowed only following FM_PCD_MatchTableSet() not only of the relevnt node but also
272 the node that points to this node
273 *//***************************************************************************/
274 -#if defined(CONFIG_COMPAT)
275 +#if defined(FM_COMPAT)
276 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_AND_NEXT_ENGINE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(35), ioc_compat_fm_pcd_cc_node_modify_key_and_next_engine_params_t)
277 #endif
278 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_AND_NEXT_ENGINE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(35), ioc_fm_pcd_cc_node_modify_key_and_next_engine_params_t)
279 @@ -2739,7 +2739,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
280 @Cautions Allowed only after FM_PCD_MatchTableSet() has been called for this
281 node and for all of the nodes that lead to it.
282 *//***************************************************************************/
283 -#if defined(CONFIG_COMPAT)
284 +#if defined(FM_COMPAT)
285 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(36), ioc_compat_fm_pcd_cc_node_modify_key_params_t)
286 #endif
287 #define FM_PCD_IOC_MATCH_TABLE_MODIFY_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(36), ioc_fm_pcd_cc_node_modify_key_params_t)
288 @@ -2766,7 +2766,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
289
290 @Return 0 on success; Error code otherwise.
291 *//***************************************************************************/
292 -#if defined(CONFIG_COMPAT)
293 +#if defined(FM_COMPAT)
294 #define FM_PCD_IOC_HASH_TABLE_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_compat_fm_pcd_hash_table_params_t)
295 #endif
296 #define FM_PCD_IOC_HASH_TABLE_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_fm_pcd_hash_table_params_t)
297 @@ -2784,7 +2784,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
298
299 @Cautions Allowed only following FM_PCD_HashTableSet().
300 *//***************************************************************************/
301 -#if defined(CONFIG_COMPAT)
302 +#if defined(FM_COMPAT)
303 #define FM_PCD_IOC_HASH_TABLE_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_compat_fm_obj_t)
304 #endif
305 #define FM_PCD_IOC_HASH_TABLE_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(37), ioc_fm_obj_t)
306 @@ -2803,7 +2803,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
307
308 @Cautions Allowed only following FM_PCD_HashTableSet().
309 *//***************************************************************************/
310 -#if defined(CONFIG_COMPAT)
311 +#if defined(FM_COMPAT)
312 #define FM_PCD_IOC_HASH_TABLE_ADD_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(39), ioc_compat_fm_pcd_hash_table_add_key_params_t)
313 #endif
314 #define FM_PCD_IOC_HASH_TABLE_ADD_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(39), ioc_fm_pcd_hash_table_add_key_params_t)
315 @@ -2820,7 +2820,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
316
317 @Cautions Allowed only following FM_PCD_HashTableSet().
318 *//***************************************************************************/
319 -#if defined(CONFIG_COMPAT)
320 +#if defined(FM_COMPAT)
321 #define FM_PCD_IOC_HASH_TABLE_REMOVE_KEY_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(40), ioc_compat_fm_pcd_hash_table_remove_key_params_t)
322 #endif
323 #define FM_PCD_IOC_HASH_TABLE_REMOVE_KEY _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(40), ioc_fm_pcd_hash_table_remove_key_params_t)
324 @@ -2836,7 +2836,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
325
326 @Return 0 on success; Error code otherwise.
327 *//***************************************************************************/
328 -#if defined(CONFIG_COMPAT)
329 +#if defined(FM_COMPAT)
330 #define FM_PCD_IOC_PLCR_PROFILE_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_compat_fm_pcd_plcr_profile_params_t)
331 #endif
332 #define FM_PCD_IOC_PLCR_PROFILE_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_fm_pcd_plcr_profile_params_t)
333 @@ -2851,7 +2851,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
334
335 @Return 0 on success; Error code otherwise.
336 *//***************************************************************************/
337 -#if defined(CONFIG_COMPAT)
338 +#if defined(FM_COMPAT)
339 #define FM_PCD_IOC_PLCR_PROFILE_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_compat_fm_obj_t)
340 #endif
341 #define FM_PCD_IOC_PLCR_PROFILE_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(41), ioc_fm_obj_t)
342 @@ -2867,7 +2867,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
343
344 @Return A handle to the initialized object on success; NULL code otherwise.
345 *//***************************************************************************/
346 -#if defined(CONFIG_COMPAT)
347 +#if defined(FM_COMPAT)
348 #define FM_PCD_IOC_MANIP_NODE_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(43), ioc_compat_fm_pcd_manip_params_t)
349 #endif
350 #define FM_PCD_IOC_MANIP_NODE_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(43), ioc_fm_pcd_manip_params_t)
351 @@ -2887,7 +2887,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
352
353 @Cautions Allowed only following FM_PCD_ManipNodeSet().
354 *//***************************************************************************/
355 -#if defined(CONFIG_COMPAT)
356 +#if defined(FM_COMPAT)
357 #define FM_PCD_IOC_MANIP_NODE_REPLACE_COMPAT FM_PCD_IOC_MANIP_NODE_SET_COMPAT
358 #endif
359 #define FM_PCD_IOC_MANIP_NODE_REPLACE FM_PCD_IOC_MANIP_NODE_SET
360 @@ -2903,7 +2903,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
361
362 @Cautions Allowed only following FM_PCD_ManipNodeSet().
363 *//***************************************************************************/
364 -#if defined(CONFIG_COMPAT)
365 +#if defined(FM_COMPAT)
366 #define FM_PCD_IOC_MANIP_NODE_DELETE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(44), ioc_compat_fm_obj_t)
367 #endif
368 #define FM_PCD_IOC_MANIP_NODE_DELETE _IOW(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(44), ioc_fm_obj_t)
369 @@ -2920,7 +2920,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
370
371 @Cautions Allowed only following FM_PCD_ManipNodeSet().
372 *//***************************************************************************/
373 -#if defined(CONFIG_COMPAT)
374 +#if defined(FM_COMPAT)
375 #define FM_PCD_IOC_MANIP_GET_STATS_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(50), ioc_compat_fm_pcd_manip_get_stats_t)
376 #endif
377 #define FM_PCD_IOC_MANIP_GET_STATS _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(50), ioc_fm_pcd_manip_get_stats_t)
378 @@ -2953,7 +2953,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
379
380 @Cautions Allowed only following FM_PCD_Init().
381 *//***************************************************************************/
382 -#if defined(CONFIG_COMPAT)
383 +#if defined(FM_COMPAT)
384 #define FM_PCD_IOC_FRM_REPLIC_GROUP_SET_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(46), ioc_compat_fm_pcd_frm_replic_group_params_t)
385 #endif
386 #define FM_PCD_IOC_FRM_REPLIC_GROUP_SET _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(46), ioc_fm_pcd_frm_replic_group_params_t)
387 @@ -2969,7 +2969,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
388
389 @Cautions Allowed only following FM_PCD_FrmReplicSetGroup().
390 *//***************************************************************************/
391 -#if defined(CONFIG_COMPAT)
392 +#if defined(FM_COMPAT)
393 #define FM_PCD_IOC_FRM_REPLIC_GROUP_DELETE_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(47), ioc_compat_fm_obj_t)
394 #endif
395 #define FM_PCD_IOC_FRM_REPLIC_GROUP_DELETE _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(47), ioc_fm_obj_t)
396 @@ -2987,7 +2987,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
397
398 @Cautions Allowed only following FM_PCD_FrmReplicSetGroup() of this group.
399 *//***************************************************************************/
400 -#if defined(CONFIG_COMPAT)
401 +#if defined(FM_COMPAT)
402 #define FM_PCD_IOC_FRM_REPLIC_MEMBER_ADD_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(48), ioc_compat_fm_pcd_frm_replic_member_params_t)
403 #endif
404 #define FM_PCD_IOC_FRM_REPLIC_MEMBER_ADD _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(48), ioc_fm_pcd_frm_replic_member_params_t)
405 @@ -3004,7 +3004,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
406
407 @Cautions Allowed only following FM_PCD_FrmReplicSetGroup() of this group.
408 *//***************************************************************************/
409 -#if defined(CONFIG_COMPAT)
410 +#if defined(FM_COMPAT)
411 #define FM_PCD_IOC_FRM_REPLIC_MEMBER_REMOVE_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(49), ioc_compat_fm_pcd_frm_replic_member_t)
412 #endif
413 #define FM_PCD_IOC_FRM_REPLIC_MEMBER_REMOVE _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(49), ioc_fm_pcd_frm_replic_member_t)
414 @@ -3021,7 +3021,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
415
416 @Return 0 on success; Error code otherwise.
417 *//***************************************************************************/
418 -#if defined(CONFIG_COMPAT)
419 +#if defined(FM_COMPAT)
420 #define FM_PCD_IOC_STATISTICS_SET_NODE_COMPAT _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45), void *)
421 #endif
422 #define FM_PCD_IOC_STATISTICS_SET_NODE _IOWR(FM_IOC_TYPE_BASE, FM_PCD_IOC_NUM(45), void *)
423 @@ -3029,7 +3029,7 @@ typedef struct ioc_fm_pcd_cc_tbl_get_sta
424 #endif /* FM_CAPWAP_SUPPORT */
425
426 #ifdef NCSW_BACKWARD_COMPATIBLE_API
427 -#if defined(CONFIG_COMPAT)
428 +#if defined(FM_COMPAT)
429 #define FM_PCD_IOC_SET_NET_ENV_CHARACTERISTICS_COMPAT \
430 FM_PCD_IOC_NET_ENV_CHARACTERISTICS_SET_COMPAT
431 #define FM_PCD_IOC_DELETE_NET_ENV_CHARACTERISTICS_COMPAT \
432 --- a/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h
433 +++ b/include/uapi/linux/fmd/Peripherals/fm_port_ioctls.h
434 @@ -589,7 +589,7 @@ typedef struct ioc_fm_port_pcd_fqids_par
435
436 @Return 0 on success; error code otherwise.
437 *//***************************************************************************/
438 -#if defined(CONFIG_COMPAT)
439 +#if defined(FM_COMPAT)
440 #define FM_PORT_IOC_SET_PCD_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(20), ioc_compat_fm_port_pcd_params_t)
441 #endif
442 #define FM_PORT_IOC_SET_PCD _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(20), ioc_fm_port_pcd_params_t)
443 @@ -674,7 +674,7 @@ typedef struct ioc_fm_port_pcd_fqids_par
444
445 @Return 0 on success; error code otherwise.
446 *//***************************************************************************/
447 -#if defined(CONFIG_COMPAT)
448 +#if defined(FM_COMPAT)
449 #define FM_PORT_IOC_PCD_KG_MODIFY_INITIAL_SCHEME_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(26), ioc_compat_fm_pcd_kg_scheme_select_t)
450 #endif
451 #define FM_PORT_IOC_PCD_KG_MODIFY_INITIAL_SCHEME _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(26), ioc_fm_pcd_kg_scheme_select_t)
452 @@ -691,7 +691,7 @@ typedef struct ioc_fm_port_pcd_fqids_par
453
454 @Return 0 on success; error code otherwise.
455 *//***************************************************************************/
456 -#if defined(CONFIG_COMPAT)
457 +#if defined(FM_COMPAT)
458 #define FM_PORT_IOC_PCD_PLCR_MODIFY_INITIAL_PROFILE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(27), ioc_compat_fm_obj_t)
459 #endif
460 #define FM_PORT_IOC_PCD_PLCR_MODIFY_INITIAL_PROFILE _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(27), ioc_fm_obj_t)
461 @@ -708,7 +708,7 @@ typedef struct ioc_fm_port_pcd_fqids_par
462
463 @Cautions Allowed only following FM_PORT_SetPCD() and FM_PORT_DetachPCD()
464 *//***************************************************************************/
465 -#if defined(CONFIG_COMPAT)
466 +#if defined(FM_COMPAT)
467 #define FM_PORT_IOC_PCD_CC_MODIFY_TREE_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(28), ioc_compat_fm_obj_t)
468 #endif
469 #define FM_PORT_IOC_PCD_CC_MODIFY_TREE _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(28), ioc_fm_obj_t)
470 @@ -726,7 +726,7 @@ typedef struct ioc_fm_port_pcd_fqids_par
471
472 @Cautions Allowed only following FM_PORT_SetPCD().
473 *//***************************************************************************/
474 -#if defined(CONFIG_COMPAT)
475 +#if defined(FM_COMPAT)
476 #define FM_PORT_IOC_PCD_KG_BIND_SCHEMES_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(30), ioc_compat_fm_pcd_port_schemes_params_t)
477 #endif
478 #define FM_PORT_IOC_PCD_KG_BIND_SCHEMES _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(30), ioc_fm_pcd_port_schemes_params_t)
479 @@ -744,7 +744,7 @@ typedef struct ioc_fm_port_pcd_fqids_par
480
481 @Cautions Allowed only following FM_PORT_SetPCD().
482 *//***************************************************************************/
483 -#if defined(CONFIG_COMPAT)
484 +#if defined(FM_COMPAT)
485 #define FM_PORT_IOC_PCD_KG_UNBIND_SCHEMES_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(31), ioc_compat_fm_pcd_port_schemes_params_t)
486 #endif
487 #define FM_PORT_IOC_PCD_KG_UNBIND_SCHEMES _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(31), ioc_fm_pcd_port_schemes_params_t)
488 @@ -917,7 +917,7 @@ typedef struct ioc_fm_port_vsp_alloc_par
489 @Cautions Allowed only following FM_PORT_Init(), and before FM_PORT_SetPCD()
490 and also before FM_PORT_Enable() (i.e. the port should be disabled).
491 *//***************************************************************************/
492 -#if defined(CONFIG_COMPAT)
493 +#if defined(FM_COMPAT)
494 #define FM_PORT_IOC_VSP_ALLOC_COMPAT _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(38), ioc_compat_fm_port_vsp_alloc_params_t)
495 #endif
496 #define FM_PORT_IOC_VSP_ALLOC _IOW(FM_IOC_TYPE_BASE, FM_PORT_IOC_NUM(38), ioc_fm_port_vsp_alloc_params_t)
497 --- a/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h
498 +++ b/include/uapi/linux/fmd/Peripherals/fm_test_ioctls.h
499 @@ -90,7 +90,7 @@ typedef struct ioc_fmt_buff_context_t {
500 uint8_t fm_time_stamp[FM_TIME_STAMP_MAX];
501 } ioc_fmt_buff_context_t;
502
503 -#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
504 +#if defined(__KERNEL__) && defined(FM_COMPAT)
505 typedef struct ioc_fmt_compat_buff_context_t {
506 compat_uptr_t p_user_priv;
507 uint8_t fm_prs_res[FM_PRS_MAX];
508 @@ -109,7 +109,7 @@ typedef struct ioc_fmt_buff_desc_t {
509 ioc_fmt_buff_context_t buff_context;
510 } ioc_fmt_buff_desc_t;
511
512 -#if defined(__KERNEL__) && defined(CONFIG_COMPAT)
513 +#if defined(__KERNEL__) && defined(FM_COMPAT)
514 typedef struct ioc_fmt_compat_buff_desc_t {
515 uint32_t qid;
516 compat_uptr_t p_data;