OSDN Git Service

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)
commit6915bf3b002bba76cbbb928a983795fdd93af49b
tree225feb5451fe4f67fe29c12524766ab925d6e27f
parent97e6c858a26ee8a31719a08ae896ca682eb8978e
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