config  RA_HW_NAT
        tristate "Ralink HW NAT(** Work At Module Mode ONLY **)"
	depends on RA_NAT_HW

config  RA_HW_NAT_LAN_VLANID
        int "VLAN ID of LAN Ports"
	depends on RA_HW_NAT && !RA_HW_NAT_MANUAL_BIND
	default 1
	help
	please choose any one of your LAN side VLAN IDs if you use different VLAN ID for each LAN port

config  RA_HW_NAT_WAN_VLANID
        int "VLAN ID of WAN Ports"
	depends on RA_HW_NAT && !RA_HW_NAT_MANUAL_BIND
	default 2
	help
	please choose any one of your WAN side VLAN IDs if you use different VLAN ID for each WAN port

config  RA_HW_NAT_BINDING_THRESHOLD
        int "Binding Threshold (Unit:Packet Per Second)"
	depends on RA_HW_NAT
	default 30
	help
	When flow rate > Binding Threshold  (# Packets Per Second),
	the state will change to bind state

#config  RA_HW_NAT_QURT_LMT
#        int "Max entries allowed build when Free Entries>3/4 (MUST <16384)"
#	depends on RA_HW_NAT
#	default 100
#	help
#	Free entries > 3/4

#config  RA_HW_NAT_HALF_LMT
#        int "Max entries allowed build when Free Entries>1/2 (MUST <16384)"
#	depends on RA_HW_NAT
#	default 50
#	help
#	1/2 < Free entries < 3/4


#config  RA_HW_NAT_FULL_LMT
#        int "Max entries allowed build when Free Entries<1/2 (MUST <16384)"
#	depends on RA_HW_NAT
#	default 25
#	help
#	Free entries < 1/2

choice
        prompt "Foe Table Size"
	depends on RA_HW_NAT
	default RA_HW_NAT_TBL_4K
	help
	Number of entries in FoE Table

config  RA_HW_NAT_TBL_1K
        bool "1K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_2K
        bool "2K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_4K
        bool "4K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_8K
        bool "8K"
	depends on RA_HW_NAT

config  RA_HW_NAT_TBL_16K
        bool "16K"
	depends on RA_HW_NAT
	
endchoice

config  HNAT_V2
	bool
	default y if (RALINK_MT7620 || RALINK_MT7621)
	depends on RA_HW_NAT

choice
	prompt "Hash Algorithm"
	depends on RA_HW_NAT
	default RA_HW_NAT_HASH1
	
config  RA_HW_NAT_HASH0
        bool "Hash0-Simple"
	depends on RA_HW_NAT

config  RA_HW_NAT_HASH1
        bool "Hash1-Complex"
	depends on RA_HW_NAT

config  RA_HW_NAT_HASH2
        bool "Hash2-Complex"
	depends on RA_HW_NAT && HNAT_V2

config  RA_HW_NAT_HASH3
        bool "Hash3-Complex"
	depends on RA_HW_NAT && HNAT_V2

endchoice


config  RA_HW_NAT_PRE_ACL_SIZE
        int "Pre ACL Table Size"
	depends on RA_HW_NAT && !HNAT_V2
	default 383
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_PRE_MTR_SIZE
        int "Pre Meter Table Size"
	depends on RA_HW_NAT && !HNAT_V2
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_PRE_AC_SIZE
        int "Pre AC Table Size"
	depends on RA_HW_NAT && !HNAT_V2
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_POST_MTR_SIZE
        int "Post Meter Table Size"
	depends on RA_HW_NAT && !HNAT_V2
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512

config  RA_HW_NAT_POST_AC_SIZE
        int "Post AC Table Size"
	depends on RA_HW_NAT && !HNAT_V2
	default 32
	help
	Pre ACL + Pre/Post MTR + Pre/Post AC Must less than 512


config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:1Sec)"
	depends on RA_HW_NAT_TBL_1K
	default 5
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:1Sec)"
	depends on RA_HW_NAT_TBL_1K
	default 5
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_NTU_KA
        int "Non-TCP/UDP KeepAlive Interval(Unit:1Sec)"
	depends on RA_HW_NAT_TBL_1K && HNAT_V2
	default 5
	help
	HW will duplicate one packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:2Sec)"
	depends on RA_HW_NAT_TBL_2K
	default 3
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.



config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:2Sec)"
	depends on RA_HW_NAT_TBL_2K
	default 3
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_NTU_KA
        int "None-TCP/UDP KeepAlive Interval(Unit:2Sec)"
	depends on RA_HW_NAT_TBL_2K && HNAT_V2
	default 3
	help
	HW will duplicate one packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:4Sec)"
	depends on RA_HW_NAT_TBL_4K
	default 1
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.



