diff options
Diffstat (limited to 'net/ethernet/eth.c')
-rw-r--r-- | net/ethernet/eth.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c index e24577367274..9f4dbeb59315 100644 --- a/net/ethernet/eth.c +++ b/net/ethernet/eth.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #include <linux/errno.h> | 53 | #include <linux/errno.h> |
54 | #include <linux/config.h> | 54 | #include <linux/config.h> |
55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
56 | #include <linux/if_ether.h> | ||
56 | #include <net/dst.h> | 57 | #include <net/dst.h> |
57 | #include <net/arp.h> | 58 | #include <net/arp.h> |
58 | #include <net/sock.h> | 59 | #include <net/sock.h> |
@@ -251,7 +252,7 @@ static int eth_mac_addr(struct net_device *dev, void *p) | |||
251 | 252 | ||
252 | static int eth_change_mtu(struct net_device *dev, int new_mtu) | 253 | static int eth_change_mtu(struct net_device *dev, int new_mtu) |
253 | { | 254 | { |
254 | if ((new_mtu < 68) || (new_mtu > 1500)) | 255 | if (new_mtu < 68 || new_mtu > ETH_DATA_LEN) |
255 | return -EINVAL; | 256 | return -EINVAL; |
256 | dev->mtu = new_mtu; | 257 | dev->mtu = new_mtu; |
257 | return 0; | 258 | return 0; |
@@ -272,7 +273,7 @@ void ether_setup(struct net_device *dev) | |||
272 | 273 | ||
273 | dev->type = ARPHRD_ETHER; | 274 | dev->type = ARPHRD_ETHER; |
274 | dev->hard_header_len = ETH_HLEN; | 275 | dev->hard_header_len = ETH_HLEN; |
275 | dev->mtu = 1500; /* eth_mtu */ | 276 | dev->mtu = ETH_DATA_LEN; |
276 | dev->addr_len = ETH_ALEN; | 277 | dev->addr_len = ETH_ALEN; |
277 | dev->tx_queue_len = 1000; /* Ethernet wants good queues */ | 278 | dev->tx_queue_len = 1000; /* Ethernet wants good queues */ |
278 | dev->flags = IFF_BROADCAST|IFF_MULTICAST; | 279 | dev->flags = IFF_BROADCAST|IFF_MULTICAST; |