mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
nvethernet: Support macsec enablement via DT
Issue: Name of the nl_family is nv_macsec for all the interfaces hence even if the macsec is enabled for one interface and disabled for other interfaces, supplicant can be launched for all the interfaces. Fix: Use the interface name for the nl_family name hence supplicant can check if macsec is enabled in DT before initializing supplicant for that particular interface Bug 3673434 Change-Id: I33d62a0ab2b74f7f53abcd8e6629c1b013eede86 Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2726483 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
4c8ec560fa
commit
0913e1b2ed
@@ -6533,6 +6533,12 @@ static int ether_probe(struct platform_device *pdev)
|
||||
ether_tx_usecs_hrtimer;
|
||||
}
|
||||
|
||||
ret = register_netdev(ndev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to register netdev\n");
|
||||
goto err_netdev;
|
||||
}
|
||||
|
||||
#ifdef MACSEC_SUPPORT
|
||||
ret = macsec_probe(pdata);
|
||||
if (ret < 0) {
|
||||
@@ -6540,7 +6546,7 @@ static int ether_probe(struct platform_device *pdev)
|
||||
goto err_macsec;
|
||||
} else if (ret == 1) {
|
||||
/* Nothing to do, macsec is not supported */
|
||||
dev_info(&pdev->dev, "Macsec not supported\n");
|
||||
dev_info(&pdev->dev, "Macsec not supported/Not enabled in DT\n");
|
||||
} else {
|
||||
dev_info(&pdev->dev, "Macsec not enabled\n");
|
||||
/* Macsec is supported, reduce MTU */
|
||||
@@ -6550,12 +6556,6 @@ static int ether_probe(struct platform_device *pdev)
|
||||
}
|
||||
#endif /* MACSEC_SUPPORT */
|
||||
|
||||
ret = register_netdev(ndev);
|
||||
if (ret < 0) {
|
||||
dev_err(&pdev->dev, "failed to register netdev\n");
|
||||
goto err_netdev;
|
||||
}
|
||||
|
||||
/* Register sysfs entry */
|
||||
ret = ether_sysfs_register(pdata);
|
||||
if (ret < 0) {
|
||||
@@ -6614,11 +6614,11 @@ static int ether_probe(struct platform_device *pdev)
|
||||
return 0;
|
||||
|
||||
err_sysfs:
|
||||
unregister_netdev(ndev);
|
||||
err_netdev:
|
||||
#ifdef MACSEC_SUPPORT
|
||||
err_macsec:
|
||||
#endif /* MACSEC_SUPPORT */
|
||||
unregister_netdev(ndev);
|
||||
err_netdev:
|
||||
err_dma_mask:
|
||||
ether_disable_clks(pdata);
|
||||
ether_put_clks(pdata);
|
||||
|
||||
Reference in New Issue
Block a user