aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb.h
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2014-01-11 07:20:06 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-03-21 02:51:24 -0700
commit6ab5f7b2981e842e318ff48c708aaaa2a5a6a43e (patch)
tree85d6d497fa2a0eebd9ba2f9af55eec3a528ec133 /drivers/net/ethernet/intel/igb/igb.h
parentixgbevf: Additional adapter removal checks (diff)
downloadlinux-dev-6ab5f7b2981e842e318ff48c708aaaa2a5a6a43e.tar.xz
linux-dev-6ab5f7b2981e842e318ff48c708aaaa2a5a6a43e.zip
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>
Diffstat (limited to 'drivers/net/ethernet/intel/igb/igb.h')
-rw-r--r--drivers/net/ethernet/intel/igb/igb.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index a202c9640e93..411b213c63be 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -434,6 +434,7 @@ struct igb_adapter {
struct delayed_work ptp_overflow_work;
struct work_struct ptp_tx_work;
struct sk_buff *ptp_tx_skb;
+ struct hwtstamp_config tstamp_config;
unsigned long ptp_tx_start;
unsigned long last_rx_ptp_check;
spinlock_t tmreg_lock;
@@ -545,8 +546,8 @@ static inline void igb_ptp_rx_hwtstamp(struct igb_ring *rx_ring,
rx_ring->last_rx_timestamp = jiffies;
}
-int igb_ptp_hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr,
- int cmd);
+int igb_ptp_set_ts_config(struct net_device *netdev, struct ifreq *ifr);
+int igb_ptp_get_ts_config(struct net_device *netdev, struct ifreq *ifr);
#ifdef CONFIG_IGB_HWMON
void igb_sysfs_exit(struct igb_adapter *adapter);
int igb_sysfs_init(struct igb_adapter *adapter);