r8152: nway reset after setting eee
authorhayeswang <hayeswang@realtek.com>
Mon, 6 Oct 2014 02:36:04 +0000 (10:36 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Oct 2014 21:51:38 +0000 (17:51 -0400)
Restart autonegotiation is necessary after setting EEE.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/r8152.c

index b9a98152815b680ae5c318f893a63d1d5acc864b..65326204baa0ca49805310f357ef3a4f9e32c78a 100644 (file)
@@ -3471,6 +3471,8 @@ rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
                goto out;
 
        ret = tp->rtl_ops.eee_set(tp, edata);
+       if (!ret)
+               ret = mii_nway_restart(&tp->mii);
 
        usb_autopm_put_interface(tp->intf);