eth.c (3d5271f9883cba7b54762bc4fe027d4172f06db7) eth.c (46f25dffbaba48c571d75f5f574f31978287b8d2)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Ethernet-type device handling.
7 *
8 * Version: @(#)eth.c 1.0.7 05/25/93

--- 39 unchanged lines hidden (view full) ---

48#include <linux/inet.h>
49#include <linux/ip.h>
50#include <linux/netdevice.h>
51#include <linux/etherdevice.h>
52#include <linux/skbuff.h>
53#include <linux/errno.h>
54#include <linux/config.h>
55#include <linux/init.h>
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * Ethernet-type device handling.
7 *
8 * Version: @(#)eth.c 1.0.7 05/25/93

--- 39 unchanged lines hidden (view full) ---

48#include <linux/inet.h>
49#include <linux/ip.h>
50#include <linux/netdevice.h>
51#include <linux/etherdevice.h>
52#include <linux/skbuff.h>
53#include <linux/errno.h>
54#include <linux/config.h>
55#include <linux/init.h>
56#include <linux/if_ether.h>
56#include <net/dst.h>
57#include <net/arp.h>
58#include <net/sock.h>
59#include <net/ipv6.h>
60#include <net/ip.h>
61#include <asm/uaccess.h>
62#include <asm/system.h>
63#include <asm/checksum.h>

--- 182 unchanged lines hidden (view full) ---

246 if (netif_running(dev))
247 return -EBUSY;
248 memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
249 return 0;
250}
251
252static int eth_change_mtu(struct net_device *dev, int new_mtu)
253{
57#include <net/dst.h>
58#include <net/arp.h>
59#include <net/sock.h>
60#include <net/ipv6.h>
61#include <net/ip.h>
62#include <asm/uaccess.h>
63#include <asm/system.h>
64#include <asm/checksum.h>

--- 182 unchanged lines hidden (view full) ---

247 if (netif_running(dev))
248 return -EBUSY;
249 memcpy(dev->dev_addr, addr->sa_data,dev->addr_len);
250 return 0;
251}
252
253static int eth_change_mtu(struct net_device *dev, int new_mtu)
254{
254 if ((new_mtu < 68) || (new_mtu > 1500))
255 if (new_mtu < 68 || new_mtu > ETH_DATA_LEN)
255 return -EINVAL;
256 dev->mtu = new_mtu;
257 return 0;
258}
259
260/*
261 * Fill in the fields of the device structure with ethernet-generic values.
262 */

--- 4 unchanged lines hidden (view full) ---

267 dev->rebuild_header = eth_rebuild_header;
268 dev->set_mac_address = eth_mac_addr;
269 dev->hard_header_cache = eth_header_cache;
270 dev->header_cache_update= eth_header_cache_update;
271 dev->hard_header_parse = eth_header_parse;
272
273 dev->type = ARPHRD_ETHER;
274 dev->hard_header_len = ETH_HLEN;
256 return -EINVAL;
257 dev->mtu = new_mtu;
258 return 0;
259}
260
261/*
262 * Fill in the fields of the device structure with ethernet-generic values.
263 */

--- 4 unchanged lines hidden (view full) ---

268 dev->rebuild_header = eth_rebuild_header;
269 dev->set_mac_address = eth_mac_addr;
270 dev->hard_header_cache = eth_header_cache;
271 dev->header_cache_update= eth_header_cache_update;
272 dev->hard_header_parse = eth_header_parse;
273
274 dev->type = ARPHRD_ETHER;
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->tx_queue_len = 1000; /* Ethernet wants good queues */
278 dev->flags = IFF_BROADCAST|IFF_MULTICAST;
279
280 memset(dev->broadcast,0xFF, ETH_ALEN);
281
282}
283EXPORT_SYMBOL(ether_setup);

--- 19 unchanged lines hidden ---
277 dev->addr_len = ETH_ALEN;
278 dev->tx_queue_len = 1000; /* Ethernet wants good queues */
279 dev->flags = IFF_BROADCAST|IFF_MULTICAST;
280
281 memset(dev->broadcast,0xFF, ETH_ALEN);
282
283}
284EXPORT_SYMBOL(ether_setup);

--- 19 unchanged lines hidden ---