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