summaryrefslogtreecommitdiffstats
path: root/net/ethernet
diff options
context:
space:
mode:
authorKris Katterjohn <kjak@users.sourceforge.net>2006-01-05 16:35:42 -0800
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-05 16:48:56 -0800
commit46f25dffbaba48c571d75f5f574f31978287b8d2 (patch)
tree080e8c4331faf36202bd92174e5e47d0a5d9aa47 /net/ethernet
parente924283bf93989979f27ef4f1228c5925f584a0a (diff)
downloadop-kernel-dev-46f25dffbaba48c571d75f5f574f31978287b8d2.zip
op-kernel-dev-46f25dffbaba48c571d75f5f574f31978287b8d2.tar.gz
[NET]: Change 1500 to ETH_DATA_LEN in some files
These patches add the header linux/if_ether.h and change 1500 to ETH_DATA_LEN in some files. Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethernet')
-rw-r--r--net/ethernet/eth.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index e245773..9f4dbeb 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -53,6 +53,7 @@
#include <linux/errno.h>
#include <linux/config.h>
#include <linux/init.h>
+#include <linux/if_ether.h>
#include <net/dst.h>
#include <net/arp.h>
#include <net/sock.h>
@@ -251,7 +252,7 @@ static int eth_mac_addr(struct net_device *dev, void *p)
static int eth_change_mtu(struct net_device *dev, int new_mtu)
{
- if ((new_mtu < 68) || (new_mtu > 1500))
+ if (new_mtu < 68 || new_mtu > ETH_DATA_LEN)
return -EINVAL;
dev->mtu = new_mtu;
return 0;
@@ -272,7 +273,7 @@ void ether_setup(struct net_device *dev)
dev->type = ARPHRD_ETHER;
dev->hard_header_len = ETH_HLEN;
- dev->mtu = 1500; /* eth_mtu */
+ dev->mtu = ETH_DATA_LEN;
dev->addr_len = ETH_ALEN;
dev->tx_queue_len = 1000; /* Ethernet wants good queues */
dev->flags = IFF_BROADCAST|IFF_MULTICAST;
OpenPOWER on IntegriCloud