aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/ibm/ibmvnic.c
diff options
context:
space:
mode:
authorJohn Allen <jallen@linux.vnet.ibm.com>2017-06-06 17:55:52 -0400
committerDavid S. Miller <davem@davemloft.net>2017-06-07 15:02:45 -0400
commit3a807b751c66e76bff39da4a9bd9828d7866d025 (patch)
tree498bcbbb43e60e9032d90ef4897f1f0bb4433f5a /drivers/net/ethernet/ibm/ibmvnic.c
parente4061d572cef1f990bb7761f45d00342daa27fbd (diff)
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/ibmvnic.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c6
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)
1468} 1468}
1469#endif 1469#endif
1470 1470
1471static int ibmvnic_change_mtu(struct net_device *netdev, int new_mtu)
1472{
1473 return -EOPNOTSUPP;
1474}
1475
1471static const struct net_device_ops ibmvnic_netdev_ops = { 1476static const struct net_device_ops ibmvnic_netdev_ops = {
1472 .ndo_open = ibmvnic_open, 1477 .ndo_open = ibmvnic_open,
1473 .ndo_stop = ibmvnic_close, 1478 .ndo_stop = ibmvnic_close,
@@ -1479,6 +1484,7 @@ static const struct net_device_ops ibmvnic_netdev_ops = {
1479#ifdef CONFIG_NET_POLL_CONTROLLER 1484#ifdef CONFIG_NET_POLL_CONTROLLER
1480 .ndo_poll_controller = ibmvnic_netpoll_controller, 1485 .ndo_poll_controller = ibmvnic_netpoll_controller,
1481#endif 1486#endif
1487 .ndo_change_mtu = ibmvnic_change_mtu,
1482}; 1488};
1483 1489
1484/* ethtool functions */ 1490/* ethtool functions */