From 70a58ffc7a51759ec6a065d7ea4f7d0567e9856a Mon Sep 17 00:00:00 2001 From: Bruce Allan Date: Tue, 18 Sep 2012 20:20:19 -0700 Subject: ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed When setting EEE parameters with the --set-eee command line option, ethtool will send the ETHTOOL_SEEE ioctl down to the driver even if none of the provided parameters are a change from current settings. Simply ignore it when that happens as done with other ethtool commands. Signed-off-by: Bruce Allan Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: Ben Hutchings --- ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethtool.c') diff --git a/ethtool.c b/ethtool.c index 25ba51f..f3649e2 100644 --- a/ethtool.c +++ b/ethtool.c @@ -3645,7 +3645,7 @@ static int do_geee(struct cmd_context *ctx) static int do_seee(struct cmd_context *ctx) { int adv_c = -1, lpi_c = -1, lpi_time_c = -1, eee_c = -1; - int change = -1, change2 = -1; + int change = -1, change2 = 0; struct ethtool_eee eeecmd; struct cmdline_info cmdline_eee[] = { { "advertise", CMDL_U32, &adv_c, &eeecmd.advertised }, -- cgit v1.2.1