diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-02 01:11:09 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-02 16:43:41 -0500 |
commit | d476059e77d1af48453a58f9de1e36f2eaff6450 (patch) | |
tree | ac24382189ef5639d155b9f4872d937d50fb8cba /drivers/net/arcnet | |
parent | 945db424bfbcb7b72a92702a487dc0000cd1efed (diff) |
net: Kill dev_rebuild_header
Now that there are no more users kill dev_rebuild_header and all of it's
implementations.
This is long overdue.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/arcnet')
-rw-r--r-- | drivers/net/arcnet/arcnet.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c index 09de683c167e..10f71c732b59 100644 --- a/drivers/net/arcnet/arcnet.c +++ b/drivers/net/arcnet/arcnet.c | |||
@@ -104,7 +104,6 @@ EXPORT_SYMBOL(arcnet_timeout); | |||
104 | static int arcnet_header(struct sk_buff *skb, struct net_device *dev, | 104 | static int arcnet_header(struct sk_buff *skb, struct net_device *dev, |
105 | unsigned short type, const void *daddr, | 105 | unsigned short type, const void *daddr, |
106 | const void *saddr, unsigned len); | 106 | const void *saddr, unsigned len); |
107 | static int arcnet_rebuild_header(struct sk_buff *skb); | ||
108 | static int go_tx(struct net_device *dev); | 107 | static int go_tx(struct net_device *dev); |
109 | 108 | ||
110 | static int debug = ARCNET_DEBUG; | 109 | static int debug = ARCNET_DEBUG; |
@@ -312,7 +311,6 @@ static int choose_mtu(void) | |||
312 | 311 | ||
313 | static const struct header_ops arcnet_header_ops = { | 312 | static const struct header_ops arcnet_header_ops = { |
314 | .create = arcnet_header, | 313 | .create = arcnet_header, |
315 | .rebuild = arcnet_rebuild_header, | ||
316 | }; | 314 | }; |
317 | 315 | ||
318 | static const struct net_device_ops arcnet_netdev_ops = { | 316 | static const struct net_device_ops arcnet_netdev_ops = { |
@@ -538,59 +536,6 @@ static int arcnet_header(struct sk_buff *skb, struct net_device *dev, | |||
538 | return proto->build_header(skb, dev, type, _daddr); | 536 | return proto->build_header(skb, dev, type, _daddr); |
539 | } | 537 | } |
540 | 538 | ||
541 | |||
542 | /* | ||
543 | * Rebuild the ARCnet hard header. This is called after an ARP (or in the | ||
544 | * future other address resolution) has completed on this sk_buff. We now | ||
545 | * let ARP fill in the destination field. | ||
546 | */ | ||
547 | static int arcnet_rebuild_header(struct sk_buff *skb) | ||
548 | { | ||
549 | struct net_device *dev = skb->dev; | ||
550 | struct arcnet_local *lp = netdev_priv(dev); | ||
551 | int status = 0; /* default is failure */ | ||
552 | unsigned short type; | ||
553 | uint8_t daddr=0; | ||
554 | struct ArcProto *proto; | ||
555 | /* | ||
556 | * XXX: Why not use skb->mac_len? | ||
557 | */ | ||
558 | if (skb->network_header - skb->mac_header != 2) { | ||
559 | BUGMSG(D_NORMAL, | ||
560 | "rebuild_header: shouldn't be here! (hdrsize=%d)\n", | ||
561 | (int)(skb->network_header - skb->mac_header)); | ||
562 | return 0; | ||
563 | } | ||
564 | type = *(uint16_t *) skb_pull(skb, 2); | ||
565 | BUGMSG(D_DURING, "rebuild header for protocol %Xh\n", type); | ||
566 | |||
567 | if (type == ETH_P_IP) { | ||
568 | #ifdef CONFIG_INET | ||
569 | BUGMSG(D_DURING, "rebuild header for ethernet protocol %Xh\n", type); | ||
570 | status = arp_find(&daddr, skb) ? 1 : 0; | ||
571 | BUGMSG(D_DURING, " rebuilt: dest is %d; protocol %Xh\n", | ||
572 | daddr, type); | ||
573 | #endif | ||
574 | } else { | ||
575 | BUGMSG(D_NORMAL, | ||
576 | "I don't understand ethernet protocol %Xh addresses!\n", type); | ||
577 | dev->stats.tx_errors++; | ||
578 | dev->stats.tx_aborted_errors++; | ||
579 | } | ||
580 | |||
581 | /* if we couldn't resolve the address... give up. */ | ||
582 | if (!status) | ||
583 | return 0; | ||
584 | |||
585 | /* add the _real_ header this time! */ | ||
586 | proto = arc_proto_map[lp->default_proto[daddr]]; | ||
587 | proto->build_header(skb, dev, type, daddr); | ||
588 | |||
589 | return 1; /* success */ | ||
590 | } | ||
591 | |||
592 | |||
593 | |||
594 | /* Called by the kernel in order to transmit a packet. */ | 539 | /* Called by the kernel in order to transmit a packet. */ |
595 | netdev_tx_t arcnet_send_packet(struct sk_buff *skb, | 540 | netdev_tx_t arcnet_send_packet(struct sk_buff *skb, |
596 | struct net_device *dev) | 541 | struct net_device *dev) |