[][Add hw path for 2.5G LAN <-> 2.5G WAN]
[Description]
Add hw path support for
2.5G LAN (mt7531 port 5) <-> 2.5G WAN (GMAC2).
[Release-log]
N/A
Change-Id: I64426c0554c1096134114febde0e8cb8ac4bca7a
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/4562385
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
index e72ea29..566a1f8 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
@@ -131,7 +131,7 @@
};
&hnat {
- mtketh-wan = "wan";
+ mtketh-wan = "eth1";
mtketh-lan = "lan";
mtketh-max-gmac = <2>;
status = "okay";
diff --git a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi
index f8885cb..1fb5f03 100644
--- a/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi
+++ b/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dtsi
@@ -131,7 +131,7 @@
};
&hnat {
- mtketh-wan = "wan";
+ mtketh-wan = "eth1";
mtketh-lan = "lan";
mtketh-max-gmac = <2>;
status = "okay";
diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
index 51370a9..d76be87 100644
--- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
+++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat_nf_hook.c
@@ -1768,8 +1768,7 @@
{
struct foe_entry *entry;
struct flow_offload_hw_path hw_path = { .dev = (struct net_device*)out,
- .virt_dev = (struct net_device*)out,
- .flags = FLOW_OFFLOAD_PATH_ETHERNET };
+ .virt_dev = (struct net_device*)out };
const struct net_device *arp_dev = out;
if (skb_hnat_alg(skb) || unlikely(!is_magic_tag_valid(skb) ||
@@ -1780,8 +1779,7 @@
return 0;
if (out->netdev_ops->ndo_flow_offload_check) {
- if (out->netdev_ops->ndo_flow_offload_check(&hw_path))
- return 0;
+ out->netdev_ops->ndo_flow_offload_check(&hw_path);
out = (IS_GMAC1_MODE) ? hw_path.virt_dev : hw_path.dev;
}