struct netpoll_info;
 struct device;
 struct phy_device;
-struct dsa_switch_tree;
+struct dsa_port;
 
 /* 802.11 specific */
 struct wireless_dev;
        struct vlan_info __rcu  *vlan_info;
 #endif
 #if IS_ENABLED(CONFIG_NET_DSA)
-       struct dsa_switch_tree  *dsa_ptr;
+       struct dsa_port         *dsa_ptr;
 #endif
 #if IS_ENABLED(CONFIG_TIPC)
        struct tipc_bearer __rcu *tipc_ptr;
 
 static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
                          struct packet_type *pt, struct net_device *unused)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
        struct sk_buff *nskb = NULL;
        struct pcpu_sw_netstats *s;
        struct dsa_slave_priv *p;
 
-       if (unlikely(dst == NULL)) {
+       if (unlikely(!cpu_dp)) {
                kfree_skb(skb);
                return 0;
        }
        if (!skb)
                return 0;
 
-       nskb = dst->rcv(skb, dev, pt);
+       nskb = cpu_dp->rcv(skb, dev, pt);
        if (!nskb) {
                kfree_skb(skb);
                return 0;
 
 static inline struct net_device *dsa_master_get_slave(struct net_device *dev,
                                                      int device, int port)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
+       struct dsa_switch_tree *dst = cpu_dp->dst;
        struct dsa_switch *ds;
 
        if (device < 0 || device >= DSA_MAX_SWITCHES)
 
                                         struct ethtool_stats *stats,
                                         uint64_t *data)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
-       struct dsa_port *cpu_dp = dst->cpu_dp;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
        const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops;
        struct dsa_switch *ds = cpu_dp->ds;
        int port = cpu_dp->index;
 
 static int dsa_master_get_sset_count(struct net_device *dev, int sset)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
-       struct dsa_port *cpu_dp = dst->cpu_dp;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
        const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops;
        struct dsa_switch *ds = cpu_dp->ds;
        int count = 0;
 static void dsa_master_get_strings(struct net_device *dev, uint32_t stringset,
                                   uint8_t *data)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
-       struct dsa_port *cpu_dp = dst->cpu_dp;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
        const struct ethtool_ops *ops = cpu_dp->orig_ethtool_ops;
        struct dsa_switch *ds = cpu_dp->ds;
        int port = cpu_dp->index;
 
 int dsa_master_ethtool_setup(struct net_device *dev)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
-       struct dsa_port *cpu_dp = dst->cpu_dp;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
        struct dsa_switch *ds = cpu_dp->ds;
        struct ethtool_ops *ops;
 
 
 void dsa_master_ethtool_restore(struct net_device *dev)
 {
-       struct dsa_switch_tree *dst = dev->dsa_ptr;
-       struct dsa_port *cpu_dp = dst->cpu_dp;
+       struct dsa_port *cpu_dp = dev->dsa_ptr;
 
        dev->ethtool_ops = cpu_dp->orig_ethtool_ops;
        cpu_dp->orig_ethtool_ops = NULL;