]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: Add helper to convert MII ADV register to a linkmode
authorAndrew Lunn <andrew@lunn.ch>
Sat, 29 Sep 2018 21:04:12 +0000 (23:04 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Oct 2018 05:55:36 +0000 (22:55 -0700)
commit9b4de7cd3fcf1e0aafc54e6e9c9c2e92e49730f2
tree609b07d3974ae9fd89fd660e79461eabae20e0b0
parente95e5e81269b64bd4fa83193d9847ee38ead8508
net: phy: Add helper to convert MII ADV register to a linkmode

The phy_mii_ioctl can be used to write a value into the MII_ADVERTISE
register in the PHY. Since this changes the state of the PHY, we need
to make the same change to phydev->advertising. Add a helper which can
convert the register value to a linkmode.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/mii.h