summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2012-05-10 17:14:35 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-05-15 20:14:35 -0400
commit211ed865108e24697b44bee5daac502ee6bdd4a4 (patch)
tree2a902c914f96298f265ef52cba5e463c5c8dea32 /net
parent60eea6cf2964beea6c38d9050bc3823a93db97e0 (diff)
net: delete all instances of special processing for token ring
We are going to delete the Token ring support. This removes any special processing in the core networking for token ring, (aside from net/tr.c itself), leaving the drivers and remaining tokenring support present but inert. The mass removal of the drivers and net/tr.c will be in a separate commit, so that the history of these files that we still care about won't have the giant deletion tied into their history. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/802/p8022.c3
-rw-r--r--net/802/tr.c1
-rw-r--r--net/core/dev.c14
-rw-r--r--net/ipv4/Kconfig4
-rw-r--r--net/ipv4/arp.c13
-rw-r--r--net/ipv4/ipconfig.c2
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/ndisc.c17
-rw-r--r--net/ipx/af_ipx.c10
-rw-r--r--net/llc/af_llc.c3
-rw-r--r--net/llc/llc_output.c3
-rw-r--r--net/llc/llc_sap.c4
-rw-r--r--net/sysctl_net.c4
13 files changed, 12 insertions, 68 deletions
diff --git a/net/802/p8022.c b/net/802/p8022.c
index 7f353c4f437a..0bda8de7df51 100644
--- a/net/802/p8022.c
+++ b/net/802/p8022.c
@@ -1,6 +1,5 @@
1/* 1/*
2 * NET3: Support for 802.2 demultiplexing off Ethernet (Token ring 2 * NET3: Support for 802.2 demultiplexing off Ethernet
3 * is kept separate see p8022tr.c)
4 * This program is free software; you can redistribute it and/or 3 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 4 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 5 * as published by the Free Software Foundation; either version
diff --git a/net/802/tr.c b/net/802/tr.c
index 30a352ed09b1..175243b0d6d8 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -604,7 +604,6 @@ static void tr_setup(struct net_device *dev)
604 604
605 dev->header_ops = &tr_header_ops; 605 dev->header_ops = &tr_header_ops;
606 606
607 dev->type = ARPHRD_IEEE802_TR;
608 dev->hard_header_len = TR_HLEN; 607 dev->hard_header_len = TR_HLEN;
609 dev->mtu = 2000; 608 dev->mtu = 2000;
610 dev->addr_len = TR_ALEN; 609 dev->addr_len = TR_ALEN;
diff --git a/net/core/dev.c b/net/core/dev.c
index 3dd853998d38..66cae6e975d9 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -300,10 +300,9 @@ static const unsigned short netdev_lock_type[] =
300 ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE, 300 ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE,
301 ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET, 301 ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET,
302 ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL, 302 ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL,
303 ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211, 303 ARPHRD_FCFABRIC, ARPHRD_IEEE80211, ARPHRD_IEEE80211_PRISM,
304 ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET, 304 ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET, ARPHRD_PHONET_PIPE,
305 ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154, 305 ARPHRD_IEEE802154, ARPHRD_VOID, ARPHRD_NONE};
306 ARPHRD_VOID, ARPHRD_NONE};
307 306
308static const char *const netdev_lock_name[] = 307static const char *const netdev_lock_name[] =
309 {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25", 308 {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
@@ -318,10 +317,9 @@ static const char *const netdev_lock_name[] =
318 "_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE", 317 "_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE",
319 "_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET", 318 "_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET",
320 "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL", 319 "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL",
321 "_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211", 320 "_xmit_FCFABRIC", "_xmit_IEEE80211", "_xmit_IEEE80211_PRISM",
322 "_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET", 321 "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET", "_xmit_PHONET_PIPE",
323 "_xmit_PHONET_PIPE", "_xmit_IEEE802154", 322 "_xmit_IEEE802154", "_xmit_VOID", "_xmit_NONE"};
324 "_xmit_VOID", "_xmit_NONE"};
325 323
326static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)]; 324static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)];
327static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)]; 325static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)];
diff --git a/net/ipv4/Kconfig b/net/ipv4/Kconfig
index 2c8febd3ebda..20f1cb5c8aba 100644
--- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig
@@ -262,8 +262,8 @@ config ARPD
262 bool "IP: ARP daemon support" 262 bool "IP: ARP daemon support"
263 ---help--- 263 ---help---
264 The kernel maintains an internal cache which maps IP addresses to 264 The kernel maintains an internal cache which maps IP addresses to
265 hardware addresses on the local network, so that Ethernet/Token Ring/ 265 hardware addresses on the local network, so that Ethernet
266 etc. frames are sent to the proper address on the physical networking 266 frames are sent to the proper address on the physical networking
267 layer. Normally, kernel uses the ARP protocol to resolve these 267 layer. Normally, kernel uses the ARP protocol to resolve these
268 mappings. 268 mappings.
269 269
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 373b56bf8f49..5097571cc4b0 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -89,7 +89,6 @@
89#include <linux/etherdevice.h> 89#include <linux/etherdevice.h>
90#include <linux/fddidevice.h> 90#include <linux/fddidevice.h>
91#include <linux/if_arp.h> 91#include <linux/if_arp.h>
92#include <linux/trdevice.h>
93#include <linux/skbuff.h> 92#include <linux/skbuff.h>
94#include <linux/proc_fs.h> 93#include <linux/proc_fs.h>
95#include <linux/seq_file.h> 94#include <linux/seq_file.h>
@@ -193,9 +192,6 @@ int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
193 case ARPHRD_IEEE802: 192 case ARPHRD_IEEE802:
194 ip_eth_mc_map(addr, haddr); 193 ip_eth_mc_map(addr, haddr);
195 return 0; 194 return 0;
196 case ARPHRD_IEEE802_TR:
197 ip_tr_mc_map(addr, haddr);
198 return 0;
199 case ARPHRD_INFINIBAND: 195 case ARPHRD_INFINIBAND:
200 ip_ib_mc_map(addr, dev->broadcast, haddr); 196 ip_ib_mc_map(addr, dev->broadcast, haddr);
201 return 0; 197 return 0;
@@ -648,12 +644,6 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
648 arp->ar_pro = htons(ETH_P_IP); 644 arp->ar_pro = htons(ETH_P_IP);
649 break; 645 break;
650#endif 646#endif
651#if IS_ENABLED(CONFIG_TR)
652 case ARPHRD_IEEE802_TR:
653 arp->ar_hrd = htons(ARPHRD_IEEE802);
654 arp->ar_pro = htons(ETH_P_IP);
655 break;
656#endif
657 } 647 }
658 648
659 arp->ar_hln = dev->addr_len; 649 arp->ar_hln = dev->addr_len;
@@ -751,11 +741,10 @@ static int arp_process(struct sk_buff *skb)
751 goto out; 741 goto out;
752 break; 742 break;
753 case ARPHRD_ETHER: 743 case ARPHRD_ETHER:
754 case ARPHRD_IEEE802_TR:
755 case ARPHRD_FDDI: 744 case ARPHRD_FDDI:
756 case ARPHRD_IEEE802: 745 case ARPHRD_IEEE802:
757 /* 746 /*
758 * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802 747 * ETHERNET, and Fibre Channel (which are IEEE 802
759 * devices, according to RFC 2625) devices will accept ARP 748 * devices, according to RFC 2625) devices will accept ARP
760 * hardware types of either 1 (Ethernet) or 6 (IEEE 802.2). 749 * hardware types of either 1 (Ethernet) or 6 (IEEE 802.2).
761 * This is the case also of FDDI, where the RFC 1390 says that 750 * This is the case also of FDDI, where the RFC 1390 says that
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c
index 24a3df9890e1..430015010e57 100644
--- a/net/ipv4/ipconfig.c
+++ b/net/ipv4/ipconfig.c
@@ -808,8 +808,6 @@ static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_d
808 b->op = BOOTP_REQUEST; 808 b->op = BOOTP_REQUEST;
809 if (dev->type < 256) /* check for false types */ 809 if (dev->type < 256) /* check for false types */
810 b->htype = dev->type; 810 b->htype = dev->type;
811 else if (dev->type == ARPHRD_IEEE802_TR) /* fix for token ring */
812 b->htype = ARPHRD_IEEE802;
813 else if (dev->type == ARPHRD_FDDI) 811 else if (dev->type == ARPHRD_FDDI)
814 b->htype = ARPHRD_ETHER; 812 b->htype = ARPHRD_ETHER;
815 else { 813 else {
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4d1d51a0bd26..f6b5b8ac3cf2 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1575,7 +1575,6 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev)
1575 switch (dev->type) { 1575 switch (dev->type) {
1576 case ARPHRD_ETHER: 1576 case ARPHRD_ETHER:
1577 case ARPHRD_FDDI: 1577 case ARPHRD_FDDI:
1578 case ARPHRD_IEEE802_TR:
1579 return addrconf_ifid_eui48(eui, dev); 1578 return addrconf_ifid_eui48(eui, dev);
1580 case ARPHRD_ARCNET: 1579 case ARPHRD_ARCNET:
1581 return addrconf_ifid_arcnet(eui, dev); 1580 return addrconf_ifid_arcnet(eui, dev);
@@ -2444,7 +2443,6 @@ static void addrconf_dev_config(struct net_device *dev)
2444 2443
2445 if ((dev->type != ARPHRD_ETHER) && 2444 if ((dev->type != ARPHRD_ETHER) &&
2446 (dev->type != ARPHRD_FDDI) && 2445 (dev->type != ARPHRD_FDDI) &&
2447 (dev->type != ARPHRD_IEEE802_TR) &&
2448 (dev->type != ARPHRD_ARCNET) && 2446 (dev->type != ARPHRD_ARCNET) &&
2449 (dev->type != ARPHRD_INFINIBAND) && 2447 (dev->type != ARPHRD_INFINIBAND) &&
2450 (dev->type != ARPHRD_IEEE802154)) { 2448 (dev->type != ARPHRD_IEEE802154)) {
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 35615c6358b8..56963f15bdc5 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -327,9 +327,6 @@ int ndisc_mc_map(const struct in6_addr *addr, char *buf, struct net_device *dev,
327 case ARPHRD_FDDI: 327 case ARPHRD_FDDI:
328 ipv6_eth_mc_map(addr, buf); 328 ipv6_eth_mc_map(addr, buf);
329 return 0; 329 return 0;
330 case ARPHRD_IEEE802_TR:
331 ipv6_tr_mc_map(addr,buf);
332 return 0;
333 case ARPHRD_ARCNET: 330 case ARPHRD_ARCNET:
334 ipv6_arcnet_mc_map(addr, buf); 331 ipv6_arcnet_mc_map(addr, buf);
335 return 0; 332 return 0;
@@ -795,20 +792,6 @@ static void ndisc_recv_ns(struct sk_buff *skb)
795 792
796 if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) { 793 if (ifp->flags & (IFA_F_TENTATIVE|IFA_F_OPTIMISTIC)) {
797 if (dad) { 794 if (dad) {
798 if (dev->type == ARPHRD_IEEE802_TR) {
799 const unsigned char *sadr;
800 sadr = skb_mac_header(skb);
801 if (((sadr[8] ^ dev->dev_addr[0]) & 0x7f) == 0 &&
802 sadr[9] == dev->dev_addr[1] &&
803 sadr[10] == dev->dev_addr[2] &&
804 sadr[11] == dev->dev_addr[3] &&
805 sadr[12] == dev->dev_addr[4] &&
806 sadr[13] == dev->dev_addr[5]) {
807 /* looped-back to us */
808 goto out;
809 }
810 }
811
812 /* 795 /*
813 * We are colliding with another node 796 * We are colliding with another node
814 * who is doing DAD 797 * who is doing DAD
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 9680226640ef..824d4a3338ae 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -983,10 +983,6 @@ static int ipxitf_create(struct ipx_interface_definition *idef)
983 goto out; 983 goto out;
984 984
985 switch (idef->ipx_dlink_type) { 985 switch (idef->ipx_dlink_type) {
986 case IPX_FRAME_TR_8022:
987 printk(KERN_WARNING "IPX frame type 802.2TR is "
988 "obsolete Use 802.2 instead.\n");
989 /* fall through */
990 case IPX_FRAME_8022: 986 case IPX_FRAME_8022:
991 dlink_type = htons(ETH_P_802_2); 987 dlink_type = htons(ETH_P_802_2);
992 datalink = p8022_datalink; 988 datalink = p8022_datalink;
@@ -996,10 +992,7 @@ static int ipxitf_create(struct ipx_interface_definition *idef)
996 dlink_type = htons(ETH_P_IPX); 992 dlink_type = htons(ETH_P_IPX);
997 datalink = pEII_datalink; 993 datalink = pEII_datalink;
998 break; 994 break;
999 } else 995 }
1000 printk(KERN_WARNING "IPX frame type EtherII over "
1001 "token-ring is obsolete. Use SNAP "
1002 "instead.\n");
1003 /* fall through */ 996 /* fall through */
1004 case IPX_FRAME_SNAP: 997 case IPX_FRAME_SNAP:
1005 dlink_type = htons(ETH_P_SNAP); 998 dlink_type = htons(ETH_P_SNAP);
@@ -1275,7 +1268,6 @@ const char *ipx_frame_name(__be16 frame)
1275 case ETH_P_802_2: rc = "802.2"; break; 1268 case ETH_P_802_2: rc = "802.2"; break;
1276 case ETH_P_SNAP: rc = "SNAP"; break; 1269 case ETH_P_SNAP: rc = "SNAP"; break;
1277 case ETH_P_802_3: rc = "802.3"; break; 1270 case ETH_P_802_3: rc = "802.3"; break;
1278 case ETH_P_TR_802_2: rc = "802.2TR"; break;
1279 } 1271 }
1280 1272
1281 return rc; 1273 return rc;
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 78424f41cf36..e9440753e16b 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -71,8 +71,7 @@ static inline u16 llc_ui_next_link_no(int sap)
71 */ 71 */
72static inline __be16 llc_proto_type(u16 arphrd) 72static inline __be16 llc_proto_type(u16 arphrd)
73{ 73{
74 return arphrd == ARPHRD_IEEE802_TR ? 74 return htons(ETH_P_802_2);
75 htons(ETH_P_TR_802_2) : htons(ETH_P_802_2);
76} 75}
77 76
78/** 77/**
diff --git a/net/llc/llc_output.c b/net/llc/llc_output.c
index b658cba89fdd..2dae8a5df23f 100644
--- a/net/llc/llc_output.c
+++ b/net/llc/llc_output.c
@@ -14,9 +14,7 @@
14 */ 14 */
15 15
16#include <linux/if_arp.h> 16#include <linux/if_arp.h>
17#include <linux/if_tr.h>
18#include <linux/netdevice.h> 17#include <linux/netdevice.h>
19#include <linux/trdevice.h>
20#include <linux/skbuff.h> 18#include <linux/skbuff.h>
21#include <linux/export.h> 19#include <linux/export.h>
22#include <net/llc.h> 20#include <net/llc.h>
@@ -37,7 +35,6 @@ int llc_mac_hdr_init(struct sk_buff *skb,
37 int rc = -EINVAL; 35 int rc = -EINVAL;
38 36
39 switch (skb->dev->type) { 37 switch (skb->dev->type) {
40 case ARPHRD_IEEE802_TR:
41 case ARPHRD_ETHER: 38 case ARPHRD_ETHER:
42 case ARPHRD_LOOPBACK: 39 case ARPHRD_LOOPBACK:
43 rc = dev_hard_header(skb, skb->dev, ETH_P_802_2, da, sa, 40 rc = dev_hard_header(skb, skb->dev, ETH_P_802_2, da, sa,
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c
index 94e7fca75b85..7c5073badc73 100644
--- a/net/llc/llc_sap.c
+++ b/net/llc/llc_sap.c
@@ -31,10 +31,6 @@ static int llc_mac_header_len(unsigned short devtype)
31 case ARPHRD_ETHER: 31 case ARPHRD_ETHER:
32 case ARPHRD_LOOPBACK: 32 case ARPHRD_LOOPBACK:
33 return sizeof(struct ethhdr); 33 return sizeof(struct ethhdr);
34#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
35 case ARPHRD_IEEE802_TR:
36 return sizeof(struct trh_hdr);
37#endif
38 } 34 }
39 return 0; 35 return 0;
40} 36}
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index f3e813a8d107..e3a6e37cd1c5 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -26,10 +26,6 @@
26#include <linux/if_ether.h> 26#include <linux/if_ether.h>
27#endif 27#endif
28 28
29#ifdef CONFIG_TR
30#include <linux/if_tr.h>
31#endif
32
33static struct ctl_table_set * 29static struct ctl_table_set *
34net_ctl_header_lookup(struct ctl_table_root *root, struct nsproxy *namespaces) 30net_ctl_header_lookup(struct ctl_table_root *root, struct nsproxy *namespaces)
35{ 31{