mediatek: update to latest kernel patchset from v4.13-rc
[openwrt/openwrt.git] / target / linux / mediatek / patches-4.9 / 0038-net-next-dsa-move-struct-dsa_device_ops-to-the-globa.patch
1 From b58bf0220f666705e63fe8d361f37c913aee2d8f Mon Sep 17 00:00:00 2001
2 From: John Crispin <john@phrozen.org>
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
7 We need to access this struct from within the flow_dissector to fix
8 dissection for packets coming in on DSA devices.
9
10 Signed-off-by: John Crispin <john@phrozen.org>
11 ---
12 include/net/dsa.h | 7 +++++++
13 net/dsa/dsa_priv.h | 6 ------
14 2 files changed, 7 insertions(+), 6 deletions(-)
15
16 --- a/include/net/dsa.h
17 +++ b/include/net/dsa.h
18 @@ -88,6 +88,13 @@ struct dsa_platform_data {
19
20 struct packet_type;
21
22 +struct dsa_device_ops {
23 + struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
24 + int sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,
25 + struct packet_type *pt,
26 + struct net_device *orig_dev);
27 +};
28 +
29 struct dsa_switch_tree {
30 struct list_head list;
31
32 --- a/net/dsa/dsa_priv.h
33 +++ b/net/dsa/dsa_priv.h
34 @@ -15,12 +15,6 @@
35 #include <linux/netdevice.h>
36 #include <linux/netpoll.h>
37
38 -struct dsa_device_ops {
39 - struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
40 - int (*rcv)(struct sk_buff *skb, struct net_device *dev,
41 - struct packet_type *pt, struct net_device *orig_dev);
42 -};
43 -
44 struct dsa_slave_priv {
45 struct sk_buff * (*xmit)(struct sk_buff *skb,
46 struct net_device *dev);