Commit 3a807b75 authored by John Allen's avatar John Allen Committed by David S. Miller

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: default avatarJohn Allen <jallen@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4061d57
...@@ -1468,6 +1468,11 @@ static void ibmvnic_netpoll_controller(struct net_device *dev) ...@@ -1468,6 +1468,11 @@ static void ibmvnic_netpoll_controller(struct net_device *dev)
} }
#endif #endif
static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu)
{
return -EOPNOTSUPP;
}
static const struct net_device_ops ibmvnic_netdev_ops = { static const struct net_device_ops ibmvnic_netdev_ops = {
.ndo_open = ibmvnic_open, .ndo_open = ibmvnic_open,
.ndo_stop = ibmvnic_close, .ndo_stop = ibmvnic_close,
...@@ -1479,6 +1484,7 @@ static const struct net_device_ops ibmvnic_netdev_ops = { ...@@ -1479,6 +1484,7 @@ static const struct net_device_ops ibmvnic_netdev_ops = {
#ifdef CONFIG_NET_POLL_CONTROLLER #ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ibmvnic_netpoll_controller, .ndo_poll_controller = ibmvnic_netpoll_controller,
#endif #endif
.ndo_change_mtu = ibmvnic_change_mtu,
}; };
/* ethtool functions */ /* ethtool functions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment