summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/igb/igb.h
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-09-25 05:14:55 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-10-19 04:25:10 -0700
commitb534550a17cda69a1d62acc18fff33370b5eee5b (patch)
treed37ae776186a270a791bbad843123c10659e8589 /drivers/net/ethernet/intel/igb/igb.h
parentea5ceeabf5621ed36d24e6741b45cfd1e1fce11b (diff)
downloadtalos-obmc-linux-b534550a17cda69a1d62acc18fff33370b5eee5b.tar.gz
talos-obmc-linux-b534550a17cda69a1d62acc18fff33370b5eee5b.zip
igb: Split Rx timestamping into two separate functions
In order to support page based receive we will need to split up the two different types of timestamping into two separate functions. The first one will handle legacy timestamps with the value in the register, and the new one will handle timestamps in the Rx buffer itself. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Matthew Vick <matthew.vick@intel.com> Tested-by: Aaron Brown <aaron.f.brown@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.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index 8aad230c0592..f6a1cd9d72a6 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -442,9 +442,22 @@ extern void igb_ptp_stop(struct igb_adapter *adapter);
extern void igb_ptp_reset(struct igb_adapter *adapter);
extern void igb_ptp_tx_work(struct work_struct *work);
extern void igb_ptp_tx_hwtstamp(struct igb_adapter *adapter);
-extern void igb_ptp_rx_hwtstamp(struct igb_q_vector *q_vector,
- union e1000_adv_rx_desc *rx_desc,
+extern void igb_ptp_rx_rgtstamp(struct igb_q_vector *q_vector,
struct sk_buff *skb);
+extern void igb_ptp_rx_pktstamp(struct igb_q_vector *q_vector,
+ unsigned char *va,
+ struct sk_buff *skb);
+static inline void igb_ptp_rx_hwtstamp(struct igb_q_vector *q_vector,
+ union e1000_adv_rx_desc *rx_desc,
+ struct sk_buff *skb)
+{
+ if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
+ igb_ptp_rx_pktstamp(q_vector, skb->data, skb);
+ skb_pull(skb, IGB_TS_HDR_LEN);
+ } else if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TS)) {
+ igb_ptp_rx_rgtstamp(q_vector, skb);
+ }
+}
extern int igb_ptp_hwtstamp_ioctl(struct net_device *netdev,
struct ifreq *ifr, int cmd);
#endif /* CONFIG_IGB_PTP */
OpenPOWER on IntegriCloud