mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-23 17:55:05 +03:00
nvethernet: macsec suspend-resume with wol enabled
Issue: If WOL is enabled after running "./ethtool -s eth0 wol g" command there will not be any eapol frames transaction, hence macsec will be disabled. As macsec is disabled before suspend we are not enabling it back once resumed. Because of this eapol frames are also sent with sec-tag as byp_lut is not programmed. Fix: Instead of depending on the macsec state, check if there is any supplicant running, if there is any supplicant then enable the macsec post resume. Bug 3577131 Change-Id: I6018b94411034eebba34f5f0a9520907305c573e Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2694446 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-by: Mahesh Patil <maheshp@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com> Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com> Reviewed-by: Ashutosh Jha <ajha@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Revanth Kumar Uppala
parent
76abafe3a3
commit
c7376b2390
@@ -6821,7 +6821,7 @@ static int ether_resume(struct ether_priv_data *pdata)
|
||||
#ifdef MACSEC_SUPPORT
|
||||
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)) {
|
||||
if (pdata->macsec_pdata->enabled_before_suspend != OSI_DISABLE) {
|
||||
if (pdata->macsec_pdata->next_supp_idx != OSI_DISABLE) {
|
||||
ret = macsec_resume(pdata->macsec_pdata);
|
||||
if (ret < 0)
|
||||
dev_err(pdata->dev, "Failed to resume MACSEC ");
|
||||
@@ -6869,9 +6869,7 @@ static int ether_suspend_noirq(struct device *dev)
|
||||
#ifdef MACSEC_SUPPORT
|
||||
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)) {
|
||||
pdata->macsec_pdata->enabled_before_suspend =
|
||||
pdata->macsec_pdata->enabled;
|
||||
if (pdata->macsec_pdata->enabled != OSI_DISABLE) {
|
||||
if (pdata->macsec_pdata->next_supp_idx != OSI_DISABLE) {
|
||||
ret = macsec_suspend(pdata->macsec_pdata);
|
||||
if (ret < 0)
|
||||
dev_err(pdata->dev, "Failed to suspend macsec");
|
||||
|
||||
Reference in New Issue
Block a user