int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp)
{
int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp)
{
+ int mtu = ETH_DATA_LEN + cpu_dp->tag_ops->overhead;
- ret = dev_set_mtu(dev, ETH_DATA_LEN + cpu_dp->tag_ops->overhead);
+ ret = dev_set_mtu(dev, mtu);
- netdev_warn(dev, "error %d setting MTU to include DSA overhead\n",
- ret);
+ netdev_warn(dev, "error %d setting MTU to %d to include DSA overhead\n",
+ ret, mtu);
/* If we use a tagging format that doesn't have an ethertype
* field, make sure that all packets from this point on get
/* If we use a tagging format that doesn't have an ethertype
* field, make sure that all packets from this point on get
ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
rtnl_unlock();
if (ret && ret != -EOPNOTSUPP)
ret = dsa_slave_change_mtu(slave_dev, ETH_DATA_LEN);
rtnl_unlock();
if (ret && ret != -EOPNOTSUPP)
- dev_warn(ds->dev, "nonfatal error %d setting MTU on port %d\n",
- ret, port->index);
+ dev_warn(ds->dev, "nonfatal error %d setting MTU to %d on port %d\n",
+ ret, ETH_DATA_LEN, port->index);
netif_carrier_off(slave_dev);
netif_carrier_off(slave_dev);