diff options
author | Matthew Vick <matthew.vick@intel.com> | 2012-08-10 01:40:43 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-09-17 05:04:05 -0400 |
commit | 3c89f6d0d4aa92ff252c17f8f6b5c8983ae2b77e (patch) | |
tree | bad0f3f664d52709fd942e81296bf5ed565f494a /drivers/net/ethernet/intel/igb/igb.h | |
parent | ba01dfe18241bf89b058fd8a60218b218ad2bb30 (diff) |
igb: Tidy up wrapping for CONFIG_IGB_PTP.
For users without CONFIG_IGB_PTP=y, we should not be compiling any PTP
code into the driver. Tidy up the wrapping in igb to support this.
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Matthew Vick <matthew.vick@intel.com>
Acked-by: Jacob Keller <jacob.e.keller@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.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h index 0c9f62caa8fa..a3b5b908448a 100644 --- a/drivers/net/ethernet/intel/igb/igb.h +++ b/drivers/net/ethernet/intel/igb/igb.h | |||
@@ -34,9 +34,11 @@ | |||
34 | #include "e1000_mac.h" | 34 | #include "e1000_mac.h" |
35 | #include "e1000_82575.h" | 35 | #include "e1000_82575.h" |
36 | 36 | ||
37 | #ifdef CONFIG_IGB_PTP | ||
37 | #include <linux/clocksource.h> | 38 | #include <linux/clocksource.h> |
38 | #include <linux/net_tstamp.h> | 39 | #include <linux/net_tstamp.h> |
39 | #include <linux/ptp_clock_kernel.h> | 40 | #include <linux/ptp_clock_kernel.h> |
41 | #endif /* CONFIG_IGB_PTP */ | ||
40 | #include <linux/bitops.h> | 42 | #include <linux/bitops.h> |
41 | #include <linux/if_vlan.h> | 43 | #include <linux/if_vlan.h> |
42 | 44 | ||
@@ -376,12 +378,15 @@ struct igb_adapter { | |||
376 | int node; | 378 | int node; |
377 | u32 *shadow_vfta; | 379 | u32 *shadow_vfta; |
378 | 380 | ||
381 | #ifdef CONFIG_IGB_PTP | ||
379 | struct ptp_clock *ptp_clock; | 382 | struct ptp_clock *ptp_clock; |
380 | struct ptp_clock_info caps; | 383 | struct ptp_clock_info caps; |
381 | struct delayed_work overflow_work; | 384 | struct delayed_work overflow_work; |
382 | spinlock_t tmreg_lock; | 385 | spinlock_t tmreg_lock; |
383 | struct cyclecounter cc; | 386 | struct cyclecounter cc; |
384 | struct timecounter tc; | 387 | struct timecounter tc; |
388 | #endif /* CONFIG_IGB_PTP */ | ||
389 | |||
385 | char fw_version[32]; | 390 | char fw_version[32]; |
386 | }; | 391 | }; |
387 | 392 | ||
@@ -436,12 +441,11 @@ extern void igb_set_fw_version(struct igb_adapter *); | |||
436 | #ifdef CONFIG_IGB_PTP | 441 | #ifdef CONFIG_IGB_PTP |
437 | extern void igb_ptp_init(struct igb_adapter *adapter); | 442 | extern void igb_ptp_init(struct igb_adapter *adapter); |
438 | extern void igb_ptp_remove(struct igb_adapter *adapter); | 443 | extern void igb_ptp_remove(struct igb_adapter *adapter); |
439 | |||
440 | extern void igb_systim_to_hwtstamp(struct igb_adapter *adapter, | 444 | extern void igb_systim_to_hwtstamp(struct igb_adapter *adapter, |
441 | struct skb_shared_hwtstamps *hwtstamps, | 445 | struct skb_shared_hwtstamps *hwtstamps, |
442 | u64 systim); | 446 | u64 systim); |
447 | #endif /* CONFIG_IGB_PTP */ | ||
443 | 448 | ||
444 | #endif | ||
445 | static inline s32 igb_reset_phy(struct e1000_hw *hw) | 449 | static inline s32 igb_reset_phy(struct e1000_hw *hw) |
446 | { | 450 | { |
447 | if (hw->phy.ops.reset) | 451 | if (hw->phy.ops.reset) |