]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: don't allow __set_phy_supported to add unsupported modes
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 3 Dec 2018 07:04:57 +0000 (08:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Dec 2018 21:50:06 +0000 (13:50 -0800)
commit404fa8e3165e377386351fe8e87705cd660c4164
tree225feb5451fe4f67fe29c12524766ab925d6e27f
parentb19dcc7c7ad0be2b3b4cd915882437a47cd5a0f0
net: phy: don't allow __set_phy_supported to add unsupported modes

Currently __set_phy_supported allows to add modes w/o checking whether
the PHY supports them. This is wrong, it should never add modes but
only remove modes we don't want to support.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c