Skip to contentSkip to conversation

netdev: restore MTU change operation

PATCH Applied Ben Hutchings 2 participants 2 messages Jul 10, 2009 – Jul 12, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 netdev: restore MTU change operation

alloc_etherdev() used to install a default implementation of this operation, but it must now be explicitly installed in struct net_device_ops.
---
It's not clear that all these drivers should allow changing MTU, but they apparently used to.

This is applicable to 2.6.30 except that fec.c does not need to be changed.

Ben.

 drivers/net/8139too.c        |    1 +
 drivers/net/arm/ixp4xx_eth.c |    1 +
 drivers/net/ehea/ehea_main.c |    1 +
 drivers/net/fec.c            |    1 +
 drivers/net/plip.c           |    1 +
 drivers/net/smc91x.c         |    1 +
 drivers/net/smsc911x.c       |    1 +
 drivers/net/sunvnet.c        |    1 +
 drivers/net/usb/kaweth.c     |    1 +
 drivers/net/usb/pegasus.c    |    1 +
 drivers/net/via-rhine.c      |    1 +
 11 files changed, 11 insertions(+), 0 deletions(-)
drivers/net/8139too.c +1 -0
index 8ae72ec..0e2ba21 100644
@@ -908,6 +908,7 @@ static const struct net_device_ops rtl8139_netdev_ops = {
 	.ndo_open		= rtl8139_open,
 	.ndo_stop		= rtl8139_close,
 	.ndo_get_stats		= rtl8139_get_stats,
+	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_mac_address 	= rtl8139_set_mac_address,
 	.ndo_start_xmit		= rtl8139_start_xmit,
drivers/net/arm/ixp4xx_eth.c +1 -0
index 87fde32..3fe0987 100644
@@ -1142,6 +1142,7 @@ static const struct net_device_ops ixp4xx_netdev_ops = {
 	.ndo_start_xmit = eth_xmit,
 	.ndo_set_multicast_list = eth_set_mcast_list,
 	.ndo_do_ioctl = eth_ioctl,
+	.ndo_change_mtu = eth_change_mtu,
 	.ndo_set_mac_address = eth_mac_addr,
 	.ndo_validate_addr = eth_validate_addr,
 };
drivers/net/ehea/ehea_main.c +1 -0
index c7d1886..e8d46cc 100644
@@ -3080,6 +3080,7 @@ static const struct net_device_ops ehea_netdev_ops = {
 	.ndo_poll_controller	= ehea_netpoll,
 #endif
 	.ndo_get_stats		= ehea_get_stats,
+	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_set_mac_address	= ehea_set_mac_addr,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_multicast_list	= ehea_set_multicast_list,
drivers/net/fec.c +1 -0
index 0f19b74..d4b9807 100644
@@ -1642,6 +1642,7 @@ static const struct net_device_ops fec_netdev_ops = {
 	.ndo_stop		= fec_enet_close,
 	.ndo_start_xmit		= fec_enet_start_xmit,
 	.ndo_set_multicast_list = set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_tx_timeout		= fec_timeout,
 	.ndo_set_mac_address	= fec_set_mac_address,
drivers/net/plip.c +1 -0
index b79f776..2ca8b0d 100644
@@ -270,6 +270,7 @@ static const struct net_device_ops plip_netdev_ops = {
 	.ndo_stop		 = plip_close,
 	.ndo_start_xmit		 = plip_tx_packet,
 	.ndo_do_ioctl		 = plip_ioctl,
+	.ndo_change_mtu		 = eth_change_mtu,
 	.ndo_set_mac_address	 = eth_mac_addr,
 	.ndo_validate_addr	 = eth_validate_addr,
 };
drivers/net/smc91x.c +1 -0
index fdcbaf8..1c70e99 100644
@@ -1774,6 +1774,7 @@ static const struct net_device_ops smc_netdev_ops = {
 	.ndo_start_xmit		= smc_hard_start_xmit,
 	.ndo_tx_timeout		= smc_timeout,
 	.ndo_set_multicast_list	= smc_set_multicast_list,
+	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_mac_address 	= eth_mac_addr,
 #ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/smsc911x.c +1 -0
index 66067f9..94b6d26 100644
@@ -1779,6 +1779,7 @@ static const struct net_device_ops smsc911x_netdev_ops = {
 	.ndo_get_stats		= smsc911x_get_stats,
 	.ndo_set_multicast_list	= smsc911x_set_multicast_list,
 	.ndo_do_ioctl		= smsc911x_do_ioctl,
+	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_set_mac_address 	= smsc911x_set_mac_address,
 #ifdef CONFIG_NET_POLL_CONTROLLER
drivers/net/sunvnet.c +1 -0
index bc74db0..f1e5e45 100644
@@ -1016,6 +1016,7 @@ static const struct net_device_ops vnet_ops = {
 	.ndo_open		= vnet_open,
 	.ndo_stop		= vnet_close,
 	.ndo_set_multicast_list	= vnet_set_rx_mode,
+	.ndo_change_mtu		= eth_change_mtu,
 	.ndo_set_mac_address	= vnet_set_mac_addr,
 	.ndo_validate_addr	= eth_validate_addr,
 	.ndo_tx_timeout		= vnet_tx_timeout,
drivers/net/usb/kaweth.c +1 -0
index 238bea1..1f9ec29 100644
@@ -999,6 +999,7 @@ static const struct net_device_ops kaweth_netdev_ops = {
 	.ndo_tx_timeout =		kaweth_tx_timeout,
 	.ndo_set_multicast_list =	kaweth_set_rx_mode,
 	.ndo_get_stats =		kaweth_netdev_stats,
+	.ndo_change_mtu =		eth_change_mtu,
 	.ndo_set_mac_address =		eth_mac_addr,
 	.ndo_validate_addr =		eth_validate_addr,
 };
drivers/net/usb/pegasus.c +1 -0
index 9bea2af..631d269 100644
@@ -1493,6 +1493,7 @@ static const struct net_device_ops pegasus_netdev_ops = {
 	.ndo_set_multicast_list =	pegasus_set_multicast,
 	.ndo_get_stats =		pegasus_netdev_stats,
 	.ndo_tx_timeout =		pegasus_tx_timeout,
+	.ndo_change_mtu =		eth_change_mtu,
 	.ndo_set_mac_address =		eth_mac_addr,
 	.ndo_validate_addr =		eth_validate_addr,
 };
drivers/net/via-rhine.c +1 -0
index d3489a3..88c30a5 100644
@@ -621,6 +621,7 @@ static const struct net_device_ops rhine_netdev_ops = {
 	.ndo_start_xmit		 = rhine_start_tx,
 	.ndo_get_stats		 = rhine_get_stats,
 	.ndo_set_multicast_list	 = rhine_set_rx_mode,
+	.ndo_change_mtu		 = eth_change_mtu,
 	.ndo_validate_addr	 = eth_validate_addr,
 	.ndo_set_mac_address 	 = eth_mac_addr,
 	.ndo_do_ioctl		 = netdev_ioctl,
Signature · 1 line
1.6.3.3
maintainer Applied
#1 lore raw

From: Ben Hutchings <[email protected]>
Date: Fri, 10 Jul 2009 04:57:34 +0100

Quoted 3 lines

alloc_etherdev() used to install a default implementation of this operation, but it must now be explicitly installed in struct net_device_ops.

Applied, thanks Ben!