[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>
This commit is contained in:
committed by
David S. Miller
parent
e924283bf9
commit
46f25dffba
@@ -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;
|
||||
|
Reference in New Issue
Block a user