1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2 /* Copyright(c) 2007 - 2011 Realtek Corporation. */
3 
4 #ifndef _RTW_BR_EXT_H_
5 #define _RTW_BR_EXT_H_
6 
7 #define MACADDRLEN		6
8 #define _DEBUG_ERR		DBG_88E
9 #define _DEBUG_INFO		DBG_88E
10 #define DEBUG_WARN		DBG_88E
11 #define DEBUG_INFO		DBG_88E
12 #define DEBUG_ERR		DBG_88E
13 #define GET_MY_HWADDR(padapter)		((padapter)->eeprompriv.mac_addr)
14 
15 #define NAT25_HASH_BITS		4
16 #define NAT25_HASH_SIZE		(1 << NAT25_HASH_BITS)
17 #define NAT25_AGEING_TIME	300
18 
19 #define MAX_NETWORK_ADDR_LEN	17
20 
21 struct nat25_network_db_entry {
22 	struct nat25_network_db_entry	*next_hash;
23 	struct nat25_network_db_entry	**pprev_hash;
24 	atomic_t	use_count;
25 	unsigned char	macAddr[6];
26 	unsigned long	ageing_timer;
27 	unsigned char	networkAddr[MAX_NETWORK_ADDR_LEN];
28 };
29 
30 enum NAT25_METHOD {
31 	NAT25_MIN,
32 	NAT25_CHECK,
33 	NAT25_INSERT,
34 	NAT25_PARSE,
35 	NAT25_MAX
36 };
37 
38 struct br_ext_info {
39 	unsigned int	nat25_disable;
40 	unsigned int	macclone_enable;
41 	unsigned int	dhcp_bcst_disable;
42 	int	addPPPoETag;		/* 1: Add PPPoE relay-SID, 0: disable */
43 	unsigned char	nat25_dmzMac[MACADDRLEN];
44 	unsigned int	nat25sc_disable;
45 };
46 
47 void nat25_db_cleanup(struct adapter *priv);
48 
49 #endif /*  _RTW_BR_EXT_H_ */
50