]> 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:19:33 +0000 (08:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Dec 2018 21:50:38 +0000 (13:50 -0800)
commit8190c9350b172c89e395d081a324abcc27fd67df
tree5963202a29daeb73aa351bb59370323e6079687d
parent9babaabaf7029b6952df16273015d10123a9d1a8
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.

The commit marked as fixed didn't do anything wrong, it just copied
existing functionality to the helper which is being fixed now.

Fixes: 8220d8aea7b2 ("phylib: Add phy_set_max_speed helper")
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