mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 09:42:19 +03:00
nvethernet: macsec API cleanup
Cleanup of OSI macsec APIs, hence made relevant changes to OSD Bug 3709820 Change-Id: I33a77f31553d213e565a7f4ad346fe3c026fafde Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2738231 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Mahesh Patil <maheshp@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
6104d5e348
commit
47185d2fc3
@@ -2983,15 +2983,6 @@ static int ether_close(struct net_device *ndev)
|
||||
if (pdata->osi_core->mac == OSI_MAC_HW_MGBE)
|
||||
pm_runtime_put_sync(pdata->dev);
|
||||
|
||||
#ifdef MACSEC_SUPPORT
|
||||
#ifdef DEBUG_MACSEC
|
||||
ret = macsec_close(pdata->macsec_pdata);
|
||||
if (ret < 0) {
|
||||
dev_err(pdata->dev, "Failed to close macsec");
|
||||
}
|
||||
#endif
|
||||
#endif /* MACSEC_SUPPORT */
|
||||
|
||||
/* Reset stats since interface is going down */
|
||||
ether_reset_stats(pdata);
|
||||
|
||||
@@ -4023,12 +4014,6 @@ static int ether_change_mtu(struct net_device *ndev, int new_mtu)
|
||||
/* Macsec is supported, reduce MTU */
|
||||
if ((osi_core->mac == OSI_MAC_HW_EQOS && osi_core->mac_ver == OSI_EQOS_MAC_5_30) ||
|
||||
(osi_core->mac == OSI_MAC_HW_MGBE && osi_core->mac_ver == OSI_MGBE_MAC_3_10)) {
|
||||
ret = osi_macsec_update_mtu(osi_core, new_mtu);
|
||||
if (ret < 0) {
|
||||
dev_err(pdata->dev, "Failed to set MACSEC MTU to %d\n",
|
||||
new_mtu);
|
||||
return -EINVAL;
|
||||
}
|
||||
ndev->mtu -= MACSEC_TAG_ICV_LEN;
|
||||
netdev_info(pdata->ndev, "Macsec: Reduced MTU: %d Max: %d\n",
|
||||
ndev->mtu, ndev->max_mtu);
|
||||
|
||||
Reference in New Issue
Block a user