kernel: add missing config symbols for 5.15
[openwrt/staging/dedeckeh.git] / target / linux / mediatek / files-5.10 / drivers / net / phy / rtk / rtl8367c / leaky.c
1 /*
2 * Copyright (C) 2013 Realtek Semiconductor Corp.
3 * All Rights Reserved.
4 *
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9 *
10 * $Revision: 76306 $
11 * $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
12 *
13 * Purpose : RTK switch high-level API for RTL8367/RTL8367C
14 * Feature : Here is a list of all functions and variables in Leaky module.
15 *
16 */
17
18 #include <rtk_switch.h>
19 #include <rtk_error.h>
20 #include <leaky.h>
21 #include <string.h>
22
23 #include <rtl8367c_asicdrv.h>
24 #include <rtl8367c_asicdrv_portIsolation.h>
25 #include <rtl8367c_asicdrv_rma.h>
26 #include <rtl8367c_asicdrv_igmp.h>
27
28
29 /* Function Name:
30 * rtk_leaky_vlan_set
31 * Description:
32 * Set VLAN leaky.
33 * Input:
34 * type - Packet type for VLAN leaky.
35 * enable - Leaky status.
36 * Output:
37 * None
38 * Return:
39 * RT_ERR_OK - OK
40 * RT_ERR_FAILED - Failed
41 * RT_ERR_SMI - SMI access error
42 * RT_ERR_INPUT - Invalid input parameters.
43 * RT_ERR_ENABLE - Invalid enable input
44 * Note:
45 * This API can set VLAN leaky for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
46 * The leaky frame types are as following:
47 * - LEAKY_BRG_GROUP,
48 * - LEAKY_FD_PAUSE,
49 * - LEAKY_SP_MCAST,
50 * - LEAKY_1X_PAE,
51 * - LEAKY_UNDEF_BRG_04,
52 * - LEAKY_UNDEF_BRG_05,
53 * - LEAKY_UNDEF_BRG_06,
54 * - LEAKY_UNDEF_BRG_07,
55 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
56 * - LEAKY_UNDEF_BRG_09,
57 * - LEAKY_UNDEF_BRG_0A,
58 * - LEAKY_UNDEF_BRG_0B,
59 * - LEAKY_UNDEF_BRG_0C,
60 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
61 * - LEAKY_8021AB,
62 * - LEAKY_UNDEF_BRG_0F,
63 * - LEAKY_BRG_MNGEMENT,
64 * - LEAKY_UNDEFINED_11,
65 * - LEAKY_UNDEFINED_12,
66 * - LEAKY_UNDEFINED_13,
67 * - LEAKY_UNDEFINED_14,
68 * - LEAKY_UNDEFINED_15,
69 * - LEAKY_UNDEFINED_16,
70 * - LEAKY_UNDEFINED_17,
71 * - LEAKY_UNDEFINED_18,
72 * - LEAKY_UNDEFINED_19,
73 * - LEAKY_UNDEFINED_1A,
74 * - LEAKY_UNDEFINED_1B,
75 * - LEAKY_UNDEFINED_1C,
76 * - LEAKY_UNDEFINED_1D,
77 * - LEAKY_UNDEFINED_1E,
78 * - LEAKY_UNDEFINED_1F,
79 * - LEAKY_GMRP,
80 * - LEAKY_GVRP,
81 * - LEAKY_UNDEF_GARP_22,
82 * - LEAKY_UNDEF_GARP_23,
83 * - LEAKY_UNDEF_GARP_24,
84 * - LEAKY_UNDEF_GARP_25,
85 * - LEAKY_UNDEF_GARP_26,
86 * - LEAKY_UNDEF_GARP_27,
87 * - LEAKY_UNDEF_GARP_28,
88 * - LEAKY_UNDEF_GARP_29,
89 * - LEAKY_UNDEF_GARP_2A,
90 * - LEAKY_UNDEF_GARP_2B,
91 * - LEAKY_UNDEF_GARP_2C,
92 * - LEAKY_UNDEF_GARP_2D,
93 * - LEAKY_UNDEF_GARP_2E,
94 * - LEAKY_UNDEF_GARP_2F,
95 * - LEAKY_IGMP,
96 * - LEAKY_IPMULTICAST.
97 * - LEAKY_CDP,
98 * - LEAKY_CSSTP,
99 * - LEAKY_LLDP.
100 */
101 rtk_api_ret_t rtk_leaky_vlan_set(rtk_leaky_type_t type, rtk_enable_t enable)
102 {
103 rtk_api_ret_t retVal;
104 rtk_uint32 port;
105 rtl8367c_rma_t rmacfg;
106 rtk_uint32 tmp;
107
108 /* Check initialization state */
109 RTK_CHK_INIT_STATE();
110
111 if (type >= LEAKY_END)
112 return RT_ERR_INPUT;
113
114 if (enable >= RTK_ENABLE_END)
115 return RT_ERR_INPUT;
116
117 if (type >= 0 && type <= LEAKY_UNDEF_GARP_2F)
118 {
119 if ((retVal = rtl8367c_getAsicRma(type, &rmacfg)) != RT_ERR_OK)
120 return retVal;
121
122 rmacfg.vlan_leaky = enable;
123
124 if ((retVal = rtl8367c_setAsicRma(type, &rmacfg)) != RT_ERR_OK)
125 return retVal;
126 }
127 else if (LEAKY_IPMULTICAST == type)
128 {
129 for (port = 0; port <= RTK_PORT_ID_MAX; port++)
130 {
131 if ((retVal = rtl8367c_setAsicIpMulticastVlanLeaky(port,enable)) != RT_ERR_OK)
132 return retVal;
133 }
134 }
135 else if (LEAKY_IGMP == type)
136 {
137 if ((retVal = rtl8367c_setAsicIGMPVLANLeaky(enable)) != RT_ERR_OK)
138 return retVal;
139 }
140 else if (LEAKY_CDP == type)
141 {
142 if ((retVal = rtl8367c_getAsicRmaCdp(&rmacfg)) != RT_ERR_OK)
143 return retVal;
144
145 rmacfg.vlan_leaky = enable;
146
147 if ((retVal = rtl8367c_setAsicRmaCdp(&rmacfg)) != RT_ERR_OK)
148 return retVal;
149 }
150 else if (LEAKY_CSSTP == type)
151 {
152 if ((retVal = rtl8367c_getAsicRmaCsstp(&rmacfg)) != RT_ERR_OK)
153 return retVal;
154
155 rmacfg.vlan_leaky = enable;
156
157 if ((retVal = rtl8367c_setAsicRmaCsstp(&rmacfg)) != RT_ERR_OK)
158 return retVal;
159 }
160 else if (LEAKY_LLDP == type)
161 {
162 if ((retVal = rtl8367c_getAsicRmaLldp(&tmp,&rmacfg)) != RT_ERR_OK)
163 return retVal;
164
165 rmacfg.vlan_leaky = enable;
166
167 if ((retVal = rtl8367c_setAsicRmaLldp(tmp, &rmacfg)) != RT_ERR_OK)
168 return retVal;
169 }
170
171 return RT_ERR_OK;
172 }
173
174 /* Function Name:
175 * rtk_leaky_vlan_get
176 * Description:
177 * Get VLAN leaky.
178 * Input:
179 * type - Packet type for VLAN leaky.
180 * Output:
181 * pEnable - Leaky status.
182 * Return:
183 * RT_ERR_OK - OK
184 * RT_ERR_FAILED - Failed
185 * RT_ERR_SMI - SMI access error
186 * RT_ERR_INPUT - Invalid input parameters.
187 * Note:
188 * This API can get VLAN leaky status for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
189 * The leaky frame types are as following:
190 * - LEAKY_BRG_GROUP,
191 * - LEAKY_FD_PAUSE,
192 * - LEAKY_SP_MCAST,
193 * - LEAKY_1X_PAE,
194 * - LEAKY_UNDEF_BRG_04,
195 * - LEAKY_UNDEF_BRG_05,
196 * - LEAKY_UNDEF_BRG_06,
197 * - LEAKY_UNDEF_BRG_07,
198 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
199 * - LEAKY_UNDEF_BRG_09,
200 * - LEAKY_UNDEF_BRG_0A,
201 * - LEAKY_UNDEF_BRG_0B,
202 * - LEAKY_UNDEF_BRG_0C,
203 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
204 * - LEAKY_8021AB,
205 * - LEAKY_UNDEF_BRG_0F,
206 * - LEAKY_BRG_MNGEMENT,
207 * - LEAKY_UNDEFINED_11,
208 * - LEAKY_UNDEFINED_12,
209 * - LEAKY_UNDEFINED_13,
210 * - LEAKY_UNDEFINED_14,
211 * - LEAKY_UNDEFINED_15,
212 * - LEAKY_UNDEFINED_16,
213 * - LEAKY_UNDEFINED_17,
214 * - LEAKY_UNDEFINED_18,
215 * - LEAKY_UNDEFINED_19,
216 * - LEAKY_UNDEFINED_1A,
217 * - LEAKY_UNDEFINED_1B,
218 * - LEAKY_UNDEFINED_1C,
219 * - LEAKY_UNDEFINED_1D,
220 * - LEAKY_UNDEFINED_1E,
221 * - LEAKY_UNDEFINED_1F,
222 * - LEAKY_GMRP,
223 * - LEAKY_GVRP,
224 * - LEAKY_UNDEF_GARP_22,
225 * - LEAKY_UNDEF_GARP_23,
226 * - LEAKY_UNDEF_GARP_24,
227 * - LEAKY_UNDEF_GARP_25,
228 * - LEAKY_UNDEF_GARP_26,
229 * - LEAKY_UNDEF_GARP_27,
230 * - LEAKY_UNDEF_GARP_28,
231 * - LEAKY_UNDEF_GARP_29,
232 * - LEAKY_UNDEF_GARP_2A,
233 * - LEAKY_UNDEF_GARP_2B,
234 * - LEAKY_UNDEF_GARP_2C,
235 * - LEAKY_UNDEF_GARP_2D,
236 * - LEAKY_UNDEF_GARP_2E,
237 * - LEAKY_UNDEF_GARP_2F,
238 * - LEAKY_IGMP,
239 * - LEAKY_IPMULTICAST.
240 * - LEAKY_CDP,
241 * - LEAKY_CSSTP,
242 * - LEAKY_LLDP.
243 */
244 rtk_api_ret_t rtk_leaky_vlan_get(rtk_leaky_type_t type, rtk_enable_t *pEnable)
245 {
246 rtk_api_ret_t retVal;
247 rtk_uint32 port,tmp;
248 rtl8367c_rma_t rmacfg;
249
250 /* Check initialization state */
251 RTK_CHK_INIT_STATE();
252
253 if (type >= LEAKY_END)
254 return RT_ERR_INPUT;
255
256 if(NULL == pEnable)
257 return RT_ERR_NULL_POINTER;
258
259 if (type >= 0 && type <= LEAKY_UNDEF_GARP_2F)
260 {
261 if ((retVal = rtl8367c_getAsicRma(type, &rmacfg)) != RT_ERR_OK)
262 return retVal;
263
264 *pEnable = rmacfg.vlan_leaky;
265
266 }
267 else if (LEAKY_IPMULTICAST == type)
268 {
269 for (port = 0; port <= RTK_PORT_ID_MAX; port++)
270 {
271 if ((retVal = rtl8367c_getAsicIpMulticastVlanLeaky(port, &tmp)) != RT_ERR_OK)
272 return retVal;
273 if (port>0&&(tmp!=*pEnable))
274 return RT_ERR_FAILED;
275 *pEnable = tmp;
276 }
277 }
278 else if (LEAKY_IGMP == type)
279 {
280 if ((retVal = rtl8367c_getAsicIGMPVLANLeaky(&tmp)) != RT_ERR_OK)
281 return retVal;
282
283 *pEnable = tmp;
284 }
285 else if (LEAKY_CDP == type)
286 {
287 if ((retVal = rtl8367c_getAsicRmaCdp(&rmacfg)) != RT_ERR_OK)
288 return retVal;
289
290 *pEnable = rmacfg.vlan_leaky;
291 }
292 else if (LEAKY_CSSTP == type)
293 {
294 if ((retVal = rtl8367c_getAsicRmaCsstp(&rmacfg)) != RT_ERR_OK)
295 return retVal;
296
297 *pEnable = rmacfg.vlan_leaky;
298 }
299 else if (LEAKY_LLDP == type)
300 {
301 if ((retVal = rtl8367c_getAsicRmaLldp(&tmp, &rmacfg)) != RT_ERR_OK)
302 return retVal;
303
304 *pEnable = rmacfg.vlan_leaky;
305 }
306
307 return RT_ERR_OK;
308 }
309
310 /* Function Name:
311 * rtk_leaky_portIsolation_set
312 * Description:
313 * Set port isolation leaky.
314 * Input:
315 * type - Packet type for port isolation leaky.
316 * enable - Leaky status.
317 * Output:
318 * None
319 * Return:
320 * RT_ERR_OK - OK
321 * RT_ERR_FAILED - Failed
322 * RT_ERR_SMI - SMI access error
323 * RT_ERR_INPUT - Invalid input parameters.
324 * RT_ERR_ENABLE - Invalid enable input
325 * Note:
326 * This API can set port isolation leaky for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
327 * The leaky frame types are as following:
328 * - LEAKY_BRG_GROUP,
329 * - LEAKY_FD_PAUSE,
330 * - LEAKY_SP_MCAST,
331 * - LEAKY_1X_PAE,
332 * - LEAKY_UNDEF_BRG_04,
333 * - LEAKY_UNDEF_BRG_05,
334 * - LEAKY_UNDEF_BRG_06,
335 * - LEAKY_UNDEF_BRG_07,
336 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
337 * - LEAKY_UNDEF_BRG_09,
338 * - LEAKY_UNDEF_BRG_0A,
339 * - LEAKY_UNDEF_BRG_0B,
340 * - LEAKY_UNDEF_BRG_0C,
341 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
342 * - LEAKY_8021AB,
343 * - LEAKY_UNDEF_BRG_0F,
344 * - LEAKY_BRG_MNGEMENT,
345 * - LEAKY_UNDEFINED_11,
346 * - LEAKY_UNDEFINED_12,
347 * - LEAKY_UNDEFINED_13,
348 * - LEAKY_UNDEFINED_14,
349 * - LEAKY_UNDEFINED_15,
350 * - LEAKY_UNDEFINED_16,
351 * - LEAKY_UNDEFINED_17,
352 * - LEAKY_UNDEFINED_18,
353 * - LEAKY_UNDEFINED_19,
354 * - LEAKY_UNDEFINED_1A,
355 * - LEAKY_UNDEFINED_1B,
356 * - LEAKY_UNDEFINED_1C,
357 * - LEAKY_UNDEFINED_1D,
358 * - LEAKY_UNDEFINED_1E,
359 * - LEAKY_UNDEFINED_1F,
360 * - LEAKY_GMRP,
361 * - LEAKY_GVRP,
362 * - LEAKY_UNDEF_GARP_22,
363 * - LEAKY_UNDEF_GARP_23,
364 * - LEAKY_UNDEF_GARP_24,
365 * - LEAKY_UNDEF_GARP_25,
366 * - LEAKY_UNDEF_GARP_26,
367 * - LEAKY_UNDEF_GARP_27,
368 * - LEAKY_UNDEF_GARP_28,
369 * - LEAKY_UNDEF_GARP_29,
370 * - LEAKY_UNDEF_GARP_2A,
371 * - LEAKY_UNDEF_GARP_2B,
372 * - LEAKY_UNDEF_GARP_2C,
373 * - LEAKY_UNDEF_GARP_2D,
374 * - LEAKY_UNDEF_GARP_2E,
375 * - LEAKY_UNDEF_GARP_2F,
376 * - LEAKY_IGMP,
377 * - LEAKY_IPMULTICAST.
378 * - LEAKY_CDP,
379 * - LEAKY_CSSTP,
380 * - LEAKY_LLDP.
381 */
382 rtk_api_ret_t rtk_leaky_portIsolation_set(rtk_leaky_type_t type, rtk_enable_t enable)
383 {
384 rtk_api_ret_t retVal;
385 rtk_uint32 port;
386 rtl8367c_rma_t rmacfg;
387 rtk_uint32 tmp;
388
389 /* Check initialization state */
390 RTK_CHK_INIT_STATE();
391
392 if (type >= LEAKY_END)
393 return RT_ERR_INPUT;
394
395 if (enable >= RTK_ENABLE_END)
396 return RT_ERR_INPUT;
397
398 if (type >= 0 && type <= LEAKY_UNDEF_GARP_2F)
399 {
400 if ((retVal = rtl8367c_getAsicRma(type, &rmacfg)) != RT_ERR_OK)
401 return retVal;
402
403 rmacfg.portiso_leaky = enable;
404
405 if ((retVal = rtl8367c_setAsicRma(type, &rmacfg)) != RT_ERR_OK)
406 return retVal;
407 }
408 else if (LEAKY_IPMULTICAST == type)
409 {
410 for (port = 0; port < RTK_MAX_NUM_OF_PORT; port++)
411 {
412 if ((retVal = rtl8367c_setAsicIpMulticastPortIsoLeaky(port,enable)) != RT_ERR_OK)
413 return retVal;
414 }
415 }
416 else if (LEAKY_IGMP == type)
417 {
418 if ((retVal = rtl8367c_setAsicIGMPIsoLeaky(enable)) != RT_ERR_OK)
419 return retVal;
420 }
421 else if (LEAKY_CDP == type)
422 {
423 if ((retVal = rtl8367c_getAsicRmaCdp(&rmacfg)) != RT_ERR_OK)
424 return retVal;
425
426 rmacfg.portiso_leaky = enable;
427
428 if ((retVal = rtl8367c_setAsicRmaCdp(&rmacfg)) != RT_ERR_OK)
429 return retVal;
430 }
431 else if (LEAKY_CSSTP == type)
432 {
433 if ((retVal = rtl8367c_getAsicRmaCsstp(&rmacfg)) != RT_ERR_OK)
434 return retVal;
435
436 rmacfg.portiso_leaky = enable;
437
438 if ((retVal = rtl8367c_setAsicRmaCsstp(&rmacfg)) != RT_ERR_OK)
439 return retVal;
440 }
441 else if (LEAKY_LLDP == type)
442 {
443 if ((retVal = rtl8367c_getAsicRmaLldp(&tmp, &rmacfg)) != RT_ERR_OK)
444 return retVal;
445
446 rmacfg.portiso_leaky = enable;
447
448 if ((retVal = rtl8367c_setAsicRmaLldp(tmp, &rmacfg)) != RT_ERR_OK)
449 return retVal;
450 }
451
452 return RT_ERR_OK;
453 }
454
455 /* Function Name:
456 * rtk_leaky_portIsolation_get
457 * Description:
458 * Get port isolation leaky.
459 * Input:
460 * type - Packet type for port isolation leaky.
461 * Output:
462 * pEnable - Leaky status.
463 * Return:
464 * RT_ERR_OK - OK
465 * RT_ERR_FAILED - Failed
466 * RT_ERR_SMI - SMI access error
467 * RT_ERR_INPUT - Invalid input parameters.
468 * Note:
469 * This API can get port isolation leaky status for RMA ,IGMP/MLD, CDP, CSSTP, and LLDP packets.
470 * The leaky frame types are as following:
471 * - LEAKY_BRG_GROUP,
472 * - LEAKY_FD_PAUSE,
473 * - LEAKY_SP_MCAST,
474 * - LEAKY_1X_PAE,
475 * - LEAKY_UNDEF_BRG_04,
476 * - LEAKY_UNDEF_BRG_05,
477 * - LEAKY_UNDEF_BRG_06,
478 * - LEAKY_UNDEF_BRG_07,
479 * - LEAKY_PROVIDER_BRIDGE_GROUP_ADDRESS,
480 * - LEAKY_UNDEF_BRG_09,
481 * - LEAKY_UNDEF_BRG_0A,
482 * - LEAKY_UNDEF_BRG_0B,
483 * - LEAKY_UNDEF_BRG_0C,
484 * - LEAKY_PROVIDER_BRIDGE_GVRP_ADDRESS,
485 * - LEAKY_8021AB,
486 * - LEAKY_UNDEF_BRG_0F,
487 * - LEAKY_BRG_MNGEMENT,
488 * - LEAKY_UNDEFINED_11,
489 * - LEAKY_UNDEFINED_12,
490 * - LEAKY_UNDEFINED_13,
491 * - LEAKY_UNDEFINED_14,
492 * - LEAKY_UNDEFINED_15,
493 * - LEAKY_UNDEFINED_16,
494 * - LEAKY_UNDEFINED_17,
495 * - LEAKY_UNDEFINED_18,
496 * - LEAKY_UNDEFINED_19,
497 * - LEAKY_UNDEFINED_1A,
498 * - LEAKY_UNDEFINED_1B,
499 * - LEAKY_UNDEFINED_1C,
500 * - LEAKY_UNDEFINED_1D,
501 * - LEAKY_UNDEFINED_1E,
502 * - LEAKY_UNDEFINED_1F,
503 * - LEAKY_GMRP,
504 * - LEAKY_GVRP,
505 * - LEAKY_UNDEF_GARP_22,
506 * - LEAKY_UNDEF_GARP_23,
507 * - LEAKY_UNDEF_GARP_24,
508 * - LEAKY_UNDEF_GARP_25,
509 * - LEAKY_UNDEF_GARP_26,
510 * - LEAKY_UNDEF_GARP_27,
511 * - LEAKY_UNDEF_GARP_28,
512 * - LEAKY_UNDEF_GARP_29,
513 * - LEAKY_UNDEF_GARP_2A,
514 * - LEAKY_UNDEF_GARP_2B,
515 * - LEAKY_UNDEF_GARP_2C,
516 * - LEAKY_UNDEF_GARP_2D,
517 * - LEAKY_UNDEF_GARP_2E,
518 * - LEAKY_UNDEF_GARP_2F,
519 * - LEAKY_IGMP,
520 * - LEAKY_IPMULTICAST.
521 * - LEAKY_CDP,
522 * - LEAKY_CSSTP,
523 * - LEAKY_LLDP.
524 */
525 rtk_api_ret_t rtk_leaky_portIsolation_get(rtk_leaky_type_t type, rtk_enable_t *pEnable)
526 {
527 rtk_api_ret_t retVal;
528 rtk_uint32 port, tmp;
529 rtl8367c_rma_t rmacfg;
530
531 /* Check initialization state */
532 RTK_CHK_INIT_STATE();
533
534 if (type >= LEAKY_END)
535 return RT_ERR_INPUT;
536
537 if(NULL == pEnable)
538 return RT_ERR_NULL_POINTER;
539
540 if (type >= 0 && type <= LEAKY_UNDEF_GARP_2F)
541 {
542 if ((retVal = rtl8367c_getAsicRma(type, &rmacfg)) != RT_ERR_OK)
543 return retVal;
544
545 *pEnable = rmacfg.portiso_leaky;
546
547 }
548 else if (LEAKY_IPMULTICAST == type)
549 {
550 for (port = 0; port < RTK_MAX_NUM_OF_PORT; port++)
551 {
552 if ((retVal = rtl8367c_getAsicIpMulticastPortIsoLeaky(port, &tmp)) != RT_ERR_OK)
553 return retVal;
554 if (port > 0 &&(tmp != *pEnable))
555 return RT_ERR_FAILED;
556 *pEnable = tmp;
557 }
558 }
559 else if (LEAKY_IGMP == type)
560 {
561 if ((retVal = rtl8367c_getAsicIGMPIsoLeaky(&tmp)) != RT_ERR_OK)
562 return retVal;
563
564 *pEnable = tmp;
565 }
566 else if (LEAKY_CDP == type)
567 {
568 if ((retVal = rtl8367c_getAsicRmaCdp(&rmacfg)) != RT_ERR_OK)
569 return retVal;
570
571 *pEnable = rmacfg.portiso_leaky;
572 }
573 else if (LEAKY_CSSTP == type)
574 {
575 if ((retVal = rtl8367c_getAsicRmaCsstp(&rmacfg)) != RT_ERR_OK)
576 return retVal;
577
578 *pEnable = rmacfg.portiso_leaky;
579 }
580 else if (LEAKY_LLDP == type)
581 {
582 if ((retVal = rtl8367c_getAsicRmaLldp(&tmp, &rmacfg)) != RT_ERR_OK)
583 return retVal;
584
585 *pEnable = rmacfg.portiso_leaky;
586 }
587
588
589 return RT_ERR_OK;
590 }