Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <jallen@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

John Allen and committed by
David S. Miller
3a807b75 e4061d57

+6
+6
drivers/net/ethernet/ibm/ibmvnic.c
··· 1468 1468 } 1469 1469 #endif 1470 1470 1471 + static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu) 1472 + { 1473 + return -EOPNOTSUPP; 1474 + } 1475 + 1471 1476 static const struct net_device_ops ibmvnic_netdev_ops = { 1472 1477 .ndo_open = ibmvnic_open, 1473 1478 .ndo_stop = ibmvnic_close, ··· 1484 1479 #ifdef CONFIG_NET_POLL_CONTROLLER 1485 1480 .ndo_poll_controller = ibmvnic_netpoll_controller, 1486 1481 #endif 1482 + .ndo_change_mtu = ibmvnic_change_mtu, 1487 1483 }; 1488 1484 1489 1485 /* ethtool functions */