Skip to content

Commit 211ed86

Browse files
author
Paul Gortmaker
committed
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>
1 parent 60eea6c commit 211ed86

File tree

18 files changed

+14
-148
lines changed

18 files changed

+14
-148
lines changed

include/linux/if_arp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
#define ARPHRD_FCPL 786 /* Fibrechannel public loop */
8383
#define ARPHRD_FCFABRIC 787 /* Fibrechannel fabric */
8484
/* 787->799 reserved for fibrechannel media types */
85-
#define ARPHRD_IEEE802_TR 800 /* Magic type ident for TR */
85+
/* 800 used to be used for token ring */
8686
#define ARPHRD_IEEE80211 801 /* IEEE 802.11 */
8787
#define ARPHRD_IEEE80211_PRISM 802 /* IEEE 802.11 + Prism2 header */
8888
#define ARPHRD_IEEE80211_RADIOTAP 803 /* IEEE 802.11 + radiotap header */

include/linux/ipx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct ipx_interface_definition {
3838
#define IPX_FRAME_8022 2
3939
#define IPX_FRAME_ETHERII 3
4040
#define IPX_FRAME_8023 4
41-
#define IPX_FRAME_TR_8022 5 /* obsolete */
41+
/* obsolete token ring was 5 */
4242
unsigned char ipx_special;
4343
#define IPX_SPECIAL_NONE 0
4444
#define IPX_PRIMARY 1

include/net/if_inet6.h

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -209,60 +209,6 @@ static inline void ipv6_eth_mc_map(const struct in6_addr *addr, char *buf)
209209
memcpy(buf + 2, &addr->s6_addr32[3], sizeof(__u32));
210210
}
211211

212-
static inline void ipv6_tr_mc_map(const struct in6_addr *addr, char *buf)
213-
{
214-
/* All nodes FF01::1, FF02::1, FF02::1:FFxx:xxxx */
215-
216-
if (((addr->s6_addr[0] == 0xFF) &&
217-
((addr->s6_addr[1] == 0x01) || (addr->s6_addr[1] == 0x02)) &&
218-
(addr->s6_addr16[1] == 0) &&
219-
(addr->s6_addr32[1] == 0) &&
220-
(addr->s6_addr32[2] == 0) &&
221-
(addr->s6_addr16[6] == 0) &&
222-
(addr->s6_addr[15] == 1)) ||
223-
((addr->s6_addr[0] == 0xFF) &&
224-
(addr->s6_addr[1] == 0x02) &&
225-
(addr->s6_addr16[1] == 0) &&
226-
(addr->s6_addr32[1] == 0) &&
227-
(addr->s6_addr16[4] == 0) &&
228-
(addr->s6_addr[10] == 0) &&
229-
(addr->s6_addr[11] == 1) &&
230-
(addr->s6_addr[12] == 0xff)))
231-
{
232-
buf[0]=0xC0;
233-
buf[1]=0x00;
234-
buf[2]=0x01;
235-
buf[3]=0x00;
236-
buf[4]=0x00;
237-
buf[5]=0x00;
238-
/* All routers FF0x::2 */
239-
} else if ((addr->s6_addr[0] ==0xff) &&
240-
((addr->s6_addr[1] & 0xF0) == 0) &&
241-
(addr->s6_addr16[1] == 0) &&
242-
(addr->s6_addr32[1] == 0) &&
243-
(addr->s6_addr32[2] == 0) &&
244-
(addr->s6_addr16[6] == 0) &&
245-
(addr->s6_addr[15] == 2))
246-
{
247-
buf[0]=0xC0;
248-
buf[1]=0x00;
249-
buf[2]=0x02;
250-
buf[3]=0x00;
251-
buf[4]=0x00;
252-
buf[5]=0x00;
253-
} else {
254-
unsigned char i ;
255-
256-
i = addr->s6_addr[15] & 7 ;
257-
buf[0]=0xC0;
258-
buf[1]=0x00;
259-
buf[2]=0x00;
260-
buf[3]=0x01 << i ;
261-
buf[4]=0x00;
262-
buf[5]=0x00;
263-
}
264-
}
265-
266212
static inline void ipv6_arcnet_mc_map(const struct in6_addr *addr, char *buf)
267213
{
268214
buf[0] = 0x00;

include/net/ip.h

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,23 +141,6 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4)
141141
extern int ip4_datagram_connect(struct sock *sk,
142142
struct sockaddr *uaddr, int addr_len);
143143

