mediatek: add support for rtl8367c
[openwrt/staging/jow.git] / target / linux / mediatek / files-5.4 / drivers / net / phy / rtk / rtl8367c / include / rtl8367c_asicdrv_hsb.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 : Field selector related functions
15 *
16 */
17
18 #ifndef _RTL8367C_ASICDRV__HSB_H_
19 #define _RTL8367C_ASICDRV__HSB_H_
20
21 #include <rtl8367c_asicdrv.h>
22
23 #define RTL8367C_FIELDSEL_FORMAT_NUMBER (16)
24 #define RTL8367C_FIELDSEL_MAX_OFFSET (255)
25
26 enum FIELDSEL_FORMAT_FORMAT
27 {
28 FIELDSEL_FORMAT_DEFAULT = 0,
29 FIELDSEL_FORMAT_RAW,
30 FIELDSEL_FORMAT_LLC,
31 FIELDSEL_FORMAT_IPV4,
32 FIELDSEL_FORMAT_ARP,
33 FIELDSEL_FORMAT_IPV6,
34 FIELDSEL_FORMAT_IPPAYLOAD,
35 FIELDSEL_FORMAT_L4PAYLOAD,
36 FIELDSEL_FORMAT_END
37 };
38
39 extern ret_t rtl8367c_setAsicFieldSelector(rtk_uint32 index, rtk_uint32 format, rtk_uint32 offset);
40 extern ret_t rtl8367c_getAsicFieldSelector(rtk_uint32 index, rtk_uint32* pFormat, rtk_uint32* pOffset);
41
42 #endif /*_RTL8367C_ASICDRV__HSB_H_*/
43