lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241007222301.2622-1-pvmohammedanees2003@gmail.com>
Date: Tue,  8 Oct 2024 03:52:59 +0530
From: Mohammed Anees <pvmohammedanees2003@...il.com>
To: linux@...linux.org.uk
Cc: andrew@...n.ch,
	davem@...emloft.net,
	edumazet@...gle.com,
	f.fainelli@...il.com,
	kuba@...nel.org,
	linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org,
	olteanv@...il.com,
	pabeni@...hat.com,
	pvmohammedanees2003@...il.com
Subject: Re: [PATCH] net: dsa: Fix conditional handling of Wake-on-Lan configuration in dsa_user_set_wol

Apologies for overlooking the previous code. Based on your 
suggestion, I’ve refined the implementation. Below is the 
final version, please let me know if this works, and I’ll 
send a new patch.

int phy_ret, mac_ret = -EOPNOTSUPP;

phy_ret = phylink_ethtool_set_wol(dp->pl, w);
if (phy_ret != 0 && phy_ret != -EOPNOTSUPP)
    return phy_ret;

if (ds->ops->set_wol) {
    mac_ret = ds->ops->set_wol(ds, dp->index, w);
    if (mac_ret != 0 && mac_ret != -EOPNOTSUPP)
        return mac_ret;
}

// Return success if either PHY or MAC succeeded
if (phy_ret == 0 || mac_ret == 0)
	return 0;

return -EOPNOTSUPP;

Thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