Add changes from the Linux-2.6 tree.
[linux-2.6.git] / net / 802 / hippi.c
index bb66e03..579e2dd 100644 (file)
@@ -7,7 +7,7 @@
  *
  * Version:    @(#)hippi.c     1.0.0   05/29/97
  *
- * Authors:    Ross Biro, <bir7@leland.Stanford.Edu>
+ * Authors:    Ross Biro
  *             Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *             Mark Evans, <evansmp@uhura.aston.ac.uk>
  *             Florian  La Roche, <rzsfl@rz.uni-sb.de>
 #include <net/arp.h>
 #include <net/sock.h>
 #include <asm/uaccess.h>
-#include <asm/checksum.h>
 #include <asm/system.h>
 
-/*
- * hippi_net_init()
- *
- * Do nothing, this is just to pursuade the stupid linker to behave.
- */
-
-void hippi_net_init(void)
-{
-       return;
-}
-
 /*
  * Create the HIPPI MAC header for an arbitrary protocol layer 
  *
@@ -57,11 +45,12 @@ void hippi_net_init(void)
  * daddr=NULL  means leave destination address (eg unresolved arp)
  */
 
-int hippi_header(struct sk_buff *skb, struct net_device *dev,
-                unsigned short type, void *daddr, void *saddr,
-                unsigned len)
+static int hippi_header(struct sk_buff *skb, struct net_device *dev,
+                       unsigned short type, void *daddr, void *saddr,
+                       unsigned len)
 {
        struct hippi_hdr *hip = (struct hippi_hdr *)skb_push(skb, HIPPI_HLEN);
+       struct hippi_cb *hcb = (struct hippi_cb *) skb->cb;
 
        if (!len){
                len = skb->len - HIPPI_HLEN;
@@ -95,9 +84,10 @@ int hippi_header(struct sk_buff *skb, struct net_device *dev,
        if (daddr)
        {
                memcpy(hip->le.dest_switch_addr, daddr + 3, 3);
-               memcpy(&skb->private.ifield, daddr + 2, 4);
+               memcpy(&hcb->ifield, daddr + 2, 4);
                return HIPPI_HLEN;
        }
+       hcb->ifield = 0;
        return -((int)HIPPI_HLEN);
 }
 
@@ -107,7 +97,7 @@ int hippi_header(struct sk_buff *skb, struct net_device *dev,
  * completed on this sk_buff. We now let ARP fill in the other fields.
  */
 
-int hippi_rebuild_header(struct sk_buff *skb)
+static int hippi_rebuild_header(struct sk_buff *skb)
 {
        struct hippi_hdr *hip = (struct hippi_hdr *)skb->data;
 
@@ -133,7 +123,7 @@ int hippi_rebuild_header(struct sk_buff *skb)
  *     Determine the packet's protocol ID.
  */
  
-unsigned short hippi_type_trans(struct sk_buff *skb, struct net_device *dev)
+__be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct hippi_hdr *hip;