RDK-B
ccsp_hal_ethsw.h
Go to the documentation of this file.
1 /*
2  * If not stated otherwise in this file or this component's LICENSE file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 /**********************************************************************
21  Copyright [2014] [Cisco Systems, Inc.]
22 
23  Licensed under the Apache License, Version 2.0 (the "License");
24  you may not use this file except in compliance with the License.
25  You may obtain a copy of the License at
26 
27  http://www.apache.org/licenses/LICENSE-2.0
28 
29  Unless required by applicable law or agreed to in writing, software
30  distributed under the License is distributed on an "AS IS" BASIS,
31  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32  See the License for the specific language governing permissions and
33  limitations under the License.
34 **********************************************************************/
35 
36 /**********************************************************************
37 
38  module: ccsp_hal_ethsw.h
39 
40  For CCSP Component: Ccsp Provisioning & Managment
41 
42  ---------------------------------------------------------------
43 
44  description:
45 
46  This header file defines the structures and function prototypes
47  for Ethernet Switch control.
48 
49  ---------------------------------------------------------------
50 
51  environment:
52 
53  platform independent
54 
55  ---------------------------------------------------------------
56 
57  author:
58 
59  Cisco
60 
61 **********************************************************************/
62 
63 /**
64 * @file ccsp_hal_ethsw.h
65 * @author Cisco
66 * @brief For CCSP Component: Ccsp Provisioning & Managment
67 *
68 * @description This header file defines the structures and function prototypes for Ethernet Switch control.
69 */
70 
71 #ifndef __CCSP_HAL_ETHSW_H__
72 #define __CCSP_HAL_ETHSW_H__
73 
74 /**
75 * @defgroup ETHSW_HAL Ethernet Switch HAL
76 *
77 * @defgroup ETHSW_HAL_TYPES Ethernet Switch HAL Data Types
78 * @ingroup ETHSW_HAL
79 *
80 * @defgroup ETHSW_HAL_APIS Ethernet Switch HAL APIs
81 * @ingroup ETHSW_HAL
82 *
83 **/
84 
85 
86 /**
87  * @addtogroup ETHSW_HAL_TYPES
88  * @{
89  */
90 
91 /**********************************************************************
92  CONSTANT DEFINITIONS
93 **********************************************************************/
94 
95 #ifndef ULONG
96 #define ULONG unsigned long
97 #endif
98 
99 #ifndef ULLONG
100 #define ULLONG unsigned long long
101 #endif
102 
103 #ifndef CHAR
104 #define CHAR char
105 #endif
106 
107 #ifndef UCHAR
108 #define UCHAR unsigned char
109 #endif
110 
111 #ifndef BOOLEAN
112 #define BOOLEAN UCHAR
113 #endif
114 
115 #ifndef INT
116 #define INT int
117 #endif
118 
119 #ifndef UINT
120 #define UINT unsigned int
121 #endif
122 
123 #ifndef TRUE
124 #define TRUE 1
125 #endif
126 
127 #ifndef FALSE
128 #define FALSE 0
129 #endif
130 
131 #ifndef ENABLE
132 #define ENABLE 1
133 #endif
134 
135 #ifndef RETURN_OK
136 #define RETURN_OK 0
137 #endif
138 
139 #ifndef RETURN_ERR
140 #define RETURN_ERR -1
141 #endif
142 
143 #ifndef ETHWAN_DEF_INTF_NUM
144 /*
145 * ETH WAN Physical Interface Number Assignment - Should eventually move away from Compile Time
146 * Utilized by Auto WAN feature in provisioning Apps & CCSP Eth Agent with Ethernet WAN Feature, CcspHalExtSw_setEthWanPort()
147 * ETh WAN HAL is 0 based
148 */
149 #if defined (ETH_6_PORTS)
150 #define ETHWAN_DEF_INTF_NUM 5
151 #elif defined (ETH_4_PORTS)
152 #define ETHWAN_DEF_INTF_NUM 3
153 #else
154 /* Default to Physical Port #1 for ETH WAN */
155 #define ETHWAN_DEF_INTF_NUM 0
156 #endif
157 #endif
158 
159 #ifndef ETHWAN_INTERFACE_NAME_MAX_LENGTH
160 /*
161 * Define a MAX ETH WAN Interface Name Length for GetEthWanInterfaceName
162 * TO DO: GetEthWanInterfaceName HAL/API needs to be updated to pass in buffer size as well
163 */
164 #define ETHWAN_INTERFACE_NAME_MAX_LENGTH 32
165 #endif
166 
167 /**********************************************************************
168  STRUCTURE DEFINITIONS
169 **********************************************************************/
170 
171 typedef enum
173 {
182 
185 
190 
193 
196 
199 }
201 
202 
203 typedef enum
205 {
214 }
216 
217 
218 typedef enum
220 {
224 }
226 
227 
228 typedef enum
230 {
234 }
236 
237 
238 typedef enum
240 {
244 }
246 
247 
248 typedef struct
250 {
266 }
268 
269 /**
270  * @}
271  */
272 
273 
274 /**
275  * @addtogroup ETHSW_HAL_APIS
276  * @{
277  */
278 
279 /**********************************************************************
280  STRUCTURE DEFINITIONS
281 **********************************************************************/
282 
283 /* CcspHalEthSwInit : */
284 /**
285 * @description Do what needed to intialize the Eth hal.
286 *
287 * @param None
288 *
289 * @return The status of the operation.
290 * @retval RETURN_OK if successful.
291 * @retval RETURN_ERR if any error is detected
292 *
293 * @execution Synchronous.
294 * @sideeffect None.
295 
296 *
297 * @note This function must not suspend and must not invoke any blocking system
298 * calls. It should probably just send a message to a driver event handler task.
299 *
300 */
301 INT
303  (
304  void
305  );
306 
307 
308 /* CcspHalEthSwGetPortStatus : */
309 /**
310 * @description Retrieve the current port status -- link speed, duplex mode, etc.
311 
312 * @param PortId -- Port ID as defined in CCSP_HAL_ETHSW_PORT
313 * @param pLinkRate -- Receives the current link rate, as in CCSP_HAL_ETHSW_LINK_RATE
314 * @param pDuplexMode -- Receives the current duplex mode, as in CCSP_HAL_ETHSW_DUPLEX_MODE
315 * @param pStatus -- Receives the current link status, as in CCSP_HAL_ETHSW_LINK_STATUS
316 
317 *
318 * @return The status of the operation.
319 * @retval RETURN_OK if successful.
320 * @retval RETURN_ERR if any error is detected
321 *
322 * @execution Synchronous.
323 * @sideeffect None.
324 
325 *
326 * @note This function must not suspend and must not invoke any blocking system
327 * calls. It should probably just send a message to a driver event handler task.
328 *
329 */
330 INT
332  (
333  CCSP_HAL_ETHSW_PORT PortId,
334  PCCSP_HAL_ETHSW_LINK_RATE pLinkRate,
335  PCCSP_HAL_ETHSW_DUPLEX_MODE pDuplexMode,
337  );
338 
339 
340 /* CcspHalEthSwGetPortCfg : */
341 /**
342 * @description Retrieve the current port config -- link speed, duplex mode, etc.
343 
344 * @param PortId -- Port ID as defined in CCSP_HAL_ETHSW_PORT
345 * @param pLinkRate -- Receives the current link rate, as in CCSP_HAL_ETHSW_LINK_RATE
346 * @param pDuplexMode -- Receives the current duplex mode, as in CCSP_HAL_ETHSW_DUPLEX_MODE
347 
348 *
349 * @return The status of the operation.
350 * @retval RETURN_OK if successful.
351 * @retval RETURN_ERR if any error is detected
352 *
353 * @execution Synchronous.
354 * @sideeffect None.
355 
356 *
357 * @note This function must not suspend and must not invoke any blocking system
358 * calls. It should probably just send a message to a driver event handler task.
359 *
360 */
361 INT
363  (
364  CCSP_HAL_ETHSW_PORT PortId,
365  PCCSP_HAL_ETHSW_LINK_RATE pLinkRate,
366  PCCSP_HAL_ETHSW_DUPLEX_MODE pDuplexMode
367  );
368 
369 
370 /* CcspHalEthSwSetPortCfg : */
371 /**
372 * @description Set the port configuration -- link speed, duplex mode
373 
374 * @param PortId -- Port ID as defined in CCSP_HAL_ETHSW_PORT
375 * @param LinkRate -- Set the link rate, as in CCSP_HAL_ETHSW_LINK_RATE
376 * @param DuplexMode -- Set the duplex mode, as in CCSP_HAL_ETHSW_DUPLEX_MODE
377 
378 *
379 * @return The status of the operation.
380 * @retval RETURN_OK if successful.
381 * @retval RETURN_ERR if any error is detected
382 *
383 * @execution Synchronous.
384 * @sideeffect None.
385 
386 *
387 * @note This function must not suspend and must not invoke any blocking system
388 * calls. It should probably just send a message to a driver event handler task.
389 *
390 */
391 INT
393  (
394  CCSP_HAL_ETHSW_PORT PortId,
395  CCSP_HAL_ETHSW_LINK_RATE LinkRate,
396  CCSP_HAL_ETHSW_DUPLEX_MODE DuplexMode
397  );
398 
399 
400 /* CcspHalEthSwGetPortAdminStatus : */
401 /**
402 * @description Retrieve the current port admin status.
403 
404 * @param PortId -- Port ID as defined in CCSP_HAL_ETHSW_PORT
405 * @param pAdminStatus -- Receives the current admin status
406 
407 *
408 * @return The status of the operation.
409 * @retval RETURN_OK if successful.
410 * @retval RETURN_ERR if any error is detected
411 *
412 * @execution Synchronous.
413 * @sideeffect None.
414 
415 *
416 * @note This function must not suspend and must not invoke any blocking system
417 * calls. It should probably just send a message to a driver event handler task.
418 *
419 */
420 INT
422  (
423  CCSP_HAL_ETHSW_PORT PortId,
424  PCCSP_HAL_ETHSW_ADMIN_STATUS pAdminStatus
425  );
426 
427 
428 /* CcspHalEthSwSetPortAdminStatus : */
429 /**
430 * @description Set the ethernet port admin status
431 
432 * @param AdminStatus -- Set the admin status, as defined in CCSP_HAL_ETHSW_ADMIN_STATUS
433 *
434 * @return The status of the operation.
435 * @retval RETURN_OK if successful.
436 * @retval RETURN_ERR if any error is detected
437 *
438 * @execution Synchronous.
439 * @sideeffect None.
440 
441 *
442 * @note This function must not suspend and must not invoke any blocking system
443 * calls. It should probably just send a message to a driver event handler task.
444 *
445 */
446 INT
448  (
449  CCSP_HAL_ETHSW_PORT PortId,
450  CCSP_HAL_ETHSW_ADMIN_STATUS AdminStatus
451  );
452 
453 
454 /* CcspHalEthSwSetAgingSpeed : */
455 /**
456 * @description Set the ethernet port configuration -- admin up/down, link speed, duplex mode
457 
458 * @param PortId -- Port ID as defined in CCSP_HAL_ETHSW_PORT
459 * @param AgingSpeed -- Integer value of aging speed
460 *
461 * @return The status of the operation.
462 * @retval RETURN_OK if successful.
463 * @retval RETURN_ERR if any error is detected
464 *
465 * @execution Synchronous.
466 * @sideeffect None.
467 
468 *
469 * @note This function must not suspend and must not invoke any blocking system
470 * calls. It should probably just send a message to a driver event handler task.
471 *
472 */
473 INT
475  (
476  CCSP_HAL_ETHSW_PORT PortId,
477  INT AgingSpeed
478  );
479 
480 /* CcspHalEthSwLocatePortByMacAddress : */
481 /**
482 * @description Query Moca and External switch port for the given MAC address
483 
484 * @param mac -- MAC address to search for
485 * @param port -- The return values are: 0: MoCA, 1-4: Ethernet port
486 *
487 * @return The status of the operation.
488 * @retval RETURN_OK if successful.
489 * @retval RETURN_ERR if any error is detected or MAC address is not found
490 *
491 * @execution Synchronous.
492 * @sideeffect None.
493 
494 *
495 * @note This function must not suspend and must not invoke any blocking system
496 * calls. It should probably just send a message to a driver event handler task.
497 *
498 */
499 INT
501  (
502  unsigned char * mac,
503  INT * port
504  );
505 
506 
507 //>>zqiu
508 //Ethernet HAL for client association/disassociation notification.
509 
510 /**
511  * @}
512  */
513 
514 /**
515  * @addtogroup ETHSW_HAL_TYPES
516  * @{
517  */
518 
519 typedef struct _eth_device {
521  INT eth_port; //!< which external port the device attached to. index start from 0
522  INT eth_vlanid; //!< what vlan ID the the port tagged.
523  INT eth_devTxRate; // optional
524  INT eth_devRxRate; // optional
525  BOOLEAN eth_Active; //device is online/offline
526 } eth_device_t;
527 /**
528  * @}
529  */
530 
531 
532 /**
533  * @addtogroup ETHSW_HAL_APIS
534  * @{
535  */
536 
537 INT CcspHalExtSw_getAssociatedDevice(ULONG *output_array_size, eth_device_t **output_struct); //!< The HAL need to allocate array and return the array size by output_array_size
538 
539 typedef INT ( * CcspHalExtSw_ethAssociatedDevice_callback)(eth_device_t *eth_dev); //!< This call back will be invoked when new Ethernet client come to associate to AP, or existing Ethernet client left.
540 
541 void CcspHalExtSw_ethAssociatedDevice_callback_register(CcspHalExtSw_ethAssociatedDevice_callback callback_proc); //!< Callback registration function.
542 
543 #ifdef FEATURE_RDKB_WAN_MANAGER
544 #ifdef FEATURE_RDKB_AUTO_PORT_SWITCH
545 int CcspHalExtSw_ethPortConfigure(char *ifname, BOOLEAN WanMode);
546 #endif //FEATURE_RDKB_AUTO_PORT_SWITCH
547 #endif
548 //<<
549 
550 /* CcspHalExtSw_getEthWanEnable() function */
551 /**
552 * @description Get EthernetWAN enable status.
553 *
554 * @param pFlag - Pointer to BOOLEAN to store current EthernetWAN enable value
555 *
556 * @return The status of the operation
557 * @retval RETURN_OK if successful
558 * @retval RETURN_ERR if any error is detected
559 *
560 * @sideeffect None
561 */
562 INT
564  (
565  BOOLEAN * pFlag
566  );
567 
568 /* CcspHalExtSw_setEthWanEnable() function */
569 /**
570 * @description Enable/Disable EthernetWAN functionality.
571 *
572 * @param Flag - EthernetWAN enable value
573 *
574 * @return The status of the operation
575 * @retval RETURN_OK if successful
576 * @retval RETURN_ERR if any error is detected
577 *
578 * @sideeffect None
579 */
580 INT
582  (
583  BOOLEAN Flag
584  );
585 
586 #ifdef FEATURE_RDKB_AUTO_PORT_SWITCH
587 /* CcspHalExtSw_getCurrentWanHWConf() function */
588 /**
589 * @description Returns running HW configuration.
590 *
591 * @return Returns running HW configuration.
592 * @retval TRUE if WAN is enabled.
593 * @retval FALSE IF LAN is enabled.
594 *
595 * @sideeffect None
596 */
597 BOOLEAN CcspHalExtSw_getCurrentWanHWConf();
598 #endif
599 
600 /* CcspHalExtSw_getEthWanPort() function */
601 /**
602 * @description Get EthernetWAN port number value.
603 *
604 * @param pPort - Pointer to UINT value to store current setting
605 *
606 * @return The status of the operation
607 * @retval RETURN_OK if successful
608 * @retval RETURN_ERR if any error is detected
609 *
610 * @sideeffect None
611 */
612 INT
614  (
615  UINT * pPort
616  );
617 
618 /* CcspHalExtSw_setEthWanPort() function */
619 /**
620 * @description Set EthernetWAN interface/port number.
621 *
622 * @param Port - UINT value to set the setting
623 *
624 * @return The status of the operation
625 * @retval RETURN_OK if successful
626 * @retval RETURN_ERR if any error is detected
627 *
628 * @sideeffect None
629 */
630 INT
632  (
633  UINT Port
634  );
635 
636 /* CcspHalEthSwGetEthPortStats : */
637 /**
638 * Description: Retrieve the current port's statistics.
639 
640 * Parameters :
641  PortId -- Port ID as defined in CCSP_HAL_ETHSW_PORT
642  pStats -- Receives port statistics
643 
644 *
645 * @return The status of the operation.
646 * @retval RETURN_OK if successful.
647 * @retval RETURN_ERR if any error is detected
648 *
649 * @execution Synchronous.
650 * @sideeffect None.
651 
652 *
653 * @note This function must not suspend and must not invoke any blocking system 
654 * calls. It should probably just send a message to a driver event handler task.
655 *
656 */
657 INT
659  (
660  CCSP_HAL_ETHSW_PORT PortId,
661  PCCSP_HAL_ETH_STATS pStats
662  );
663 /**
664  * @}
665  */
666 
667 
668 /**
669  * @addtogroup ETHSW_HAL_TYPES
670  * @{
671  */
672 
673 /*
674 * @brief Define callback function pointers which needs to be called
675 * from provisioning abstraction layer when any provisioning
676 * event occurs.
677 */
678 typedef void ( *fpEthWanLink_Up ) ( ) ; /**< RDKB expects this callback once EthWan link is UP */
679 typedef void ( *fpEthWanLink_Down ) ( ) ; /**< RDKB expects this callback once EthWan link is Down */
680 
681 /*! \var typedef struct __appCallBack
682 * \brief struct of pointers to the function pointers of callback functions.
683 */
684 
685 typedef struct __appCallBack
686 {
689 }appCallBack;
690 
691 /**
692  * @}
693  */
694 
695 /**
696  * @addtogroup ETHSW_HAL_APIS
697  * @{
698  */
699 void GWP_RegisterEthWan_Callback(appCallBack *obj); //!< This function will get used to register RDKB functions to the callback pointers
700 
701 INT GWP_GetEthWanLinkStatus(); /**< Returns 1 if active, 0 for inactive */ // RDKB will call this
702 
703 INT
705  (
706  unsigned char * Interface,
707  ULONG maxSize
708  ); //!< This function will get used to retrieve the ETHWAN interface name. API returns 0 = success and 1 = fail
709 
710 
711 #define UP "up"
712 #define DOWN "down"
713 
714 #endif /* __CCSP_HAL_ETHSW_H__ */
715 
716 /**
717  * @}
718  */
719 
720 
CCSP_HAL_ETHSW_EthPort1
@ CCSP_HAL_ETHSW_EthPort1
Definition: ccsp_hal_ethsw.h:176
CcspHalEthSwSetPortAdminStatus
int CcspHalEthSwSetPortAdminStatus(CCSP_HAL_ETHSW_PORT PortId, CCSP_HAL_ETHSW_ADMIN_STATUS AdminStatus)
CcspHalExtSw_setEthWanPort
int CcspHalExtSw_setEthWanPort(unsigned int Port)
_CCSP_HAL_ETH_STATS::ErrorsReceived
unsigned long ErrorsReceived
Definition: ccsp_hal_ethsw.h:256
ULLONG
#define ULLONG
Definition: ccsp_hal_ethsw.h:100
_CCSP_HAL_ETH_STATS::BroadcastPacketsSent
unsigned long BroadcastPacketsSent
Definition: ccsp_hal_ethsw.h:263
CcspHalExtSw_ethAssociatedDevice_callback_register
void CcspHalExtSw_ethAssociatedDevice_callback_register(CcspHalExtSw_ethAssociatedDevice_callback callback_proc)
Callback registration function.
_CCSP_HAL_ETH_STATS::BytesSent
unsigned long long BytesSent
Definition: ccsp_hal_ethsw.h:251
CCSP_HAL_ETHSW_LINK_Up
@ CCSP_HAL_ETHSW_LINK_Up
Definition: ccsp_hal_ethsw.h:231
CCSP_HAL_ETHSW_InterconnectPort2
@ CCSP_HAL_ETHSW_InterconnectPort2
Definition: ccsp_hal_ethsw.h:197
CCSP_HAL_ETHSW_ADMIN_STATUS
enum _CCSP_HAL_ETHSW_ADMIN_STATUS CCSP_HAL_ETHSW_ADMIN_STATUS
_eth_device
Definition: ccsp_hal_ethsw.h:519
CCSP_HAL_ETHSW_EthPort2
@ CCSP_HAL_ETHSW_EthPort2
Definition: ccsp_hal_ethsw.h:177
CCSP_HAL_ETHSW_LINK_RATE
enum _CCSP_HAL_ETHSW_LINK_RATE CCSP_HAL_ETHSW_LINK_RATE
_CCSP_HAL_ETHSW_ADMIN_STATUS
_CCSP_HAL_ETHSW_ADMIN_STATUS
Definition: ccsp_hal_ethsw.h:238
CcspHalEthSwInit
int CcspHalEthSwInit(void)
CcspHalEthSwSetAgingSpeed
int CcspHalEthSwSetAgingSpeed(CCSP_HAL_ETHSW_PORT PortId, int AgingSpeed)
CCSP_HAL_ETHSW_DUPLEX_MODE
enum _CCSP_HAL_ETHSW_DUPLEX_MODE CCSP_HAL_ETHSW_DUPLEX_MODE
CCSP_HAL_ETHSW_DUPLEX_Auto
@ CCSP_HAL_ETHSW_DUPLEX_Auto
Definition: ccsp_hal_ethsw.h:221
CCSP_HAL_ETHSW_PortMax
@ CCSP_HAL_ETHSW_PortMax
Definition: ccsp_hal_ethsw.h:200
CCSP_HAL_ETHSW_AdminUp
@ CCSP_HAL_ETHSW_AdminUp
Definition: ccsp_hal_ethsw.h:241
PCCSP_HAL_ETHSW_PORT
enum _CCSP_HAL_ETHSW_PORT * PCCSP_HAL_ETHSW_PORT
_eth_device::eth_port
int eth_port
which external port the device attached to. index start from 0
Definition: ccsp_hal_ethsw.h:521
CCSP_HAL_ETHSW_AdminTest
@ CCSP_HAL_ETHSW_AdminTest
Definition: ccsp_hal_ethsw.h:243
CcspHalEthSwGetEthPortStats
int CcspHalEthSwGetEthPortStats(CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETH_STATS pStats)
CCSP_HAL_ETHSW_Wlan2
@ CCSP_HAL_ETHSW_Wlan2
Definition: ccsp_hal_ethsw.h:189
fpEthWanLink_Down
void(* fpEthWanLink_Down)()
Definition: ccsp_hal_ethsw.h:679
CcspHalEthSwLocatePortByMacAddress
int CcspHalEthSwLocatePortByMacAddress(unsigned char *mac, int *port)
CCSP_HAL_ETHSW_LINK_Down
@ CCSP_HAL_ETHSW_LINK_Down
Definition: ccsp_hal_ethsw.h:232
CCSP_HAL_ETHSW_EthPort7
@ CCSP_HAL_ETHSW_EthPort7
Definition: ccsp_hal_ethsw.h:182
appCallBack
struct __appCallBack appCallBack
_CCSP_HAL_ETH_STATS::BroadcastPacketsReceived
unsigned long BroadcastPacketsReceived
Definition: ccsp_hal_ethsw.h:264
CCSP_HAL_ETH_STATS
struct _CCSP_HAL_ETH_STATS CCSP_HAL_ETH_STATS
_CCSP_HAL_ETH_STATS
Definition: ccsp_hal_ethsw.h:248
_CCSP_HAL_ETHSW_LINK_STATUS
_CCSP_HAL_ETHSW_LINK_STATUS
Definition: ccsp_hal_ethsw.h:228
PCCSP_HAL_ETHSW_DUPLEX_MODE
enum _CCSP_HAL_ETHSW_DUPLEX_MODE * PCCSP_HAL_ETHSW_DUPLEX_MODE
_CCSP_HAL_ETH_STATS::MulticastPacketsReceived
unsigned long MulticastPacketsReceived
Definition: ccsp_hal_ethsw.h:262
CcspHalEthSwGetPortStatus
int CcspHalEthSwGetPortStatus(CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETHSW_LINK_RATE pLinkRate, PCCSP_HAL_ETHSW_DUPLEX_MODE pDuplexMode, PCCSP_HAL_ETHSW_LINK_STATUS pStatus)
CCSP_HAL_ETHSW_LINK_100Mbps
@ CCSP_HAL_ETHSW_LINK_100Mbps
Definition: ccsp_hal_ethsw.h:208
_CCSP_HAL_ETH_STATS::MulticastPacketsSent
unsigned long MulticastPacketsSent
Definition: ccsp_hal_ethsw.h:261
CCSP_HAL_ETHSW_LINK_10Gbps
@ CCSP_HAL_ETHSW_LINK_10Gbps
Definition: ccsp_hal_ethsw.h:212
_CCSP_HAL_ETH_STATS::PacketsSent
unsigned long PacketsSent
Definition: ccsp_hal_ethsw.h:253
BOOLEAN
#define BOOLEAN
Definition: ccsp_hal_ethsw.h:112
CCSP_HAL_ETHSW_EthPort4
@ CCSP_HAL_ETHSW_EthPort4
Definition: ccsp_hal_ethsw.h:179
CCSP_HAL_ETHSW_LINK_Disconnected
@ CCSP_HAL_ETHSW_LINK_Disconnected
Definition: ccsp_hal_ethsw.h:233
GWP_RegisterEthWan_Callback
void GWP_RegisterEthWan_Callback(appCallBack *obj)
This function will get used to register RDKB functions to the callback pointers.
__appCallBack::pGWP_act_EthWanLinkDown
fpEthWanLink_Down pGWP_act_EthWanLinkDown
Definition: ccsp_hal_ethsw.h:688
__appCallBack::pGWP_act_EthWanLinkUP
fpEthWanLink_Up pGWP_act_EthWanLinkUP
Definition: ccsp_hal_ethsw.h:687
GWP_GetEthWanInterfaceName
int GWP_GetEthWanInterfaceName(unsigned char *Interface, unsigned long maxSize)
This function will get used to retrieve the ETHWAN interface name. API returns 0 = success and 1 = fa...
_CCSP_HAL_ETH_STATS::UnicastPacketsSent
unsigned long UnicastPacketsSent
Definition: ccsp_hal_ethsw.h:257
PCCSP_HAL_ETHSW_LINK_RATE
enum _CCSP_HAL_ETHSW_LINK_RATE * PCCSP_HAL_ETHSW_LINK_RATE
PCCSP_HAL_ETHSW_LINK_STATUS
enum _CCSP_HAL_ETHSW_LINK_STATUS * PCCSP_HAL_ETHSW_LINK_STATUS
CCSP_HAL_ETHSW_Processor1
@ CCSP_HAL_ETHSW_Processor1
Definition: ccsp_hal_ethsw.h:193
CCSP_HAL_ETHSW_LINK_1Gbps
@ CCSP_HAL_ETHSW_LINK_1Gbps
Definition: ccsp_hal_ethsw.h:209
CcspHalExtSw_getAssociatedDevice
int CcspHalExtSw_getAssociatedDevice(unsigned long *output_array_size, eth_device_t **output_struct)
The HAL need to allocate array and return the array size by output_array_size.
_CCSP_HAL_ETH_STATS::BytesReceived
unsigned long long BytesReceived
Definition: ccsp_hal_ethsw.h:252
CcspHalEthSwSetPortCfg
int CcspHalEthSwSetPortCfg(CCSP_HAL_ETHSW_PORT PortId, CCSP_HAL_ETHSW_LINK_RATE LinkRate, CCSP_HAL_ETHSW_DUPLEX_MODE DuplexMode)
_eth_device::eth_vlanid
int eth_vlanid
what vlan ID the the port tagged.
Definition: ccsp_hal_ethsw.h:522
_eth_device::eth_devRxRate
int eth_devRxRate
Definition: ccsp_hal_ethsw.h:524
__appCallBack
Definition: ccsp_hal_ethsw.h:685
CcspHalEthSwGetPortCfg
int CcspHalEthSwGetPortCfg(CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETHSW_LINK_RATE pLinkRate, PCCSP_HAL_ETHSW_DUPLEX_MODE pDuplexMode)
_CCSP_HAL_ETH_STATS::UnicastPacketsReceived
unsigned long UnicastPacketsReceived
Definition: ccsp_hal_ethsw.h:258
CCSP_HAL_ETHSW_Moca2
@ CCSP_HAL_ETHSW_Moca2
Definition: ccsp_hal_ethsw.h:186
_CCSP_HAL_ETH_STATS::DiscardPacketsReceived
unsigned long DiscardPacketsReceived
Definition: ccsp_hal_ethsw.h:260
CCSP_HAL_ETHSW_EthPort3
@ CCSP_HAL_ETHSW_EthPort3
Definition: ccsp_hal_ethsw.h:178
_CCSP_HAL_ETH_STATS::DiscardPacketsSent
unsigned long DiscardPacketsSent
Definition: ccsp_hal_ethsw.h:259
eth_device_t
struct _eth_device eth_device_t
_eth_device::eth_devTxRate
int eth_devTxRate
Definition: ccsp_hal_ethsw.h:523
CcspHalEthSwGetPortAdminStatus
int CcspHalEthSwGetPortAdminStatus(CCSP_HAL_ETHSW_PORT PortId, PCCSP_HAL_ETHSW_ADMIN_STATUS pAdminStatus)
_CCSP_HAL_ETHSW_PORT
_CCSP_HAL_ETHSW_PORT
Definition: ccsp_hal_ethsw.h:171
GWP_GetEthWanLinkStatus
int GWP_GetEthWanLinkStatus()
CCSP_HAL_ETHSW_EthPort5
@ CCSP_HAL_ETHSW_EthPort5
Definition: ccsp_hal_ethsw.h:180
CCSP_HAL_ETHSW_EthPort8
@ CCSP_HAL_ETHSW_EthPort8
Definition: ccsp_hal_ethsw.h:183
CCSP_HAL_ETHSW_InterconnectPort1
@ CCSP_HAL_ETHSW_InterconnectPort1
Definition: ccsp_hal_ethsw.h:196
CCSP_HAL_ETHSW_LINK_NULL
@ CCSP_HAL_ETHSW_LINK_NULL
Definition: ccsp_hal_ethsw.h:206
_eth_device::eth_devMacAddress
unsigned char eth_devMacAddress[6]
Definition: ccsp_hal_ethsw.h:520
CCSP_HAL_ETHSW_EthPort6
@ CCSP_HAL_ETHSW_EthPort6
Definition: ccsp_hal_ethsw.h:181
CcspHalExtSw_getEthWanPort
int CcspHalExtSw_getEthWanPort(unsigned int *pPort)
UCHAR
#define UCHAR
Definition: ccsp_hal_ethsw.h:108
CcspHalExtSw_ethAssociatedDevice_callback
int(* CcspHalExtSw_ethAssociatedDevice_callback)(eth_device_t *eth_dev)
This call back will be invoked when new Ethernet client come to associate to AP, or existing Ethernet...
Definition: ccsp_hal_ethsw.h:539
CCSP_HAL_ETHSW_Wlan1
@ CCSP_HAL_ETHSW_Wlan1
Definition: ccsp_hal_ethsw.h:188
CCSP_HAL_ETHSW_Wlan4
@ CCSP_HAL_ETHSW_Wlan4
Definition: ccsp_hal_ethsw.h:191
CCSP_HAL_ETHSW_LINK_STATUS
enum _CCSP_HAL_ETHSW_LINK_STATUS CCSP_HAL_ETHSW_LINK_STATUS
CCSP_HAL_ETHSW_LINK_2_5Gbps
@ CCSP_HAL_ETHSW_LINK_2_5Gbps
Definition: ccsp_hal_ethsw.h:210
CCSP_HAL_ETHSW_DUPLEX_Half
@ CCSP_HAL_ETHSW_DUPLEX_Half
Definition: ccsp_hal_ethsw.h:222
_CCSP_HAL_ETH_STATS::UnknownProtoPacketsReceived
unsigned long UnknownProtoPacketsReceived
Definition: ccsp_hal_ethsw.h:265
PCCSP_HAL_ETH_STATS
struct _CCSP_HAL_ETH_STATS * PCCSP_HAL_ETH_STATS
_CCSP_HAL_ETHSW_DUPLEX_MODE
_CCSP_HAL_ETHSW_DUPLEX_MODE
Definition: ccsp_hal_ethsw.h:218
UINT
#define UINT
Definition: ccsp_hal_ethsw.h:120
CCSP_HAL_ETHSW_Wlan3
@ CCSP_HAL_ETHSW_Wlan3
Definition: ccsp_hal_ethsw.h:190
_CCSP_HAL_ETH_STATS::PacketsReceived
unsigned long PacketsReceived
Definition: ccsp_hal_ethsw.h:254
CCSP_HAL_ETHSW_PORT
enum _CCSP_HAL_ETHSW_PORT CCSP_HAL_ETHSW_PORT
CCSP_HAL_ETHSW_LINK_Auto
@ CCSP_HAL_ETHSW_LINK_Auto
Definition: ccsp_hal_ethsw.h:213
ULONG
#define ULONG
Definition: ccsp_hal_ethsw.h:96
PCCSP_HAL_ETHSW_ADMIN_STATUS
enum _CCSP_HAL_ETHSW_ADMIN_STATUS * PCCSP_HAL_ETHSW_ADMIN_STATUS
INT
#define INT
Definition: ccsp_hal_ethsw.h:116
CCSP_HAL_ETHSW_Moca1
@ CCSP_HAL_ETHSW_Moca1
Definition: ccsp_hal_ethsw.h:185
CCSP_HAL_ETHSW_LINK_10Mbps
@ CCSP_HAL_ETHSW_LINK_10Mbps
Definition: ccsp_hal_ethsw.h:207
CcspHalExtSw_setEthWanEnable
int CcspHalExtSw_setEthWanEnable(unsigned char Flag)
CCSP_HAL_ETHSW_LINK_5Gbps
@ CCSP_HAL_ETHSW_LINK_5Gbps
Definition: ccsp_hal_ethsw.h:211
CcspHalExtSw_getEthWanEnable
int CcspHalExtSw_getEthWanEnable(unsigned char *pFlag)
CCSP_HAL_ETHSW_AdminDown
@ CCSP_HAL_ETHSW_AdminDown
Definition: ccsp_hal_ethsw.h:242
fpEthWanLink_Up
void(* fpEthWanLink_Up)()
Definition: ccsp_hal_ethsw.h:678
CCSP_HAL_ETHSW_DUPLEX_Full
@ CCSP_HAL_ETHSW_DUPLEX_Full
Definition: ccsp_hal_ethsw.h:223
_CCSP_HAL_ETH_STATS::ErrorsSent
unsigned long ErrorsSent
Definition: ccsp_hal_ethsw.h:255
_eth_device::eth_Active
unsigned char eth_Active
Definition: ccsp_hal_ethsw.h:525
CCSP_HAL_ETHSW_Processor2
@ CCSP_HAL_ETHSW_Processor2
Definition: ccsp_hal_ethsw.h:194
_CCSP_HAL_ETHSW_LINK_RATE
_CCSP_HAL_ETHSW_LINK_RATE
Definition: ccsp_hal_ethsw.h:203
CCSP_HAL_ETHSW_MgmtPort
@ CCSP_HAL_ETHSW_MgmtPort
Definition: ccsp_hal_ethsw.h:199