net: phy: fixed: propagate fixed link values to struct
authorMadalin Bucur <madalin.bucur@freescale.com>
Wed, 26 Aug 2015 14:58:47 +0000 (17:58 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2015 18:24:49 +0000 (11:24 -0700)
The fixed link values parsed from the device tree are stored in
the struct fixed_phy member status. The struct phy_device members
speed, duplex were not updated.

Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/fixed_phy.c

index 1960b46..d7a6524 100644 (file)
@@ -290,6 +290,15 @@ struct phy_device *fixed_phy_register(unsigned int irq,
                return ERR_PTR(-EINVAL);
        }
 
+       /* propagate the fixed link values to struct phy_device */
+       phy->link = status->link;
+       if (status->link) {
+               phy->speed = status->speed;
+               phy->duplex = status->duplex;
+               phy->pause = status->pause;
+               phy->asym_pause = status->asym_pause;
+       }
+
        of_node_get(np);
        phy->dev.of_node = np;