Update hnat.c

This commit is contained in:
padavanonly 2024-10-14 15:17:25 +08:00 committed by GitHub
parent 0e4c0e981b
commit a58e92b6db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -709,10 +709,7 @@ static int hnat_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "lan = %s\n", hnat_priv->lan);
err = of_property_read_string(np, "mtketh-ppd", &name);
if (err < 0)
strncpy(hnat_priv->ppd, "wan", IFNAMSIZ);
else
strncpy(hnat_priv->ppd, (char *)name, IFNAMSIZ - 1);
strncpy(hnat_priv->ppd, "eth0", IFNAMSIZ);
dev_info(&pdev->dev, "ppd = %s\n", hnat_priv->ppd);
/*get total gmac num in hnat*/