mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-07 01:53:34 +08:00
mediatek: hnat: set ppe num to 1 for GMAC1 mode
This commit is contained in:
parent
31c2a045db
commit
78e01d8729
@ -239,13 +239,15 @@ return view.extend({
|
||||
o.placeholder = 30;
|
||||
o.depends('fastpath_mh_eth_hnat', '1');
|
||||
|
||||
o = s.option(form.ListValue, 'fastpath_mh_eth_hnat_ppenum', _('Number of HNAT PPE'),
|
||||
_('Apply this setting after reboot.'));
|
||||
o.rmempty = false;
|
||||
o.value(1);
|
||||
o.value(2);
|
||||
o.default = 1;
|
||||
o.depends('fastpath_mh_eth_hnat', '1');
|
||||
if (features.hasGMAC2) {
|
||||
o = s.option(form.ListValue, 'fastpath_mh_eth_hnat_ppenum', _('Number of HNAT PPE'),
|
||||
_('Apply this setting after reboot.'));
|
||||
o.rmempty = false;
|
||||
o.value(1);
|
||||
o.value(2);
|
||||
o.default = 1;
|
||||
o.depends('fastpath_mh_eth_hnat', '1');
|
||||
}
|
||||
|
||||
o = s.option(form.ListValue, 'fullcone', _('Full cone NAT'),
|
||||
_('Full cone NAT (NAT1) can improve gaming performance effectively.'));
|
||||
|
@ -24,6 +24,7 @@ local methods = {
|
||||
hasFASTCLASSIFIER = fs.access("/lib/modules/" .. boardinfo.kernel .. "/fast-classifier.ko"),
|
||||
hasSHORTCUTFECM = fs.access("/lib/modules/" .. boardinfo.kernel .. "/shortcut-fe-cm.ko"),
|
||||
hasMEDIATEKHNAT = fs.access("/lib/modules/" .. boardinfo.kernel .. "/mtkhnat.ko"),
|
||||
hasGMAC2 = fs.access("/sys/class/net/eth1"),
|
||||
hasXTFULLCONENAT = fs.access("/lib/modules/" .. boardinfo.kernel .. "/xt_FULLCONENAT.ko"),
|
||||
hasTCPCCA = readfile("/proc/sys/net/ipv4/tcp_available_congestion_control")
|
||||
}
|
||||
|
@ -734,6 +734,9 @@ static int hnat_probe(struct platform_device *pdev)
|
||||
|
||||
hnat_priv->ppe_num = ppe_cnt;
|
||||
|
||||
if (IS_GMAC1_MODE)
|
||||
hnat_priv->ppe_num = 1;
|
||||
|
||||
dev_info(&pdev->dev, "ppe num = %d\n", hnat_priv->ppe_num);
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user