]> bbs.cooldavid.org Git - jme.git/commitdiff
ethtool: Use full 32 bit speed range in ethtool's set_settings
authorDavid Decotigny <decot@google.com>
Wed, 27 Apr 2011 18:32:39 +0000 (18:32 +0000)
committerGuo-Fu Tseng <cooldavid@cooldavid.org>
Sat, 25 Jun 2011 05:53:48 +0000 (13:53 +0800)
This makes sure the ethtool's set_settings() callback of network
drivers don't ignore the 16 most significant bits when ethtool calls
their set_settings().

All drivers compiled with make allyesconfig on x86_64 have been
updated.

Signed-off-by: David Decotigny <decot@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
jme.c

diff --git a/jme.c b/jme.c
index be4773f54a244073fee58a55861419d1fb0911cb..b5b174a8c149be9f07e56d8b9f07524ea3505792 100644 (file)
--- a/jme.c
+++ b/jme.c
@@ -2555,7 +2555,8 @@ jme_set_settings(struct net_device *netdev,
        struct jme_adapter *jme = netdev_priv(netdev);
        int rc, fdc = 0;
 
-       if (ecmd->speed == SPEED_1000 && ecmd->autoneg != AUTONEG_ENABLE)
+       if (ethtool_cmd_speed(ecmd) == SPEED_1000
+           && ecmd->autoneg != AUTONEG_ENABLE)
                return -EINVAL;
 
        /*