compat-wireless: backport get_ts_info support
authorLuis R. Rodriguez <mcgrof@frijolero.org>
Fri, 6 Apr 2012 21:50:16 +0000 (14:50 -0700)
committerLuis R. Rodriguez <mcgrof@frijolero.org>
Sat, 7 Apr 2012 00:29:57 +0000 (17:29 -0700)
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>
patches/01-netdev.patch
patches/04-netns.patch
patches/14-device-type.patch
patches/30-bridge-port.patch
patches/42-netlink_seq.patch
patches/54-get_ts_info.patch [new file with mode: 0644]

index ca5b09bc5eeadbcd005efa8a744f38170429c5e2..f9cb6f5ece33febd6acb3219d3d8f85b3e96905c 100644 (file)
@@ -23,7 +23,7 @@ without creating a headache on maintenance of the pathes.
        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
  
@@ -156,7 +156,7 @@ without creating a headache on maintenance of the pathes.
  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
@@ -170,7 +170,7 @@ without creating a headache on maintenance of the pathes.
  }
  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 */
@@ -267,7 +267,7 @@ without creating a headache on maintenance of the pathes.
  #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)
  {
index 7e89d7fdbb7b552a442bc6741a5f46be5c7352c2..8dcb922efc56a6a65750f8e69cd25e983969ef3a 100644 (file)
@@ -6,7 +6,7 @@ files...
 
 --- 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);
  
index 8517a2737b0dd827d22ea806e902637b6cdc5fac..6129c394b65efa656f7580240f0adb840a705183 100644 (file)
@@ -36,7 +36,7 @@ compile warning.
  {
 --- 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
  
index 6293157cbe5ed1da9b2c82f5f5e8981397d293b8..c9a410e7afbe34661e8183b392f0f50b128afc24 100644 (file)
@@ -34,7 +34,7 @@ compat-wireless.
             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) {
index f43df87217745679ebd3f773c70e66eff0c4959c..550bdb27c6b90d9e2144d59d8da9454af42c3a0f 100644 (file)
@@ -1,6 +1,6 @@
 --- 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);
  
diff --git a/patches/54-get_ts_info.patch b/patches/54-get_ts_info.patch
new file mode 100644 (file)
index 0000000..0c8cdef
--- /dev/null
@@ -0,0 +1,39 @@
+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
+ };
+ /*-------------------------------------------------------------------------*/