mediatek: hnat: add ppe_cnt module param

This commit is contained in:
hanwckf 2023-12-23 12:06:06 +08:00
parent 5733288262
commit 0e595386ae
3 changed files with 7 additions and 2 deletions

View File

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

View File

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

View File

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