On 7/19/2022 2:13 PM, Mohammad wrote: > Hello, > > i am using Ath9k driver to implement Wifi-ptp . > > the ethtool tool shows, the interface does not support neither software > nor hardware timestamping. > so how can i add software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE) > capability to the driver? >
Right. This requires driver support. > in the README.org is is written adding this capability entails adding a > single line of code to the device driver. > > Which Code of line and where should be this line added? > Strictly speaking its not "one" line, because you probably want to report the feature as supported via ethtool as well. You need to add a skb_tx_timestamp call to your transmit routine as close as possible to where you hand the socket buffer off to the hardware. This is the "one line" that is referred to above. You also will want to extend your driver's ethtool implementation of .get_ts_info to report the timestamping You can assign it to ethtool_op_get_ts_info since this reports software timestamping. Those are the two lines you would need to implement in the driver. I am not sure how accurate a software timestamp for a wifi device would be, given the potential delay between timestamp and actual transmission. Hope this helps. Regards, Jake > Thanks. > > > > > > _______________________________________________ > Linuxptp-users mailing list > Linuxptp-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/linuxptp-users _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users