mdio: Expose pause frame advertising flags to ethtool
authorBen Hutchings <bhutchings@solarflare.com>
Mon, 12 Oct 2009 09:26:37 +0000 (09:26 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Oct 2009 06:59:08 +0000 (23:59 -0700)
In mdio45_ethtool_gset_npage() and mdio45_ethtool_gset(), check MDIO
pause frame advertising flags and set the corresponding ethtool flags.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mdio.c

index c0db9d753006b126f48712429e6ca0d8bd85d821..e85bf04cf813c608d80a247f2f3d144fbc7cc6a5 100644 (file)
@@ -162,6 +162,10 @@ static u32 mdio45_get_an(const struct mdio_if_info *mdio, u16 addr)
                result |= ADVERTISED_100baseT_Half;
        if (reg & ADVERTISE_100FULL)
                result |= ADVERTISED_100baseT_Full;
+       if (reg & ADVERTISE_PAUSE_CAP)
+               result |= ADVERTISED_Pause;
+       if (reg & ADVERTISE_PAUSE_ASYM)
+               result |= ADVERTISED_Asym_Pause;
        return result;
 }