• Florian Fainelli's avatar
    net: phy: Create sysfs reciprocal links for attached_dev/phydev · 5568363f
    Florian Fainelli authored
    There is currently no way for a program scanning /sys to know whether a
    network device is attached to a particular PHY device, just like the PHY
    device is not pointed back to its attached network device.
    
    Create a symbolic link in the network device's namespace named "phydev"
    which points to the PHY device and create a symbolic link in the PHY
    device's namespace named "attached_dev" that points back to the network
    device. These links are set up during phy_attach_direct() and removed
    during phy_detach() for symetry.
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5568363f
phy_device.c 47.7 KB