OSDN Git Service

Add rtl8821ce driver version 5.5.2
[android-x86/external-kernel-drivers.git] / rtl8821ce / include / rtw_br_ext.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2017 Realtek Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms of version 2 of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  *****************************************************************************/
15 #ifndef _RTW_BR_EXT_H_
16 #define _RTW_BR_EXT_H_
17
18 #if 1   /* rtw_wifi_driver */
19 #define CL_IPV6_PASS    1
20 #define MACADDRLEN              6
21 #define _DEBUG_ERR              RTW_INFO
22 #define _DEBUG_INFO             /* RTW_INFO */
23 #define DEBUG_WARN              RTW_INFO
24 #define DEBUG_INFO              /* RTW_INFO */
25 #define DEBUG_ERR               RTW_INFO
26 /* #define GET_MY_HWADDR                ((GET_MIB(priv))->dot11OperationEntry.hwaddr) */
27 #define GET_MY_HWADDR(padapter)         (adapter_mac_addr(padapter))
28 #endif /* rtw_wifi_driver */
29
30 #define NAT25_HASH_BITS         4
31 #define NAT25_HASH_SIZE         (1 << NAT25_HASH_BITS)
32 #define NAT25_AGEING_TIME       300
33
34 #ifdef CL_IPV6_PASS
35         #define MAX_NETWORK_ADDR_LEN    17
36 #else
37         #define MAX_NETWORK_ADDR_LEN    11
38 #endif
39
40 struct nat25_network_db_entry {
41         struct nat25_network_db_entry   *next_hash;
42         struct nat25_network_db_entry   **pprev_hash;
43         atomic_t                                                use_count;
44         unsigned char                                   macAddr[6];
45         unsigned long                                   ageing_timer;
46         unsigned char                           networkAddr[MAX_NETWORK_ADDR_LEN];
47 };
48
49 enum NAT25_METHOD {
50         NAT25_MIN,
51         NAT25_CHECK,
52         NAT25_INSERT,
53         NAT25_LOOKUP,
54         NAT25_PARSE,
55         NAT25_MAX
56 };
57
58 struct br_ext_info {
59         unsigned int    nat25_disable;
60         unsigned int    macclone_enable;
61         unsigned int    dhcp_bcst_disable;
62         int             addPPPoETag;            /* 1: Add PPPoE relay-SID, 0: disable */
63         unsigned char   nat25_dmzMac[MACADDRLEN];
64         unsigned int    nat25sc_disable;
65 };
66
67 void nat25_db_cleanup(_adapter *priv);
68
69 #endif /* _RTW_BR_EXT_H_ */