Skip to content
Commit ce11c436 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

net: of_mdio: fix of_set_phy_supported after driver probing

Commit 8fdade4b

 ("net: of_mdio: parse "max-speed" property to set PHY
supported features") introduced a typo in of_set_phy_supported for the
first assignment of phydev->supported which will not effectively limit
the PHY device supported features bits if the PHY driver contains
"higher" features (e.g: max-speed = <100> and PHY driver has
PHY_GBIT_FEATURES set).

Fix this by making sure that the very first thing is to reset to sane
defaults (PHY_BASIC_FEATURES) and then progressively add speed features
as we parse them.

Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d43ff4cd
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