aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@redhat.com>2013-04-29 03:08:07 -0400
committerDavid S. Miller <davem@davemloft.net>2013-04-29 15:14:02 -0400
commitf233a976ad15c3b8c54c0157f3c41d23f7514279 (patch)
tree1ef3fd0cdd8159b743c55b1ce34e61b32206a8df /drivers/net/ethernet
parentaebda156a570782a86fc4426842152237a19427d (diff)
tg3: shows HW time stamping support only if ptp_capable is present
Current tg3 shows hardware timestamping support for all devices when that is true only for the hardware with PTP_CAPABLE flag present. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/broadcom/tg3.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index ac83c87e0b1b..ef0b8a653155 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -5992,10 +5992,13 @@ static int tg3_get_ts_info(struct net_device *dev, struct ethtool_ts_info *info)
5992 5992
5993 info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | 5993 info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE |
5994 SOF_TIMESTAMPING_RX_SOFTWARE | 5994 SOF_TIMESTAMPING_RX_SOFTWARE |
5995 SOF_TIMESTAMPING_SOFTWARE | 5995 SOF_TIMESTAMPING_SOFTWARE;
5996 SOF_TIMESTAMPING_TX_HARDWARE | 5996
5997 SOF_TIMESTAMPING_RX_HARDWARE | 5997 if (tg3_flag(tp, PTP_CAPABLE)) {
5998 SOF_TIMESTAMPING_RAW_HARDWARE; 5998 info->so_timestamping = SOF_TIMESTAMPING_TX_HARDWARE |
5999 SOF_TIMESTAMPING_RX_HARDWARE |
6000 SOF_TIMESTAMPING_RAW_HARDWARE;
6001 }
5999 6002
6000 if (tp->ptp_clock) 6003 if (tp->ptp_clock)
6001 info->phc_index = ptp_clock_index(tp->ptp_clock); 6004 info->phc_index = ptp_clock_index(tp->ptp_clock);