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