Discussion:
[Linuxptp-users] Software timestamping on unsupported driver
Šimon Wernisch
2017-03-24 17:44:30 UTC
Permalink
Hello,
I am trying to use ptp4l with software timestamping on my raspberry pi
with a RT5370 wireless adapter. The driver is rt2800usb found in
drivers/net/wireless/ralink/rt2x00 of the raspberry kernel and it
doesn't support software timestamp transmitting.
I have added skb_tx_timestamp(skb) into the transmit path and a
ethtool_ops struct. Ethtool still reports no software transmitting.
Could I ask for help with this driver or general instructions?

Thanks,
Simon Wernisch
Richard Cochran
2017-03-24 19:09:29 UTC
Permalink
Post by Å imon Wernisch
Hello,
I am trying to use ptp4l with software timestamping on my raspberry pi
with a RT5370 wireless adapter. The driver is rt2800usb found in
drivers/net/wireless/ralink/rt2x00 of the raspberry kernel and it
doesn't support software timestamp transmitting.
Wireless PTP is not going to work very well. I recommend using NTP
instead.
Post by Å imon Wernisch
I have added skb_tx_timestamp(skb) into the transmit path and a
ethtool_ops struct. Ethtool still reports no software transmitting.
It is not enough just to add the ethtool structure...
Post by Å imon Wernisch
+static const struct ethtool_ops rt2x00_ethtool_ops = {
+ .get_ts_info = ethtool_op_get_ts_info,
+ .get_link = ethtool_op_get_link
+};
You also must use it in the driver's net_device instance, for example:

ndev->ethtool_ops = &rt2x00_ethtool_ops;

HTH,
Richard
Gary E. Miller
2017-03-24 19:17:23 UTC
Permalink
Yo Richard!

On Fri, 24 Mar 2017 20:09:29 +0100
Post by Richard Cochran
Post by Å imon Wernisch
Hello,
I am trying to use ptp4l with software timestamping on my raspberry
pi with a RT5370 wireless adapter. The driver is rt2800usb found in
drivers/net/wireless/ralink/rt2x00 of the raspberry kernel and it
doesn't support software timestamp transmitting.
Wireless PTP is not going to work very well. I recommend using NTP
instead.
Let us not make this a PTP vs. NTP thing. There is ongoing work to
use the low level PTP mechanisms with NTP. They can work together, and
in the near future they will work even better together.

But I agree, you will get much better results with the RasPi ethernet
over its WiFi. Maybe this user does not have the wired option.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
***@rellim.com Tel:+1 541 382 8588

Veritas liberabit vos. -- Quid est veritas?
"If you can’t measure it, you can’t improve it." - Lord Kelvin
Šimon Wernisch
2017-03-25 11:37:39 UTC
Permalink
Thank you for the replies,

On Fri, 24 Mar 2017 12:17:23 -0700
Post by Gary E. Miller
On Fri, 24 Mar 2017 20:09:29 +0100
Post by Richard Cochran
Wireless PTP is not going to work very well. I recommend using NTP
instead.
Let us not make this a PTP vs. NTP thing. There is ongoing work to
use the low level PTP mechanisms with NTP. They can work together,
and in the near future they will work even better together.
But I agree, you will get much better results with the RasPi ethernet
over its WiFi. Maybe this user does not have the wired option.
I am working on a project where the raspberries are built into racing
slot cars and an access point, so I can't be extremely strict on the
level of accuracy. PTP still sounds like the better option so I will
test it using PPS signal and an osciloscope and tweak the servo and
filter parameters.

Simon Wernisch

Loading...