e1000e: Validate hwtstamp_config completely before applying it
authorBen Hutchings <bhutchings@solarflare.com>
Thu, 14 Nov 2013 00:41:38 +0000 (00:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 14 Nov 2013 21:22:09 +0000 (16:22 -0500)
e1000e_hwtstamp_ioctl() should validate all fields of hwtstamp_config
before making any changes.  Currently it copies the configuration to
the e1000_adapter structure before validating it at all.

Change e1000e_config_hwtstamp() to take a pointer to the
hwstamp_config and to copy the config after validating it.

Compile-tested only.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found