summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/adi
diff options
context:
space:
mode:
authorRichard Cochran2012-10-31 07:27:22 +0100
committerDavid S. Miller2012-11-01 16:41:34 +0100
commit85c153d2c7e51efcf0f715118c3c30b62c5fce68 (patch)
treee425b231a4a694737d6d31fddbaf726626daa058 /drivers/net/ethernet/adi
parentptp: add an ioctl to compare PHC time with system time (diff)
downloadkernel-qcow2-linux-85c153d2c7e51efcf0f715118c3c30b62c5fce68.tar.gz
kernel-qcow2-linux-85c153d2c7e51efcf0f715118c3c30b62c5fce68.tar.xz
kernel-qcow2-linux-85c153d2c7e51efcf0f715118c3c30b62c5fce68.zip
bfin_mac: only advertise hardware time stamped when enabled.
The hardware time stamping code is a compile time option for the blackfin. When it is not enabled, the driver should fall back to the standard ethtool reply to the get_ts_info query. Compile tested only. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Tested-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/adi')
-rw-r--r--drivers/net/ethernet/adi/bfin_mac.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index f816426e1085..2349abba33d8 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -548,6 +548,7 @@ static int bfin_mac_ethtool_setwol(struct net_device *dev,
return 0;
}
+#ifdef CONFIG_BFIN_MAC_USE_HWSTAMP
static int bfin_mac_ethtool_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info)
{
@@ -566,6 +567,7 @@ static int bfin_mac_ethtool_get_ts_info(struct net_device *dev,
(1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT);
return 0;
}
+#endif
static const struct ethtool_ops bfin_mac_ethtool_ops = {
.get_settings = bfin_mac_ethtool_getsettings,
@@ -574,7 +576,9 @@ static const struct ethtool_ops bfin_mac_ethtool_ops = {
.get_drvinfo = bfin_mac_ethtool_getdrvinfo,
.get_wol = bfin_mac_ethtool_getwol,
.set_wol = bfin_mac_ethtool_setwol,
+#ifdef CONFIG_BFIN_MAC_USE_HWSTAMP
.get_ts_info = bfin_mac_ethtool_get_ts_info,
+#endif
};
/**************************************************************************/