0038-net-next-dsa-move-struct-dsa_device_ops-to-the-globa.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From b58bf0220f666705e63fe8d361f37c913aee2d8f Mon Sep 17 00:00:00 2001
  2. From: John Crispin <[email protected]>
  3. Date: Fri, 21 Jul 2017 09:32:54 +0200
  4. Subject: [PATCH 38/57] net-next: dsa: move struct dsa_device_ops to the global
  5. header file
  6. We need to access this struct from within the flow_dissector to fix
  7. dissection for packets coming in on DSA devices.
  8. Signed-off-by: John Crispin <[email protected]>
  9. ---
  10. include/net/dsa.h | 7 +++++++
  11. net/dsa/dsa_priv.h | 6 ------
  12. 2 files changed, 7 insertions(+), 6 deletions(-)
  13. --- a/include/net/dsa.h
  14. +++ b/include/net/dsa.h
  15. @@ -88,6 +88,13 @@ struct dsa_platform_data {
  16. struct packet_type;
  17. +struct dsa_device_ops {
  18. + struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
  19. + int sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
  20. + struct packet_type *pt,
  21. + struct net_device *orig_dev);
  22. +};
  23. +
  24. struct dsa_switch_tree {
  25. struct list_head list;
  26. --- a/net/dsa/dsa_priv.h
  27. +++ b/net/dsa/dsa_priv.h
  28. @@ -15,12 +15,6 @@
  29. #include <linux/netdevice.h>
  30. #include <linux/netpoll.h>
  31. -struct dsa_device_ops {
  32. - struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
  33. - int (*rcv)(struct sk_buff *skb, struct net_device *dev,
  34. - struct packet_type *pt, struct net_device *orig_dev);
  35. -};
  36. -
  37. struct dsa_slave_priv {
  38. struct sk_buff * (*xmit)(struct sk_buff *skb,
  39. struct net_device *dev);