i40e: don't store user requested mode until we've validated it
authorJacob Keller <jacob.e.keller@intel.com>
Wed, 4 Jun 2014 04:22:44 +0000 (04:22 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Thu, 26 Jun 2014 11:45:00 +0000 (04:45 -0700)
commitd19af2afe70c11c17552e3290560037a8812f467
tree3ca43582227d5604b5d13ef471ee3c8d4b78c8cd
parent189464555a4aef4db07f90294bd3723079f7c19a
i40e: don't store user requested mode until we've validated it

This patch prevents the SIOCGHWTSTAMP ioctl from possibly returning bad
data, by not permanently storing the setting into the private
structure until after we've finished validating that we can support it.

Change-ID: Ib59f9b4f73f451d5a2e76fb8efa5d4271b218433
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_ptp.c