aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKris Katterjohn <kjak@users.sourceforge.net>2006-01-05 19:35:42 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-05 19:48:56 -0500
commit46f25dffbaba48c571d75f5f574f31978287b8d2 (patch)
tree080e8c4331faf36202bd92174e5e47d0a5d9aa47 /net
parente924283bf93989979f27ef4f1228c5925f584a0a (diff)
[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')
-rw-r--r--net/bridge/br_if.c5
-rw-r--r--net/ethernet/eth.c5
-rw-r--r--net/ipv4/ip_gre.c5
-rw-r--r--net/ipv4/ipip.c3
-rw-r--r--net/ipv4/ipmr.c3
-rw-r--r--net/ipv6/sit.c3
6 files changed, 15 insertions, 9 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 11321197338e..ba442883e877 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -20,6 +20,7 @@
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/rtnetlink.h> 22#include <linux/rtnetlink.h>
23#include <linux/if_ether.h>
23#include <net/sock.h> 24#include <net/sock.h>
24 25
25#include "br_private.h" 26#include "br_private.h"
@@ -323,7 +324,7 @@ int br_del_bridge(const char *name)
323 return ret; 324 return ret;
324} 325}
325 326
326/* Mtu of the bridge pseudo-device 1500 or the minimum of the ports */ 327/* MTU of the bridge pseudo-device: ETH_DATA_LEN or the minimum of the ports */
327int br_min_mtu(const struct net_bridge *br) 328int br_min_mtu(const struct net_bridge *br)
328{ 329{
329 const struct net_bridge_port *p; 330 const struct net_bridge_port *p;
@@ -332,7 +333,7 @@ int br_min_mtu(const struct net_bridge *br)
332 ASSERT_RTNL(); 333 ASSERT_RTNL();
333 334
334 if (list_empty(&br->port_list)) 335 if (list_empty(&br->port_list))
335 mtu = 1500; 336 mtu = ETH_DATA_LEN;
336 else { 337 else {
337 list_for_each_entry(p, &br->port_list, list) { 338 list_for_each_entry(p, &br->port_list, list) {
338 if (!mtu || p->dev->mtu < mtu) 339 if (!mtu || p->dev->mtu < mtu)
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
252static int eth_change_mtu(struct net_device *dev, int new_mtu) 253static 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;
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 46f9d9cf7a5f..912c42f57c79 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -28,6 +28,7 @@
28#include <linux/inetdevice.h> 28#include <linux/inetdevice.h>
29#include <linux/igmp.h> 29#include <linux/igmp.h>
30#include <linux/netfilter_ipv4.h> 30#include <linux/netfilter_ipv4.h>
31#include <linux/if_ether.h>
31 32
32#include <net/sock.h> 33#include <net/sock.h>
33#include <net/ip.h> 34#include <net/ip.h>
@@ -1140,7 +1141,7 @@ static void ipgre_tunnel_setup(struct net_device *dev)
1140 1141
1141 dev->type = ARPHRD_IPGRE; 1142 dev->type = ARPHRD_IPGRE;
1142 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr) + 4; 1143 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr) + 4;
1143 dev->mtu = 1500 - sizeof(struct iphdr) - 4; 1144 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 4;
1144 dev->flags = IFF_NOARP; 1145 dev->flags = IFF_NOARP;
1145 dev->iflink = 0; 1146 dev->iflink = 0;
1146 dev->addr_len = 4; 1147 dev->addr_len = 4;
@@ -1152,7 +1153,7 @@ static int ipgre_tunnel_init(struct net_device *dev)
1152 struct ip_tunnel *tunnel; 1153 struct ip_tunnel *tunnel;
1153 struct iphdr *iph; 1154 struct iphdr *iph;
1154 int hlen = LL_MAX_HEADER; 1155 int hlen = LL_MAX_HEADER;
1155 int mtu = 1500; 1156 int mtu = ETH_DATA_LEN;
1156 int addend = sizeof(struct iphdr) + 4; 1157 int addend = sizeof(struct iphdr) + 4;
1157 1158
1158 tunnel = (struct ip_tunnel*)dev->priv; 1159 tunnel = (struct ip_tunnel*)dev->priv;
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index c05c1df0bb04..35571cff81c6 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -108,6 +108,7 @@
108#include <linux/mroute.h> 108#include <linux/mroute.h>
109#include <linux/init.h> 109#include <linux/init.h>
110#include <linux/netfilter_ipv4.h> 110#include <linux/netfilter_ipv4.h>
111#include <linux/if_ether.h>
111 112
112#include <net/sock.h> 113#include <net/sock.h>
113#include <net/ip.h> 114#include <net/ip.h>
@@ -786,7 +787,7 @@ static void ipip_tunnel_setup(struct net_device *dev)
786 787
787 dev->type = ARPHRD_TUNNEL; 788 dev->type = ARPHRD_TUNNEL;
788 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); 789 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
789 dev->mtu = 1500 - sizeof(struct iphdr); 790 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr);
790 dev->flags = IFF_NOARP; 791 dev->flags = IFF_NOARP;
791 dev->iflink = 0; 792 dev->iflink = 0;
792 dev->addr_len = 4; 793 dev->addr_len = 4;
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index caa3b7d2e48a..9a5c0ce7ff35 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -49,6 +49,7 @@
49#include <linux/seq_file.h> 49#include <linux/seq_file.h>
50#include <linux/mroute.h> 50#include <linux/mroute.h>
51#include <linux/init.h> 51#include <linux/init.h>
52#include <linux/if_ether.h>
52#include <net/ip.h> 53#include <net/ip.h>
53#include <net/protocol.h> 54#include <net/protocol.h>
54#include <linux/skbuff.h> 55#include <linux/skbuff.h>
@@ -193,7 +194,7 @@ static struct net_device_stats *reg_vif_get_stats(struct net_device *dev)
193static void reg_vif_setup(struct net_device *dev) 194static void reg_vif_setup(struct net_device *dev)
194{ 195{
195 dev->type = ARPHRD_PIMREG; 196 dev->type = ARPHRD_PIMREG;
196 dev->mtu = 1500 - sizeof(struct iphdr) - 8; 197 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr) - 8;
197 dev->flags = IFF_NOARP; 198 dev->flags = IFF_NOARP;
198 dev->hard_start_xmit = reg_vif_xmit; 199 dev->hard_start_xmit = reg_vif_xmit;
199 dev->get_stats = reg_vif_get_stats; 200 dev->get_stats = reg_vif_get_stats;
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index c3123c9e1a8e..577d49732b0f 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -33,6 +33,7 @@
33#include <asm/uaccess.h> 33#include <asm/uaccess.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/netfilter_ipv4.h> 35#include <linux/netfilter_ipv4.h>
36#include <linux/if_ether.h>
36 37
37#include <net/sock.h> 38#include <net/sock.h>
38#include <net/snmp.h> 39#include <net/snmp.h>
@@ -720,7 +721,7 @@ static void ipip6_tunnel_setup(struct net_device *dev)
720 721
721 dev->type = ARPHRD_SIT; 722 dev->type = ARPHRD_SIT;
722 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr); 723 dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
723 dev->mtu = 1500 - sizeof(struct iphdr); 724 dev->mtu = ETH_DATA_LEN - sizeof(struct iphdr);
724 dev->flags = IFF_NOARP; 725 dev->flags = IFF_NOARP;
725 dev->iflink = 0; 726 dev->iflink = 0;
726 dev->addr_len = 4; 727 dev->addr_len = 4;