Linux 3.5 will have get_ts_info to support the Precision Time Protocol.
http://linuxptp.sourceforge.net/
http://en.wikipedia.org/wiki/Precision_Time_Protocol
We cannot backport this support given that this introduces
a data structure change on the ethtool_ops.
commit
c8f3a8c31069137fe0100e6920558f1a7487ef3c
Author: Richard Cochran <richardcochran@gmail.com>
Date: Tue Apr 3 22:59:17 2012 +0000
ethtool: Introduce a method for getting time stamping capabilities.
This commit adds a new ethtool ioctl that exposes the SO_TIMESTAMPING
capabilities of a network interface. In addition, user space programs
can use this ioctl to discover the PTP Hardware Clock (PHC) device
associated with the interface.
Since software receive time stamps are handled by the stack, the generic
ethtool code can answer the query correctly in case the MAC or PHY
drivers lack special time stamping features.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
mcgrof@flash ~/devel/compat-wireless (git::master)$ time ckmake; time ckmake
Trying kernel 3.2.2-030202-generic [OK]
Trying kernel 3.1.10-030110-generic [OK]
Trying kernel 3.0.18-030018-generic [OK]
Trying kernel 2.6.39-
02063904-generic [OK]
Trying kernel 2.6.38-
02063808-generic [OK]
Trying kernel 2.6.37-
02063706-generic [OK]
Trying kernel 2.6.36-
02063604-generic [OK]
Trying kernel 2.6.35-
02063512-generic [OK]
Trying kernel 2.6.34-
02063410-generic [OK]
Trying kernel 2.6.33-
02063305-generic [OK]
Trying kernel 2.6.32-
02063255-generic [OK]
Trying kernel 2.6.31-
02063113-generic [OK]
Trying kernel 2.6.30-
02063010-generic [OK]
Trying kernel 2.6.29-
02062906-generic [OK]
Trying kernel 2.6.28-
02062810-generic [OK]
Trying kernel 2.6.27-020627-generic [OK]
Trying kernel 2.6.26-020626-generic [OK]
Trying kernel 2.6.25-020625-generic [OK]
Trying kernel 2.6.24-020624-generic [OK]
real 70m16.460s
user 204m37.315s
sys 19m56.447s
real 15m35.818s
user 33m10.020s
sys 7m19.779s
Signed-off-by: Luis R. Rodriguez <mcgrof@frijolero.org>
if (unlikely(retval < 0)) {
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
-@@ -1386,7 +1386,7 @@ usbnet_probe (struct usb_interface *udev
+@@ -1387,7 +1387,7 @@ usbnet_probe (struct usb_interface *udev
net->features |= NETIF_F_HIGHDMA;
#endif
static struct nlmsghdr *rtnetlink_ifinfo_prep(struct net_device *dev,
struct sk_buff *skb)
{
-@@ -596,8 +620,13 @@ void wireless_send_event(struct net_devi
+@@ -597,8 +621,13 @@ void wireless_send_event(struct net_devi
skb_shinfo(skb)->frag_list = compskb;
#endif
}
EXPORT_SYMBOL(wireless_send_event);
-@@ -922,8 +951,13 @@ static int wireless_process_ioctl(struct
+@@ -923,8 +952,13 @@ static int wireless_process_ioctl(struct
return private(dev, iwr, cmd, info, handler);
}
/* Old driver API : call driver ioctl handler */
#define LBS_DEB_LEAVE 0x00000002
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -1283,7 +1283,7 @@ static const struct net_device_ops hwsim
+@@ -1289,7 +1289,7 @@ static const struct net_device_ops hwsim
static void hwsim_mon_setup(struct net_device *dev)
{
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -5223,7 +5223,9 @@ static int nl80211_wiphy_netns(struct sk
+@@ -5300,7 +5300,9 @@ static int nl80211_wiphy_netns(struct sk
if (!net_eq(wiphy_net(&rdev->wiphy), net))
err = cfg80211_switch_netns(rdev, net);
{
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
-@@ -1301,13 +1301,17 @@ static const struct net_device_ops usbne
+@@ -1302,13 +1302,17 @@ static const struct net_device_ops usbne
// precondition: never called in_interrupt
ntype == NL80211_IFTYPE_P2P_CLIENT))
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -1599,7 +1599,7 @@ static int nl80211_valid_4addr(struct cf
+@@ -1638,7 +1638,7 @@ static int nl80211_valid_4addr(struct cf
enum nl80211_iftype iftype)
{
if (!use_4addr) {
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
-@@ -4226,7 +4226,9 @@ static int nl80211_dump_scan(struct sk_b
+@@ -4293,7 +4293,9 @@ static int nl80211_dump_scan(struct sk_b
spin_lock_bh(&rdev->bss_lock);
cfg80211_bss_expire(rdev);
--- /dev/null
+Linux 3.5 will have get_ts_info to support the Precision Time Protocol.
+
+http://linuxptp.sourceforge.net/
+http://en.wikipedia.org/wiki/Precision_Time_Protocol
+
+We cannot backport this support given that this introduces
+a data structure change on the ethtool_ops.
+
+commit c8f3a8c31069137fe0100e6920558f1a7487ef3c
+Author: Richard Cochran <richardcochran@gmail.com>
+Date: Tue Apr 3 22:59:17 2012 +0000
+
+ ethtool: Introduce a method for getting time stamping capabilities.
+
+ This commit adds a new ethtool ioctl that exposes the SO_TIMESTAMPING
+ capabilities of a network interface. In addition, user space programs
+ can use this ioctl to discover the PTP Hardware Clock (PHC) device
+ associated with the interface.
+
+ Since software receive time stamps are handled by the stack, the generic
+ ethtool code can answer the query correctly in case the MAC or PHY
+ drivers lack special time stamping features.
+
+ Signed-off-by: Richard Cochran <richardcochran@gmail.com>
+ Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
+ Signed-off-by: David S. Miller <davem@davemloft.net>
+
+--- a/drivers/net/usb/usbnet.c
++++ b/drivers/net/usb/usbnet.c
+@@ -884,7 +884,9 @@ static const struct ethtool_ops usbnet_e
+ .get_drvinfo = usbnet_get_drvinfo,
+ .get_msglevel = usbnet_get_msglevel,
+ .set_msglevel = usbnet_set_msglevel,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
+ .get_ts_info = ethtool_op_get_ts_info,
++#endif
+ };
+
+ /*-------------------------------------------------------------------------*/