igb: implement SIOCGHWTSTAMP ioctl
authorJacob Keller <jacob.e.keller@intel.com>
Sat, 11 Jan 2014 07:20:06 +0000 (07:20 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 21 Mar 2014 09:51:24 +0000 (02:51 -0700)
commit6ab5f7b2981e842e318ff48c708aaaa2a5a6a43e
tree85d6d497fa2a0eebd9ba2f9af55eec3a528ec133
parent26597802b47c5b92e3a1e6d5bd7cceef9e611431
igb: implement SIOCGHWTSTAMP ioctl

This patch adds support for the SIOCGHWTSTAMP ioctl which enables user
processes to read the current hwtstamp_config settings
non-destructively. Previously a process had to be privileged and could
only set values, it couldn't return what is currently set without
possibly overwriting the value.

This patch adds support for this new operation into igb by keeping a
shadow copy of the config in the adapter structure, which is returned
upon request.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb.h
drivers/net/ethernet/intel/igb/igb_main.c
drivers/net/ethernet/intel/igb/igb_ptp.c