File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -308,14 +308,15 @@ static struct lock_class_key dsa_master_addr_list_lock_key;
308
308
309
309
int dsa_master_setup (struct net_device * dev , struct dsa_port * cpu_dp )
310
310
{
311
+ int mtu = ETH_DATA_LEN + cpu_dp -> tag_ops -> overhead ;
311
312
int ret ;
312
313
313
314
rtnl_lock ();
314
- ret = dev_set_mtu (dev , ETH_DATA_LEN + cpu_dp -> tag_ops -> overhead );
315
+ ret = dev_set_mtu (dev , mtu );
315
316
rtnl_unlock ();
316
317
if (ret )
317
- netdev_warn (dev , "error %d setting MTU to include DSA overhead\n" ,
318
- ret );
318
+ netdev_warn (dev , "error %d setting MTU to %d to include DSA overhead\n" ,
319
+ ret , mtu );
319
320
320
321
/* If we use a tagging format that doesn't have an ethertype
321
322
* field, make sure that all packets from this point on get
Original file line number Diff line number Diff line change @@ -1850,8 +1850,8 @@ int dsa_slave_create(struct dsa_port *port)
1850
1850
ret = dsa_slave_change_mtu (slave_dev , ETH_DATA_LEN );
1851
1851
rtnl_unlock ();
1852
1852
if (ret && ret != - EOPNOTSUPP )
1853
- dev_warn (ds -> dev , "nonfatal error %d setting MTU on port %d\n" ,
1854
- ret , port -> index );
1853
+ dev_warn (ds -> dev , "nonfatal error %d setting MTU to %d on port %d\n" ,
1854
+ ret , ETH_DATA_LEN , port -> index );
1855
1855
1856
1856
netif_carrier_off (slave_dev );
1857
1857
You can’t perform that action at this time.
0 commit comments