patch-2.0.1 linux/drivers/net/net_init.c
Next file: linux/drivers/net/slhc.c
Previous file: linux/drivers/net/de4x5.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Sat Jun 29 12:00:46 1996
- Orig file:
v2.0.0/linux/drivers/net/net_init.c
- Orig date:
Mon Mar 25 08:58:21 1996
diff -u --recursive --new-file v2.0.0/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
@@ -20,6 +20,8 @@
Use dev_close cleanly so we always shut things down tidily.
Changed 29/10/95, Alan Cox to pass sockaddr's around for mac addresses.
+
+ 14/06/96 - Paul Gortmaker: Add generic eth_change_mtu() function.
*/
#include <linux/config.h>
@@ -144,6 +146,14 @@
return 0;
}
+static int eth_change_mtu(struct device *dev, int new_mtu)
+{
+ if ((new_mtu < 68) || (new_mtu > 1500))
+ return -EINVAL;
+ dev->mtu = new_mtu;
+ return 0;
+}
+
void ether_setup(struct device *dev)
{
int i;
@@ -165,6 +175,7 @@
}
}
+ dev->change_mtu = eth_change_mtu;
dev->hard_header = eth_header;
dev->rebuild_header = eth_rebuild_header;
dev->set_mac_address = eth_mac_addr;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov