ethernet:Update ethtool logic to read macsec stats

Read macsec stats only if macsec is enabled in DT

Bug 5130525

Change-Id: I72de446954513ec6332566ae0647aec323178146
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3313063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Sanath Kumar Gampa
2025-03-04 02:45:00 +00:00
committed by Jon Hunter
parent 0c0870d8a4
commit 376365d92f

View File

@@ -1084,12 +1084,14 @@ void ether_get_ethtool_stats(struct net_device *dev,
}
#ifdef MACSEC_SUPPORT
if (pdata->macsec_pdata) {
ret = osi_macsec_read_mmc(osi_core);
if (ret == -1) {
dev_err(pdata->dev,
"Fail to read macsec stats\n");
return;
}
}
#endif /* MACSEC_SUPPORT */
for (i = 0; i < ETHER_MMC_STATS_LEN; i++) {