]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: dsa: move notifier info to private header
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 19 May 2017 21:00:51 +0000 (17:00 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 23:37:32 +0000 (19:37 -0400)
The DSA notifier events and info structure definitions are not meant for
DSA drivers and users, but only used internally by the DSA core files.

Move them from the public net/dsa.h file to the private dsa_priv.h file.

Also use this opportunity to turn the events into an anonymous enum,
because we don't care about the values, and this will prevent future
conflicts when adding (and sorting) new events.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/dsa.h
net/dsa/dsa_priv.h

index 791fed62fb16a810da52febf6995fd7a9431f770..c0e567c0c824332bc331a0930f97225b5ca0f0f3 100644 (file)
@@ -285,16 +285,6 @@ static inline u8 dsa_upstream_port(struct dsa_switch *ds)
                return ds->rtable[dst->cpu_dp->ds->index];
 }
 
-#define DSA_NOTIFIER_BRIDGE_JOIN               1
-#define DSA_NOTIFIER_BRIDGE_LEAVE              2
-
-/* DSA_NOTIFIER_BRIDGE_* */
-struct dsa_notifier_bridge_info {
-       struct net_device *br;
-       int sw_index;
-       int port;
-};
-
 struct dsa_switch_ops {
        /*
         * Legacy probing.
index 16021a8910953c35ffdc5dde52186bc3477910c6..c19241eb094b9d1e31a25f69f8f252c72f9f9dbc 100644 (file)
 #include <linux/netpoll.h>
 #include <net/dsa.h>
 
+enum {
+       DSA_NOTIFIER_BRIDGE_JOIN,
+       DSA_NOTIFIER_BRIDGE_LEAVE,
+};
+
+/* DSA_NOTIFIER_BRIDGE_* */
+struct dsa_notifier_bridge_info {
+       struct net_device *br;
+       int sw_index;
+       int port;
+};
+
 struct dsa_device_ops {
        struct sk_buff *(*xmit)(struct sk_buff *skb, struct net_device *dev);
        struct sk_buff *(*rcv)(struct sk_buff *skb, struct net_device *dev,