1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
|
/*
* Copyright (C) 2013 Realtek Semiconductor Corp.
* All Rights Reserved.
*
* Unless you and Realtek execute a separate written software license
* agreement governing use of this software, this software is licensed
* to you under the terms of the GNU General Public License version 2,
* available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
*
* $Revision: 76306 $
* $Date: 2017-03-08 15:13:58 +0800 (週三, 08 三月 2017) $
*
* Purpose : RTK switch high-level API for RTL8367/RTL8367C
* Feature : Here is a list of all functions and variables in MIB module.
*
*/
#include <rtk_switch.h>
#include <rtk_error.h>
#include <stat.h>
#include <string.h>
#include <rtl8367c_asicdrv.h>
#include <rtl8367c_asicdrv_mib.h>
/* Function Name:
* rtk_stat_global_reset
* Description:
* Reset global MIB counter.
* Input:
* None
* Output:
* None
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
* Reset MIB counter of ports. API will use global reset while port mask is all-ports.
*/
rtk_api_ret_t rtk_stat_global_reset(void)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if ((retVal = rtl8367c_setAsicMIBsCounterReset(TRUE,FALSE, 0)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_port_reset
* Description:
* Reset per port MIB counter by port.
* Input:
* port - port id.
* Output:
* None
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
*
*/
rtk_api_ret_t rtk_stat_port_reset(rtk_port_t port)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
/* Check port valid */
RTK_CHK_PORT_VALID(port);
if ((retVal = rtl8367c_setAsicMIBsCounterReset(FALSE,FALSE,1 << rtk_switch_port_L2P_get(port))) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_queueManage_reset
* Description:
* Reset queue manage MIB counter.
* Input:
* None
* Output:
* None
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
*
*/
rtk_api_ret_t rtk_stat_queueManage_reset(void)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if ((retVal = rtl8367c_setAsicMIBsCounterReset(FALSE,TRUE,0)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_global_get
* Description:
* Get global MIB counter
* Input:
* cntr_idx - global counter index.
* Output:
* pCntr - global counter value.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* Get global MIB counter by index definition.
*/
rtk_api_ret_t rtk_stat_global_get(rtk_stat_global_type_t cntr_idx, rtk_stat_counter_t *pCntr)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(NULL == pCntr)
return RT_ERR_NULL_POINTER;
if (cntr_idx!=DOT1D_TP_LEARNED_ENTRY_DISCARDS_INDEX)
return RT_ERR_STAT_INVALID_GLOBAL_CNTR;
if ((retVal = rtl8367c_getAsicMIBsCounter(0, cntr_idx, pCntr)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_global_getAll
* Description:
* Get all global MIB counter
* Input:
* None
* Output:
* pGlobal_cntrs - global counter structure.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* Get all global MIB counter by index definition.
*/
rtk_api_ret_t rtk_stat_global_getAll(rtk_stat_global_cntr_t *pGlobal_cntrs)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(NULL == pGlobal_cntrs)
return RT_ERR_NULL_POINTER;
if ((retVal = rtl8367c_getAsicMIBsCounter(0,DOT1D_TP_LEARNED_ENTRY_DISCARDS_INDEX, &pGlobal_cntrs->dot1dTpLearnedEntryDiscards)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
#define MIB_NOT_SUPPORT (0xFFFF)
static rtk_api_ret_t _get_asic_mib_idx(rtk_stat_port_type_t cnt_idx, RTL8367C_MIBCOUNTER *pMib_idx)
{
RTL8367C_MIBCOUNTER mib_asic_idx[STAT_PORT_CNTR_END]=
{
ifInOctets, /* STAT_IfInOctets */
dot3StatsFCSErrors, /* STAT_Dot3StatsFCSErrors */
dot3StatsSymbolErrors, /* STAT_Dot3StatsSymbolErrors */
dot3InPauseFrames, /* STAT_Dot3InPauseFrames */
dot3ControlInUnknownOpcodes, /* STAT_Dot3ControlInUnknownOpcodes */
etherStatsFragments, /* STAT_EtherStatsFragments */
etherStatsJabbers, /* STAT_EtherStatsJabbers */
ifInUcastPkts, /* STAT_IfInUcastPkts */
etherStatsDropEvents, /* STAT_EtherStatsDropEvents */
etherStatsOctets, /* STAT_EtherStatsOctets */
etherStatsUnderSizePkts, /* STAT_EtherStatsUnderSizePkts */
etherOversizeStats, /* STAT_EtherOversizeStats */
etherStatsPkts64Octets, /* STAT_EtherStatsPkts64Octets */
etherStatsPkts65to127Octets, /* STAT_EtherStatsPkts65to127Octets */
etherStatsPkts128to255Octets, /* STAT_EtherStatsPkts128to255Octets */
etherStatsPkts256to511Octets, /* STAT_EtherStatsPkts256to511Octets */
etherStatsPkts512to1023Octets, /* STAT_EtherStatsPkts512to1023Octets */
etherStatsPkts1024to1518Octets, /* STAT_EtherStatsPkts1024to1518Octets */
ifInMulticastPkts, /* STAT_EtherStatsMulticastPkts */
ifInBroadcastPkts, /* STAT_EtherStatsBroadcastPkts */
ifOutOctets, /* STAT_IfOutOctets */
dot3StatsSingleCollisionFrames, /* STAT_Dot3StatsSingleCollisionFrames */
dot3StatMultipleCollisionFrames,/* STAT_Dot3StatsMultipleCollisionFrames */
dot3sDeferredTransmissions, /* STAT_Dot3StatsDeferredTransmissions */
dot3StatsLateCollisions, /* STAT_Dot3StatsLateCollisions */
etherStatsCollisions, /* STAT_EtherStatsCollisions */
dot3StatsExcessiveCollisions, /* STAT_Dot3StatsExcessiveCollisions */
dot3OutPauseFrames, /* STAT_Dot3OutPauseFrames */
MIB_NOT_SUPPORT, /* STAT_Dot1dBasePortDelayExceededDiscards */
dot1dTpPortInDiscards, /* STAT_Dot1dTpPortInDiscards */
ifOutUcastPkts, /* STAT_IfOutUcastPkts */
ifOutMulticastPkts, /* STAT_IfOutMulticastPkts */
ifOutBroadcastPkts, /* STAT_IfOutBroadcastPkts */
outOampduPkts, /* STAT_OutOampduPkts */
inOampduPkts, /* STAT_InOampduPkts */
MIB_NOT_SUPPORT, /* STAT_PktgenPkts */
inMldChecksumError, /* STAT_InMldChecksumError */
inIgmpChecksumError, /* STAT_InIgmpChecksumError */
inMldSpecificQuery, /* STAT_InMldSpecificQuery */
inMldGeneralQuery, /* STAT_InMldGeneralQuery */
inIgmpSpecificQuery, /* STAT_InIgmpSpecificQuery */
inIgmpGeneralQuery, /* STAT_InIgmpGeneralQuery */
inMldLeaves, /* STAT_InMldLeaves */
inIgmpLeaves, /* STAT_InIgmpInterfaceLeaves */
inIgmpJoinsSuccess, /* STAT_InIgmpJoinsSuccess */
inIgmpJoinsFail, /* STAT_InIgmpJoinsFail */
inMldJoinsSuccess, /* STAT_InMldJoinsSuccess */
inMldJoinsFail, /* STAT_InMldJoinsFail */
inReportSuppressionDrop, /* STAT_InReportSuppressionDrop */
inLeaveSuppressionDrop, /* STAT_InLeaveSuppressionDrop */
outIgmpReports, /* STAT_OutIgmpReports */
outIgmpLeaves, /* STAT_OutIgmpLeaves */
outIgmpGeneralQuery, /* STAT_OutIgmpGeneralQuery */
outIgmpSpecificQuery, /* STAT_OutIgmpSpecificQuery */
outMldReports, /* STAT_OutMldReports */
outMldLeaves, /* STAT_OutMldLeaves */
outMldGeneralQuery, /* STAT_OutMldGeneralQuery */
outMldSpecificQuery, /* STAT_OutMldSpecificQuery */
inKnownMulticastPkts, /* STAT_InKnownMulticastPkts */
ifInMulticastPkts, /* STAT_IfInMulticastPkts */
ifInBroadcastPkts, /* STAT_IfInBroadcastPkts */
ifOutDiscards /* STAT_IfOutDiscards */
};
if(cnt_idx >= STAT_PORT_CNTR_END)
return RT_ERR_STAT_INVALID_PORT_CNTR;
if(mib_asic_idx[cnt_idx] == MIB_NOT_SUPPORT)
return RT_ERR_CHIP_NOT_SUPPORTED;
*pMib_idx = mib_asic_idx[cnt_idx];
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_port_get
* Description:
* Get per port MIB counter by index
* Input:
* port - port id.
* cntr_idx - port counter index.
* Output:
* pCntr - MIB retrived counter.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
* Get per port MIB counter by index definition.
*/
rtk_api_ret_t rtk_stat_port_get(rtk_port_t port, rtk_stat_port_type_t cntr_idx, rtk_stat_counter_t *pCntr)
{
rtk_api_ret_t retVal;
RTL8367C_MIBCOUNTER mib_idx;
rtk_stat_counter_t second_cnt;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(NULL == pCntr)
return RT_ERR_NULL_POINTER;
/* Check port valid */
RTK_CHK_PORT_VALID(port);
if (cntr_idx>=STAT_PORT_CNTR_END)
return RT_ERR_STAT_INVALID_PORT_CNTR;
if((retVal = _get_asic_mib_idx(cntr_idx, &mib_idx)) != RT_ERR_OK)
return retVal;
if(mib_idx == MIB_NOT_SUPPORT)
return RT_ERR_CHIP_NOT_SUPPORTED;
if ((retVal = rtl8367c_getAsicMIBsCounter(rtk_switch_port_L2P_get(port), mib_idx, pCntr)) != RT_ERR_OK)
return retVal;
if(cntr_idx == STAT_EtherStatsMulticastPkts)
{
if((retVal = _get_asic_mib_idx(STAT_IfOutMulticastPkts, &mib_idx)) != RT_ERR_OK)
return retVal;
if((retVal = rtl8367c_getAsicMIBsCounter(rtk_switch_port_L2P_get(port), mib_idx, &second_cnt)) != RT_ERR_OK)
return retVal;
*pCntr += second_cnt;
}
if(cntr_idx == STAT_EtherStatsBroadcastPkts)
{
if((retVal = _get_asic_mib_idx(STAT_IfOutBroadcastPkts, &mib_idx)) != RT_ERR_OK)
return retVal;
if((retVal = rtl8367c_getAsicMIBsCounter(rtk_switch_port_L2P_get(port), mib_idx, &second_cnt)) != RT_ERR_OK)
return retVal;
*pCntr += second_cnt;
}
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_port_getAll
* Description:
* Get all counters of one specified port in the specified device.
* Input:
* port - port id.
* Output:
* pPort_cntrs - buffer pointer of counter value.
* Return:
* RT_ERR_OK - OK
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* Get all MIB counters of one port.
*/
rtk_api_ret_t rtk_stat_port_getAll(rtk_port_t port, rtk_stat_port_cntr_t *pPort_cntrs)
{
rtk_api_ret_t retVal;
rtk_uint32 mibIndex;
rtk_uint64 mibCounter;
rtk_uint32 *accessPtr;
/* address offset to MIBs counter */
CONST_T rtk_uint16 mibLength[STAT_PORT_CNTR_END]= {
2,1,1,1,1,1,1,1,1,
2,1,1,1,1,1,1,1,1,1,1,
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(NULL == pPort_cntrs)
return RT_ERR_NULL_POINTER;
/* Check port valid */
RTK_CHK_PORT_VALID(port);
accessPtr = (rtk_uint32*)pPort_cntrs;
for (mibIndex=0;mibIndex<STAT_PORT_CNTR_END;mibIndex++)
{
if ((retVal = rtk_stat_port_get(port, mibIndex, &mibCounter)) != RT_ERR_OK)
{
if (retVal == RT_ERR_CHIP_NOT_SUPPORTED)
mibCounter = 0;
else
return retVal;
}
if (2 == mibLength[mibIndex])
*(rtk_uint64*)accessPtr = mibCounter;
else if (1 == mibLength[mibIndex])
*accessPtr = mibCounter;
else
return RT_ERR_FAILED;
accessPtr+=mibLength[mibIndex];
}
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_logging_counterCfg_set
* Description:
* Set the type and mode of Logging Counter
* Input:
* idx - The index of Logging Counter. Should be even number only.(0,2,4,6,8.....30)
* mode - 32 bits or 64 bits mode
* type - Packet counter or byte counter
* Output:
* None.
* Return:
* RT_ERR_OK - OK
* RT_ERR_OUT_OF_RANGE - Out of range.
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* Set the type and mode of Logging Counter.
*/
rtk_api_ret_t rtk_stat_logging_counterCfg_set(rtk_uint32 idx, rtk_logging_counter_mode_t mode, rtk_logging_counter_type_t type)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(idx > RTL8367C_MIB_MAX_LOG_CNT_IDX)
return RT_ERR_OUT_OF_RANGE;
if((idx % 2) == 1)
return RT_ERR_INPUT;
if(mode >= LOGGING_MODE_END)
return RT_ERR_OUT_OF_RANGE;
if(type >= LOGGING_TYPE_END)
return RT_ERR_OUT_OF_RANGE;
if((retVal = rtl8367c_setAsicMIBsLoggingType((idx / 2), (rtk_uint32)type)) != RT_ERR_OK)
return retVal;
if((retVal = rtl8367c_setAsicMIBsLoggingMode((idx / 2), (rtk_uint32)mode)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_logging_counterCfg_get
* Description:
* Get the type and mode of Logging Counter
* Input:
* idx - The index of Logging Counter. Should be even number only.(0,2,4,6,8.....30)
* Output:
* pMode - 32 bits or 64 bits mode
* pType - Packet counter or byte counter
* Return:
* RT_ERR_OK - OK
* RT_ERR_OUT_OF_RANGE - Out of range.
* RT_ERR_FAILED - Failed
* RT_ERR_NULL_POINTER - NULL Pointer
* RT_ERR_SMI - SMI access error
* RT_ERR_INPUT - Invalid input parameters.
* Note:
* Get the type and mode of Logging Counter.
*/
rtk_api_ret_t rtk_stat_logging_counterCfg_get(rtk_uint32 idx, rtk_logging_counter_mode_t *pMode, rtk_logging_counter_type_t *pType)
{
rtk_api_ret_t retVal;
rtk_uint32 type, mode;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(idx > RTL8367C_MIB_MAX_LOG_CNT_IDX)
return RT_ERR_OUT_OF_RANGE;
if((idx % 2) == 1)
return RT_ERR_INPUT;
if(pMode == NULL)
return RT_ERR_NULL_POINTER;
if(pType == NULL)
return RT_ERR_NULL_POINTER;
if((retVal = rtl8367c_getAsicMIBsLoggingType((idx / 2), &type)) != RT_ERR_OK)
return retVal;
if((retVal = rtl8367c_getAsicMIBsLoggingMode((idx / 2), &mode)) != RT_ERR_OK)
return retVal;
*pMode = (rtk_logging_counter_mode_t)mode;
*pType = (rtk_logging_counter_type_t)type;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_logging_counter_reset
* Description:
* Reset Logging Counter
* Input:
* idx - The index of Logging Counter. (0~31)
* Output:
* None.
* Return:
* RT_ERR_OK - OK
* RT_ERR_OUT_OF_RANGE - Out of range.
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
* Reset Logging Counter.
*/
rtk_api_ret_t rtk_stat_logging_counter_reset(rtk_uint32 idx)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(idx > RTL8367C_MIB_MAX_LOG_CNT_IDX)
return RT_ERR_OUT_OF_RANGE;
if((retVal = rtl8367c_setAsicMIBsResetLoggingCounter(idx)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_logging_counter_get
* Description:
* Get Logging Counter
* Input:
* idx - The index of Logging Counter. (0~31)
* Output:
* pCnt - Logging counter value
* Return:
* RT_ERR_OK - OK
* RT_ERR_OUT_OF_RANGE - Out of range.
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
* Get Logging Counter.
*/
rtk_api_ret_t rtk_stat_logging_counter_get(rtk_uint32 idx, rtk_uint32 *pCnt)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(NULL == pCnt)
return RT_ERR_NULL_POINTER;
if(idx > RTL8367C_MIB_MAX_LOG_CNT_IDX)
return RT_ERR_OUT_OF_RANGE;
if((retVal = rtl8367c_getAsicMIBsLogCounter(idx, pCnt)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_lengthMode_set
* Description:
* Set Legnth mode.
* Input:
* txMode - The length counting mode
* rxMode - The length counting mode
* Output:
* None.
* Return:
* RT_ERR_OK - OK
* RT_ERR_INPUT - Out of range.
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
*
*/
rtk_api_ret_t rtk_stat_lengthMode_set(rtk_stat_lengthMode_t txMode, rtk_stat_lengthMode_t rxMode)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(txMode >= LENGTH_MODE_END)
return RT_ERR_INPUT;
if(rxMode >= LENGTH_MODE_END)
return RT_ERR_INPUT;
if((retVal = rtl8367c_setAsicMIBsLength((rtk_uint32)txMode, (rtk_uint32)rxMode)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
/* Function Name:
* rtk_stat_lengthMode_get
* Description:
* Get Legnth mode.
* Input:
* None.
* Output:
* pTxMode - The length counting mode
* pRxMode - The length counting mode
* Return:
* RT_ERR_OK - OK
* RT_ERR_INPUT - Out of range.
* RT_ERR_FAILED - Failed
* RT_ERR_SMI - SMI access error
* Note:
*/
rtk_api_ret_t rtk_stat_lengthMode_get(rtk_stat_lengthMode_t *pTxMode, rtk_stat_lengthMode_t *pRxMode)
{
rtk_api_ret_t retVal;
/* Check initialization state */
RTK_CHK_INIT_STATE();
if(NULL == pTxMode)
return RT_ERR_NULL_POINTER;
if(NULL == pRxMode)
return RT_ERR_NULL_POINTER;
if((retVal = rtl8367c_getAsicMIBsLength((rtk_uint32 *)pTxMode, (rtk_uint32 *)pRxMode)) != RT_ERR_OK)
return retVal;
return RT_ERR_OK;
}
|