]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/802/hippi.c
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / net / 802 / hippi.c
index 578f2a3d692d2019a22b56105cef81c56ab10c4f..e35dc1e0915d27ad3b99da056541689327a7a70c 100644 (file)
@@ -45,8 +45,8 @@
  */
 
 static int hippi_header(struct sk_buff *skb, struct net_device *dev,
-                       unsigned short type, void *daddr, void *saddr,
-                       unsigned len)
+                       unsigned short type,
+                       const void *daddr, const 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;
@@ -60,7 +60,7 @@ static int hippi_header(struct sk_buff *skb, struct net_device *dev,
         * Due to the stupidity of the little endian byte-order we
         * have to set the fp field this way.
         */
-       hip->fp.fixed           = __constant_htonl(0x04800018);
+       hip->fp.fixed           = htonl(0x04800018);
        hip->fp.d2_size         = htonl(len + 8);
        hip->le.fc              = 0;
        hip->le.double_wide     = 0;    /* only HIPPI 800 for the time being */
@@ -104,7 +104,7 @@ static int hippi_rebuild_header(struct sk_buff *skb)
         * Only IP is currently supported
         */
 
-       if(hip->snap.ethertype != __constant_htons(ETH_P_IP))
+       if(hip->snap.ethertype != htons(ETH_P_IP))
        {
                printk(KERN_DEBUG "%s: unable to resolve type %X addresses.\n",skb->dev->name,ntohs(hip->snap.ethertype));
                return 0;
@@ -126,14 +126,14 @@ __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev)
 {
        struct hippi_hdr *hip;
 
-       hip = (struct hippi_hdr *) skb->data;
-
        /*
         * This is actually wrong ... question is if we really should
         * set the raw address here.
         */
-        skb->mac.raw = skb->data;
-        skb_pull(skb, HIPPI_HLEN);
+       skb->dev = dev;
+       skb_reset_mac_header(skb);
+       hip = (struct hippi_hdr *)skb_mac_header(skb);
+       skb_pull(skb, HIPPI_HLEN);
 
        /*
         * No fancy promisc stuff here now.
@@ -182,16 +182,18 @@ static int hippi_neigh_setup_dev(struct net_device *dev, struct neigh_parms *p)
        return 0;
 }
 
+static const struct header_ops hippi_header_ops = {
+       .create         = hippi_header,
+       .rebuild        = hippi_rebuild_header,
+};
+
+
 static void hippi_setup(struct net_device *dev)
 {
        dev->set_multicast_list         = NULL;
        dev->change_mtu                 = hippi_change_mtu;
-       dev->hard_header                = hippi_header;
-       dev->rebuild_header             = hippi_rebuild_header;
+       dev->header_ops                 = &hippi_header_ops;
        dev->set_mac_address            = hippi_mac_addr;
-       dev->hard_header_parse          = NULL;
-       dev->hard_header_cache          = NULL;
-       dev->header_cache_update        = NULL;
        dev->neigh_setup                = hippi_neigh_setup_dev;
 
        /*