--- ./drivers/net/8139too.c.orig Thu Apr 29 13:45:19 2004 +++ ./drivers/net/8139too.c Thu Apr 29 13:58:32 2004 @@ -188,7 +188,10 @@ #define NUM_TX_DESC 4 /* max supported ethernet frame size -- must be at least (dev->mtu+14+4).*/ -#define MAX_ETH_FRAME_SIZE 1536 +#define MAX_ETH_FRAME_SIZE 2048 + +#define MIN_MTU 60 +#define MAX_MTU (MAX_ETH_FRAME_SIZE - 14) /* Size of the Tx bounce buffers -- must be at least (dev->mtu+14+4). */ #define TX_BUF_SIZE MAX_ETH_FRAME_SIZE @@ -629,6 +632,7 @@ static void rtl8139_hw_start (struct net_device *dev); static struct ethtool_ops rtl8139_ethtool_ops; static void rtl8139_poll_nc (struct net_device *dev); +static int rtl8139_change_mtu (struct net_device *dev, int new_mtu); #ifdef USE_IO_OPS @@ -990,6 +994,7 @@ dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM | NETIF_F_HIGHDMA; dev->irq = pdev->irq; + dev->change_mtu = rtl8139_change_mtu; /* dev->priv/tp zeroed and aligned in alloc_etherdev */ tp = dev->priv; @@ -2542,6 +2547,14 @@ } #endif /* CONFIG_PM */ + +static int rtl8139_change_mtu(struct net_device *dev, int new_mtu) +{ + if (new_mtu < MIN_MTU || new_mtu > MAX_MTU) + return -EINVAL; + dev->mtu = new_mtu; + return 0; +} static struct pci_driver rtl8139_pci_driver = {