diff options
author | John Allen <jallen@linux.vnet.ibm.com> | 2017-06-06 16:55:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-07 15:02:45 -0400 |
commit | 3a807b751c66e76bff39da4a9bd9828d7866d025 (patch) | |
tree | 498bcbbb43e60e9032d90ef4897f1f0bb4433f5a /drivers/net/ethernet/ibm | |
parent | e4061d572cef1f990bb7761f45d00342daa27fbd (diff) | |
download | linux-3a807b751c66e76bff39da4a9bd9828d7866d025.tar.gz linux-3a807b751c66e76bff39da4a9bd9828d7866d025.tar.bz2 linux-3a807b751c66e76bff39da4a9bd9828d7866d025.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r-- | drivers/net/ethernet/ibm/ibmvnic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a93757c255f7..c0fbeb387db4 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -1468,6 +1468,11 @@ static void ibmvnic_netpoll_controller(struct net_device *dev) } #endif +static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu) +{ + return -EOPNOTSUPP; +} + static const struct net_device_ops ibmvnic_netdev_ops = { .ndo_open = ibmvnic_open, .ndo_stop = ibmvnic_close, @@ -1479,6 +1484,7 @@ static const struct net_device_ops ibmvnic_netdev_ops = { #ifdef CONFIG_NET_POLL_CONTROLLER .ndo_poll_controller = ibmvnic_netpoll_controller, #endif + .ndo_change_mtu = ibmvnic_change_mtu, }; /* ethtool functions */ |