config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:4Sec)"
	depends on RA_HW_NAT_TBL_4K
	default 1
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_NTU_KA
        int "Non-TCP/UDP KeepAlive Interval(Unit:4Sec)"
	depends on RA_HW_NAT_TBL_4K && HNAT_V2
	default 1
	help
	HW will duplicate one packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:8Sec)"
	depends on RA_HW_NAT_TBL_8K
	default 1
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:8Sec)"
	depends on RA_HW_NAT_TBL_8K
	default 1
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_NTU_KA
        int "None-TCP/UDP KeepAlive Interval(Unit:8Sec)"
	depends on RA_HW_NAT_TBL_8K && HNAT_V2
	default 1
	help
	HW will duplicate one packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_TCP_KA
        int "TCP KeepAlive Interval(Unit:16Sec)"
	depends on RA_HW_NAT_TBL_16K
	default 1
	help
	HW will duplicate one TCP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.


config  RA_HW_NAT_UDP_KA
        int "UDP KeepAlive Interval(Unit:16Sec)"
	depends on RA_HW_NAT_TBL_16K
	default 1
	help
	HW will duplicate one UDP packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_NTU_KA
        int "None-TCP/UDP KeepAlive Interval(Unit:16Sec)"
	depends on RA_HW_NAT_TBL_16K && HNAT_V2
	default 1
	help
	HW will duplicate one packet from tcp bind flow to CPU
	in order to refresh Linux conntrack table.

config  RA_HW_NAT_ACL_DLTA
        int "Life time of ACL link to FOE entry(Unit:1Sec)"
	depends on RA_HW_NAT && !HNAT_V2
	default 3
	help
	Set ageout time for ACL link to FoE entry 

config  RA_HW_NAT_UNB_DLTA
        int "Life time of Unbind entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 3
	help
	set ageout time for bind Unbind entry

config  RA_HW_NAT_UNB_MNP
        int "Min threshold for unbind state(Pkt count)"
	depends on RA_HW_NAT
	default 1000
	help
	An unbind flow whose pkt counts < Min threshold and idle time > Life time 
	=> This unbind entry would be aged out
	[Notes: Idle time = current time - last packet receive time]

config  RA_HW_NAT_UDP_DLTA
        int "Life time of Bind UDP entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 5
	help
	Set ageout time for bind UDP entry

config  RA_HW_NAT_TCP_DLTA
        int "Life time of Bind TCP entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 5
	help
	Set ageout time for bind TCP entry

config  RA_HW_NAT_FIN_DLTA
        int "Life time of Bind FIN entry (Unit:1Sec)"
	depends on RA_HW_NAT
	default 5
	help
	Set ageout time for FIN entry

config  RA_HW_NAT_NTU_DLTA
        int "Life time of Non-TCP/UDP entry (Unit:1Sec)"
	depends on RA_HW_NAT && HNAT_V2
	default 5
	help
	Set ageout time for Non-TCP/UDP entry
	
config  RA_HW_NAT_IPV6
        bool "IPv6 Acceleration"
	depends on RA_HW_NAT && (RALINK_MT7620 || RALINK_MT7621)
	default n
	help
	"ipv6 routing accelerated by HNAT"

config  RA_HW_NAT_ACL2UP_HELPER
        bool "ACL -> UP helper"
	depends on RA_HW_NAT && !HNAT_V2
	help
	"use ACL rule to get user priority"

config  RA_HW_NAT_PREBIND
        bool "Pre-bind support"
	depends on RA_HW_NAT && RALINK_MT7621

config  PPE_MCAST
        bool "PPE built-in multicast table support"
	depends on RA_HW_NAT && RALINK_MT7621

config  RA_HW_NAT_WIFI
	bool "WiFi Acceleration"
	depends on RA_HW_NAT

config  RA_HW_NAT_NIC_USB
	bool "PCIe Ethernet NIC/USB Acceleration"
	depends on RA_HW_NAT

config  RA_HW_NAT_PPTP_L2TP
	bool "PPTP_L2TP Acceleration"
	depends on RA_HW_NAT && (!RAETH_HW_VLAN_TX) && (RALINK_MT7620 || (!RAETH_QDMA && !RAETH_GMAC2 && RALINK_MT7621))
	help
	MT7621: RAETHER with PAMA + GMAC1 only (No GMAC2 support).

config RA_HW_NAT_ACCNT_MAINTAINER
	bool "byte/pkt count for LAN/WAN port"
	depends on RA_HW_NAT && HNAT_V2
	help
	"if you need 64bits bytes/pkts counter, and ask HNAT module to get statistic counter periodically, please enable it"

