diff --git a/package/mtk/drivers/warp/Makefile b/package/mtk/drivers/warp/Makefile index 1217a1ffff..348ea31628 100644 --- a/package/mtk/drivers/warp/Makefile +++ b/package/mtk/drivers/warp/Makefile @@ -37,7 +37,7 @@ define KernelPackage/warp TITLE:=MTK warp driver DEPENDS:= +kmod-mediatek_hnat FILES:=$(PKG_BUILD_DIR)/mtk_warp.ko - AUTOLOAD:=$(call AutoLoad,60,mtk_warp,1) + AUTOLOAD:=$(call AutoLoad,60,mtk_warp) SUBMENU:=Drivers MENU:=1 endef diff --git a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.c b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.c index e543a476b5..b62e55ded7 100644 --- a/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.c +++ b/target/linux/mediatek/files-5.4/drivers/net/ethernet/mediatek/mtk_hnat/hnat.c @@ -42,6 +42,9 @@ EXPORT_SYMBOL(ppe_dev_register_hook); void (*ppe_dev_unregister_hook)(struct net_device *dev) = NULL; EXPORT_SYMBOL(ppe_dev_unregister_hook); +static int ppe_cnt = 1; +module_param(ppe_cnt, int, 0); + static void hnat_sma_build_entry(struct timer_list *t) { int i; @@ -732,7 +735,7 @@ static int hnat_probe(struct platform_device *pdev) err = of_property_read_u32_index(np, "mtketh-ppe-num", 0, &val); if (err < 0) - hnat_priv->ppe_num = 1; + hnat_priv->ppe_num = ppe_cnt; else hnat_priv->ppe_num = val; diff --git a/target/linux/mediatek/modules.mk b/target/linux/mediatek/modules.mk index 9a490e77e8..4c3c1c87e0 100644 --- a/target/linux/mediatek/modules.mk +++ b/target/linux/mediatek/modules.mk @@ -43,6 +43,8 @@ define KernelPackage/mediatek_hnat SUBMENU:=Network Devices TITLE:=Mediatek HNAT module DEPENDS:=@TARGET_mediatek +kmod-nf-conntrack + AUTOLOAD:=$(call AutoLoad,20,mtkhnat) + MODPARAMS.mtkhnat:=ppe_cnt=1 KCONFIG:= \ CONFIG_BRIDGE_NETFILTER=y \ CONFIG_NETFILTER_FAMILY_BRIDGE=y \