2e3a682819db117b0932af2785e6962a44b040d8
[openwrt/openwrt.git] / target / linux / mediatek / files-5.10 / drivers / net / phy / rtk / rtl8367c / include / rtl8367c_asicdrv_trunking.h
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 (¶g¤T, 08 ¤T¤ë 2017) $
12 *
13 * Purpose : RTL8367C switch high-level API for RTL8367C
14 * Feature : Port trunking related functions
15 *
16 */
17
18
19 #ifndef _RTL8367C_ASICDRV_TRUNKING_H_
20 #define _RTL8367C_ASICDRV_TRUNKING_H_
21
22 #include <rtl8367c_asicdrv.h>
23
24 #define RTL8367C_MAX_TRUNK_GID (2)
25 #define RTL8367C_TRUNKING_PORTNO (4)
26 #define RTL8367C_TRUNKING1_PORTN0 (2)
27 #define RTL8367C_TRUNKING_HASHVALUE_MAX (15)
28
29 extern ret_t rtl8367c_setAsicTrunkingGroup(rtk_uint32 group, rtk_uint32 portmask);
30 extern ret_t rtl8367c_getAsicTrunkingGroup(rtk_uint32 group, rtk_uint32* pPortmask);
31 extern ret_t rtl8367c_setAsicTrunkingFlood(rtk_uint32 enabled);
32 extern ret_t rtl8367c_getAsicTrunkingFlood(rtk_uint32* pEnabled);
33 extern ret_t rtl8367c_setAsicTrunkingHashSelect(rtk_uint32 hashsel);
34 extern ret_t rtl8367c_getAsicTrunkingHashSelect(rtk_uint32* pHashsel);
35
36 extern ret_t rtl8367c_getAsicQeueuEmptyStatus(rtk_uint32* pPortmask);
37
38 extern ret_t rtl8367c_setAsicTrunkingMode(rtk_uint32 mode);
39 extern ret_t rtl8367c_getAsicTrunkingMode(rtk_uint32* pMode);
40 extern ret_t rtl8367c_setAsicTrunkingFc(rtk_uint32 group, rtk_uint32 enabled);
41 extern ret_t rtl8367c_getAsicTrunkingFc(rtk_uint32 group, rtk_uint32* pEnabled);
42 extern ret_t rtl8367c_setAsicTrunkingHashTable(rtk_uint32 hashval, rtk_uint32 portId);
43 extern ret_t rtl8367c_getAsicTrunkingHashTable(rtk_uint32 hashval, rtk_uint32* pPortId);
44 extern ret_t rtl8367c_setAsicTrunkingHashTable1(rtk_uint32 hashval, rtk_uint32 portId);
45 extern ret_t rtl8367c_getAsicTrunkingHashTable1(rtk_uint32 hashval, rtk_uint32* pPortId);
46
47 #endif /*_RTL8367C_ASICDRV_TRUNKING_H_*/
48