[ethtool] ethtool: --set-eee sends ETHTOOL_SEEE ioctl even if nothing changed
From: Jeff Kirsher <hidden>
Date: 2012-09-19 03:20:23
From: Bruce Allan <redacted> 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 <redacted> Tested-by: Aaron Brown <redacted> Signed-off-by: Jeff Kirsher <redacted> --- ethtool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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 },
--
1.7.11.4