]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/dsa.h
net: dsa: Pass a port to get_tag_protocol()
[mirror_ubuntu-bionic-kernel.git] / include / net / dsa.h
index 50e276dc4c013bf9ab7b98adbde62bf7626a582d..68e232fd4b0f0476e3cd4f658e05bdaf94932454 100644 (file)
@@ -116,13 +116,13 @@ struct dsa_switch_tree {
        struct raw_notifier_head        nh;
 
        /* Tree identifier */
-       u32 tree;
+       unsigned int index;
 
        /* Number of switches attached to this tree */
        struct kref refcount;
 
        /* Has this tree been applied to the hardware? */
-       bool applied;
+       bool setup;
 
        /*
         * Configuration data for the platform device that owns
@@ -190,7 +190,7 @@ struct dsa_port {
        struct dsa_switch       *ds;
        unsigned int            index;
        const char              *name;
-       struct dsa_port         *cpu_dp;
+       const struct dsa_port   *cpu_dp;
        struct device_node      *dn;
        unsigned int            ageing_time;
        u8                      stp_state;
@@ -209,7 +209,7 @@ struct dsa_switch {
         * Parent switch tree, and switch index.
         */
        struct dsa_switch_tree  *dst;
-       int                     index;
+       unsigned int            index;
 
        /* Listener for switch fabric events */
        struct notifier_block   nb;
@@ -321,7 +321,8 @@ struct dsa_switch_ops {
                                  struct device *host_dev, int sw_addr,
                                  void **priv);
 
-       enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds);
+       enum dsa_tag_protocol (*get_tag_protocol)(struct dsa_switch *ds,
+                                                 int port);
 
        int     (*setup)(struct dsa_switch *ds);
        u32     (*get_phy_flags)(struct dsa_switch *ds, int port);