int dsa_master_ethtool_setup(struct net_device *dev);
void dsa_master_ethtool_restore(struct net_device *dev);
-static inline struct net_device *dsa_master_get_slave(struct net_device *dev,
- int device, int port)
+static inline struct net_device *dsa_master_find_slave(struct net_device *dev,
+ int device, int port)
{
struct dsa_port *cpu_dp = dev->dsa_ptr;
struct dsa_switch_tree *dst = cpu_dp->dst;
/* Locate which port this is coming from */
source_port = brcm_tag[3] & BRCM_EG_PID_MASK;
- skb->dev = dsa_master_get_slave(dev, 0, source_port);
+ skb->dev = dsa_master_find_slave(dev, 0, source_port);
if (!skb->dev)
return NULL;
source_device = dsa_header[0] & 0x1f;
source_port = (dsa_header[1] >> 3) & 0x1f;
- skb->dev = dsa_master_get_slave(dev, source_device, source_port);
+ skb->dev = dsa_master_find_slave(dev, source_device, source_port);
if (!skb->dev)
return NULL;
source_device = edsa_header[0] & 0x1f;
source_port = (edsa_header[1] >> 3) & 0x1f;
- skb->dev = dsa_master_get_slave(dev, source_device, source_port);
+ skb->dev = dsa_master_find_slave(dev, source_device, source_port);
if (!skb->dev)
return NULL;
source_port = tag[0] & 7;
- skb->dev = dsa_master_get_slave(dev, 0, source_port);
+ skb->dev = dsa_master_find_slave(dev, 0, source_port);
if (!skb->dev)
return NULL;
source_port = ntohs(lan9303_tag[1]) & 0x3;
- skb->dev = dsa_master_get_slave(dev, 0, source_port);
+ skb->dev = dsa_master_find_slave(dev, 0, source_port);
if (!skb->dev) {
dev_warn_ratelimited(&dev->dev, "Dropping packet due to invalid source port\n");
return NULL;
/* Get source port information */
port = (hdr & MTK_HDR_RECV_SOURCE_PORT_MASK);
- skb->dev = dsa_master_get_slave(dev, 0, port);
+ skb->dev = dsa_master_find_slave(dev, 0, port);
if (!skb->dev)
return NULL;
/* Get source port information */
port = (hdr & QCA_HDR_RECV_SOURCE_PORT_MASK);
- skb->dev = dsa_master_get_slave(dev, 0, port);
+ skb->dev = dsa_master_find_slave(dev, 0, port);
if (!skb->dev)
return NULL;
source_port = trailer[1] & 7;
- skb->dev = dsa_master_get_slave(dev, 0, source_port);
+ skb->dev = dsa_master_find_slave(dev, 0, source_port);
if (!skb->dev)
return NULL;