144-
/*
145-
* Map a multicast IP onto multicast MAC for type Token Ring.
146-
* This conforms to RFC1469 Option 2 Multicasting i.e.
147-
* using a functional address to transmit / receive
148-
* multicast packets.
149-
*/
150-
151-
static inline void ip_tr_mc_map(__be32 addr, char *buf)
152-
{
153-
buf[0]=0xC0;
154-
buf[1]=0x00;
155-
buf[2]=0x00;
156-
buf[3]=0x04;
157-
buf[4]=0x00;
158-
buf[5]=0x00;
159-
}
160-
161144
struct ip_reply_arg {
162145
struct kvec iov[1];
163146
int flags;

include/net/llc_pdu.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
*/
1414

1515
#include <linux/if_ether.h>
16-
#include <linux/if_tr.h>
1716

1817
/* Lengths of frame formats */
1918
#define LLC_PDU_LEN_I 4 /* header and 2 control bytes */
@@ -253,10 +252,6 @@ static inline void llc_pdu_decode_sa(struct sk_buff *skb, u8 *sa)
253252
{
254253
if (skb->protocol == htons(ETH_P_802_2))
255254
memcpy(sa, eth_hdr(skb)->h_source, ETH_ALEN);
256-
else if (skb->protocol == htons(ETH_P_TR_802_2)) {
257-
memcpy(sa, tr_hdr(skb)->saddr, ETH_ALEN);
258-
*sa &= 0x7F;
259-
}
260255
}
261256

262257
/**
@@ -270,8 +265,6 @@ static inline void llc_pdu_decode_da(struct sk_buff *skb, u8 *da)
270265
{
271266
if (skb->protocol == htons(ETH_P_802_2))
272267
memcpy(da, eth_hdr(skb)->h_dest, ETH_ALEN);
273-
else if (skb->protocol == htons(ETH_P_TR_802_2))
274-
memcpy(da, tr_hdr(skb)->daddr, ETH_ALEN);
275268
}
276269

277270
/**

net/802/p8022.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
2-
* NET3: Support for 802.2 demultiplexing off Ethernet (Token ring
3-
* is kept separate see p8022tr.c)
2+
* NET3: Support for 802.2 demultiplexing off Ethernet
43
* This program is free software; you can redistribute it and/or
54
* modify it under the terms of the GNU General Public License
65
* as published by the Free Software Foundation; either version

net/802/tr.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,6 @@ static void tr_setup(struct net_device *dev)
604604

605605
dev->header_ops = &tr_header_ops;
606606

607-
dev->type = ARPHRD_IEEE802_TR;
608607
dev->hard_header_len = TR_HLEN;
609608
dev->mtu = 2000;
610609
dev->addr_len = TR_ALEN;

net/core/dev.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,9 @@ static const unsigned short netdev_lock_type[] =
300300
ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE,
301301
ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET,
302302
ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL,
303-
ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211,
304-
ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET,
305-
ARPHRD_PHONET_PIPE, ARPHRD_IEEE802154,
306-
ARPHRD_VOID, ARPHRD_NONE};
303+
ARPHRD_FCFABRIC, ARPHRD_IEEE80211, ARPHRD_IEEE80211_PRISM,
304+
ARPHRD_IEEE80211_RADIOTAP, ARPHRD_PHONET, ARPHRD_PHONET_PIPE,
305+
ARPHRD_IEEE802154, ARPHRD_VOID, ARPHRD_NONE};
307306

308307
static const char *const netdev_lock_name[] =
309308
{"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25",
@@ -318,10 +317,9 @@ static const char *const netdev_lock_name[] =
318317
"_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE",
319318
"_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET",
320319
"_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL",
321-
"_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211",
322-
"_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET",
323-
"_xmit_PHONET_PIPE", "_xmit_IEEE802154",
324-
"_xmit_VOID", "_xmit_NONE"};
320+
"_xmit_FCFABRIC", "_xmit_IEEE80211", "_xmit_IEEE80211_PRISM",
321+
"_xmit_IEEE80211_RADIOTAP", "_xmit_PHONET", "_xmit_PHONET_PIPE",
322+
"_xmit_IEEE802154", "_xmit_VOID", "_xmit_NONE"};
325323

326324
static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)];
327325
static struct lock_class_key netdev_addr_lock_key[ARRAY_SIZE(netdev_lock_type)];

net/ipv4/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ config ARPD
262262
bool "IP: ARP daemon support"
263263
---help---
264264
The kernel maintains an internal cache which maps IP addresses to
265-
hardware addresses on the local network, so that Ethernet/Token Ring/
266-
etc. frames are sent to the proper address on the physical networking
265+
hardware addresses on the local network, so that Ethernet
266+
frames are sent to the proper address on the physical networking
267267
layer. Normally, kernel uses the ARP protocol to resolve these
268268
mappings.
269269

net/ipv4/arp.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
#include <linux/etherdevice.h>
9090
#include <linux/fddidevice.h>
9191
#include <linux/if_arp.h>
92-
#include <linux/trdevice.h>
9392
#include <linux/skbuff.h>
9493
#include <linux/proc_fs.h>
9594
#include <linux/seq_file.h>
@@ -193,9 +192,6 @@ int arp_mc_map(__be32 addr, u8 *haddr, struct net_device *dev, int dir)
193192
case ARPHRD_IEEE802:
194193
ip_eth_mc_map(addr, haddr);
195194
return 0;
196-
case ARPHRD_IEEE802_TR:
197-
ip_tr_mc_map(addr, haddr);
198-
return 0;
199195
case ARPHRD_INFINIBAND:
200196
ip_ib_mc_map(addr, dev->broadcast, haddr);
201197
return 0;
@@ -647,12 +643,6 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
647643
arp->ar_hrd = htons(ARPHRD_ETHER);
648644
arp->ar_pro = htons(ETH_P_IP);
649645
break;
650-
#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;
656646
#endif
657647
}
658648

@@ -751,11 +741,10 @@ static int arp_process(struct sk_buff *skb)
751741
goto out;
752742
break;
753743
case ARPHRD_ETHER:
754-
case ARPHRD_IEEE802_TR:
755744
case ARPHRD_FDDI:
756745
case ARPHRD_IEEE802:
757746
/*
758-
* ETHERNET, Token Ring and Fibre Channel (which are IEEE 802
747+
* ETHERNET, and Fibre Channel (which are IEEE 802
759748
* devices, according to RFC 2625) devices will accept ARP
760749
* hardware types of either 1 (Ethernet) or 6 (IEEE 802.2).
761750
* This is the case also of FDDI, where the RFC 1390 says that

0 commit comments

Comments
 (0)