mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-08 10:23:47 +08:00
Mediatek:Fix GL.inet mt2500 hnat port setting (#172)
This commit is contained in:
parent
ea37177e3a
commit
b4316271e8
@ -1568,7 +1568,7 @@ static unsigned int skb_to_hnat_info(struct sk_buff *skb,
|
|||||||
gmac = ((skb_hnat_entry(skb) >> 1) % hnat_priv->gmac_num) ?
|
gmac = ((skb_hnat_entry(skb) >> 1) % hnat_priv->gmac_num) ?
|
||||||
NR_GMAC2_PORT : NR_GMAC1_PORT;
|
NR_GMAC2_PORT : NR_GMAC1_PORT;
|
||||||
else {
|
else {
|
||||||
if (of_machine_is_compatible("glinet,gl-mt3000")||of_machine_is_compatible("glinet,mt3000-snand"))
|
if (of_machine_is_compatible("glinet,mt2500-emmc")||of_machine_is_compatible("glinet,mt3000-snand"))
|
||||||
gmac = NR_GMAC2_PORT;
|
gmac = NR_GMAC2_PORT;
|
||||||
else
|
else
|
||||||
gmac = NR_GMAC1_PORT;
|
gmac = NR_GMAC1_PORT;
|
||||||
@ -1583,7 +1583,7 @@ static unsigned int skb_to_hnat_info(struct sk_buff *skb,
|
|||||||
/* Set act_dp = wan_dev */
|
/* Set act_dp = wan_dev */
|
||||||
entry.ipv4_hnapt.act_dp = dev->ifindex;
|
entry.ipv4_hnapt.act_dp = dev->ifindex;
|
||||||
} else {
|
} else {
|
||||||
if (of_machine_is_compatible("glinet,gl-mt3000")||of_machine_is_compatible("glinet,mt3000-snand"))
|
if (of_machine_is_compatible("glinet,mt2500-emmc")||of_machine_is_compatible("glinet,mt3000-snand"))
|
||||||
gmac = NR_GMAC1_PORT;
|
gmac = NR_GMAC1_PORT;
|
||||||
else
|
else
|
||||||
gmac = (IS_GMAC1_MODE) ? NR_GMAC1_PORT : NR_GMAC2_PORT;
|
gmac = (IS_GMAC1_MODE) ? NR_GMAC1_PORT : NR_GMAC2_PORT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user