Skip to content

Commit 3a807b7

Browse files
jallen93davem330
authored andcommitted
ibmvnic: Return failure on attempted mtu change
Changing the mtu is currently not supported in the ibmvnic driver. Implement .ndo_change_mtu in the driver so that attempting to use ifconfig to change the mtu will fail and present the user with an error message. Signed-off-by: John Allen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e4061d5 commit 3a807b7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/net/ethernet/ibm/ibmvnic.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,11 @@ static void ibmvnic_netpoll_controller(struct net_device *dev)
14681468
}
14691469
#endif
14701470

1471+
static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu)
1472+
{
1473+
return -EOPNOTSUPP;
1474+
}
1475+
14711476
static const struct net_device_ops ibmvnic_netdev_ops = {
14721477
.ndo_open = ibmvnic_open,
14731478
.ndo_stop = ibmvnic_close,
@@ -1479,6 +1484,7 @@ static const struct net_device_ops ibmvnic_netdev_ops = {
14791484
#ifdef CONFIG_NET_POLL_CONTROLLER
14801485
.ndo_poll_controller = ibmvnic_netpoll_controller,
14811486
#endif
1487+
.ndo_change_mtu = ibmvnic_change_mtu,
14821488
};
14831489

14841490
/* ethtool functions */

0 commit comments

Comments
 (0)