Mediatek:Fix GL.inet mt2500 hnat port setting (#172)

This commit is contained in:
padavanonly 2023-11-23 18:19:51 +08:00 committed by GitHub
parent ea37177e3a
commit b4316271e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;