/* * Copyright (C) 2012 Realtek Semiconductor Corp. * All Rights Reserved. * * This program is the proprietary software of Realtek Semiconductor * Corporation and/or its licensors, and only be used, duplicated, * modified or distributed under the authorized license from Realtek. * * ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER * THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. * * $Revision: 42093 $ * $Date: 2013-08-15 22:14:29 +0800 (星期四, 15 八月 2013) $ * * Purpose : Definition of Switch Global API * * Feature : The file have include the following module and sub-modules * (1) Switch parameter settings * (2) Management address and vlan configuration. * */ #ifndef __DAL_RTL8198F_SWITCH_H__ #define __DAL_RTL8198F_SWITCH_H__ /* * Include Files */ #include #include #include /* * Symbol Definition */ /* * Data Declaration */ /* * Function Declaration */ /* Module Name : Switch */ /* Sub-module Name: Switch parameter settings */ /* Function Name: * dal_rtl8198f_switch_init * Description: * Initialize switch module of the specified device. * Input: * None * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * Note: * Module must be initialized before using all of APIs in this module */ extern int32 dal_rtl8198f_switch_init(void); /* Function Name: * dal_rtl8198f_switch_phyPortId_get * Description: * Get physical port id from logical port name * Input: * portName - logical port name * Output: * pPortId - pointer to the physical port id * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NULL_POINTER - input parameter may be null pointer * Note: * Call RTK API the port ID must get from this API */ extern int32 dal_rtl8198f_switch_phyPortId_get(rtk_switch_port_name_t portName, int32 *pPortId); /* Function Name: * dal_rtl8198f_switch_version_get * Description: * Get chip version * Input: * pChipId - chip id * pRev - revision id * pSubtype - sub type * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NULL_POINTER - input parameter may be null pointer */ extern int32 dal_rtl8198f_switch_version_get(uint32 *pChipId, uint32 *pRev, uint32 *pSubtype); /* Function Name: * dal_rtl8198f_switch_maxPktLenByPort_get * Description: * Get the max packet length setting of specific port * Input: * port - speed type * Output: * pLen - pointer to the max packet length * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_NULL_POINTER - input parameter may be null pointer * RT_ERR_INPUT - invalid enum speed type * Note: */ extern int32 dal_rtl8198f_switch_maxPktLenByPort_get(rtk_port_t port, uint32 *pLen); /* Function Name: * dal_rtl8198f_switch_maxPktLenByPort_set * Description: * Set the max packet length of specific port * Input: * port - port * len - max packet length * Output: * None * Return: * RT_ERR_OK * RT_ERR_FAILED * RT_ERR_INPUT - invalid enum speed type * Note: */ extern int32 dal_rtl8198f_switch_maxPktLenByPort_set(rtk_port_t port, uint32 len); #endif /* __DAL_RTL8198F_SWITCH_H__ */