RDK-B
|
Macros | |
#define | UP "up" |
#define | DOWN "down" |
Typedefs | |
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. More... | |
#define UP "up" |
Definition at line 711 of file ccsp_hal_ethsw.h.
#define DOWN "down" |
Definition at line 712 of file ccsp_hal_ethsw.h.
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.
Definition at line 539 of file ccsp_hal_ethsw.h.
int CcspHalEthSwInit | ( | void | ) |
@description Do what needed to intialize the Eth hal.
None |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
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 | ||
) |
@description Retrieve the current port status – link speed, duplex mode, etc.
PortId | – Port ID as defined in CCSP_HAL_ETHSW_PORT |
pLinkRate | – Receives the current link rate, as in CCSP_HAL_ETHSW_LINK_RATE |
pDuplexMode | – Receives the current duplex mode, as in CCSP_HAL_ETHSW_DUPLEX_MODE |
pStatus | – Receives the current link status, as in CCSP_HAL_ETHSW_LINK_STATUS |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
int CcspHalEthSwGetPortCfg | ( | CCSP_HAL_ETHSW_PORT | PortId, |
PCCSP_HAL_ETHSW_LINK_RATE | pLinkRate, | ||
PCCSP_HAL_ETHSW_DUPLEX_MODE | pDuplexMode | ||
) |
@description Retrieve the current port config – link speed, duplex mode, etc.
PortId | – Port ID as defined in CCSP_HAL_ETHSW_PORT |
pLinkRate | – Receives the current link rate, as in CCSP_HAL_ETHSW_LINK_RATE |
pDuplexMode | – Receives the current duplex mode, as in CCSP_HAL_ETHSW_DUPLEX_MODE |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
int CcspHalEthSwSetPortCfg | ( | CCSP_HAL_ETHSW_PORT | PortId, |
CCSP_HAL_ETHSW_LINK_RATE | LinkRate, | ||
CCSP_HAL_ETHSW_DUPLEX_MODE | DuplexMode | ||
) |
@description Set the port configuration – link speed, duplex mode
PortId | – Port ID as defined in CCSP_HAL_ETHSW_PORT |
LinkRate | – Set the link rate, as in CCSP_HAL_ETHSW_LINK_RATE |
DuplexMode | – Set the duplex mode, as in CCSP_HAL_ETHSW_DUPLEX_MODE |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
int CcspHalEthSwGetPortAdminStatus | ( | CCSP_HAL_ETHSW_PORT | PortId, |
PCCSP_HAL_ETHSW_ADMIN_STATUS | pAdminStatus | ||
) |
@description Retrieve the current port admin status.
PortId | – Port ID as defined in CCSP_HAL_ETHSW_PORT |
pAdminStatus | – Receives the current admin status |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
int CcspHalEthSwSetPortAdminStatus | ( | CCSP_HAL_ETHSW_PORT | PortId, |
CCSP_HAL_ETHSW_ADMIN_STATUS | AdminStatus | ||
) |
@description Set the ethernet port admin status
AdminStatus | – Set the admin status, as defined in CCSP_HAL_ETHSW_ADMIN_STATUS |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
int CcspHalEthSwSetAgingSpeed | ( | CCSP_HAL_ETHSW_PORT | PortId, |
int | AgingSpeed | ||
) |
@description Set the ethernet port configuration – admin up/down, link speed, duplex mode
PortId | – Port ID as defined in CCSP_HAL_ETHSW_PORT |
AgingSpeed | – Integer value of aging speed |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
int CcspHalEthSwLocatePortByMacAddress | ( | unsigned char * | mac, |
int * | port | ||
) |
@description Query Moca and External switch port for the given MAC address
mac | – MAC address to search for |
port | – The return values are: 0: MoCA, 1-4: Ethernet port |
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected or MAC address is not found |
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.
void CcspHalExtSw_ethAssociatedDevice_callback_register | ( | CcspHalExtSw_ethAssociatedDevice_callback | callback_proc | ) |
Callback registration function.
int CcspHalExtSw_getEthWanEnable | ( | unsigned char * | pFlag | ) |
@description Get EthernetWAN enable status.
pFlag | - Pointer to BOOLEAN to store current EthernetWAN enable value |
RETURN_OK | if successful |
RETURN_ERR | if any error is detected |
int CcspHalExtSw_setEthWanEnable | ( | unsigned char | Flag | ) |
@description Enable/Disable EthernetWAN functionality.
Flag | - EthernetWAN enable value |
RETURN_OK | if successful |
RETURN_ERR | if any error is detected |
int CcspHalExtSw_getEthWanPort | ( | unsigned int * | pPort | ) |
@description Get EthernetWAN port number value.
pPort | - Pointer to UINT value to store current setting |
RETURN_OK | if successful |
RETURN_ERR | if any error is detected |
int CcspHalExtSw_setEthWanPort | ( | unsigned int | Port | ) |
@description Set EthernetWAN interface/port number.
Port | - UINT value to set the setting |
RETURN_OK | if successful |
RETURN_ERR | if any error is detected |
int CcspHalEthSwGetEthPortStats | ( | CCSP_HAL_ETHSW_PORT | PortId, |
PCCSP_HAL_ETH_STATS | pStats | ||
) |
Description: Retrieve the current port's statistics.
Parameters : PortId – Port ID as defined in CCSP_HAL_ETHSW_PORT pStats – Receives port statistics
RETURN_OK | if successful. |
RETURN_ERR | if any error is detected |
void GWP_RegisterEthWan_Callback | ( | appCallBack * | obj | ) |
This function will get used to register RDKB functions to the callback pointers.
int GWP_GetEthWanLinkStatus | ( | ) |
Returns 1 if active, 0 for inactive
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 = fail.