Commit f906e6aa authored by Dan Murphy's avatar Dan Murphy Committed by Kleber Sacilotto de Souza

net: phy: at803x: Change error to EINVAL for invalid MAC

BugLink: http://bugs.launchpad.net/bugs/1745054

[ Upstream commit fc755687 ]

Change the return error code to EINVAL if the MAC
address is not valid in the set_wol function.
Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarKhalid Elmously <khalid.elmously@canonical.com>
Signed-off-by: default avatarStefan Bader <stefan.bader@canonical.com>
parent 00b72de0
...@@ -105,7 +105,7 @@ static int at803x_set_wol(struct phy_device *phydev, ...@@ -105,7 +105,7 @@ static int at803x_set_wol(struct phy_device *phydev,
mac = (const u8 *) ndev->dev_addr; mac = (const u8 *) ndev->dev_addr;
if (!is_valid_ether_addr(mac)) if (!is_valid_ether_addr(mac))
return -EFAULT; return -EINVAL;
for (i = 0; i < 3; i++) { for (i = 0; i < 3; i++) {
phy_write(phydev, AT803X_MMD_ACCESS_CONTROL, phy_write(phydev, AT803X_MMD_ACCESS_CONTROL,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment