]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/ax25/ax25_ip.c
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[mv-sheeva.git] / net / ax25 / ax25_ip.c
index 8d62d86816150b9d814f1edc469f065c48a48b80..cf0c47a265304bc94cc391c7c92a10be16de14ed 100644 (file)
 #include <linux/in.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/sched.h>
 #include <linux/timer.h>
 #include <linux/string.h>
 #include <linux/sockios.h>
 #include <linux/net.h>
+#include <linux/slab.h>
 #include <net/ax25.h>
 #include <linux/inet.h>
 #include <linux/netdevice.h>
@@ -47,7 +47,9 @@
 
 #ifdef CONFIG_INET
 
-int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len)
+int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
+                    unsigned short type, const void *daddr,
+                    const void *saddr, unsigned len)
 {
        unsigned char *buff;
 
@@ -122,7 +124,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
                digipeat = route->digipeat;
                dev = route->dev;
                ip_mode = route->ip_mode;
-       };
+       }
 
        if (dev == NULL)
                dev = skb->dev;
@@ -172,7 +174,7 @@ int ax25_rebuild_header(struct sk_buff *skb)
                        src_c = *(ax25_address *)(bp + 8);
 
                        skb_pull(ourskb, AX25_HEADER_LEN - 1);  /* Keep PID */
-                       ourskb->nh.raw = ourskb->data;
+                       skb_reset_network_header(ourskb);
 
                        ax25=ax25_send_frame(
                            ourskb,
@@ -216,7 +218,9 @@ put:
 
 #else  /* INET */
 
-int ax25_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, void *daddr, void *saddr, unsigned len)
+int ax25_hard_header(struct sk_buff *skb, struct net_device *dev,
+                    unsigned short type, const void *daddr,
+                    const void *saddr, unsigned len)
 {
        return -AX25_HEADER_LEN;
 }
@@ -228,5 +232,12 @@ int ax25_rebuild_header(struct sk_buff *skb)
 
 #endif
 
+const struct header_ops ax25_header_ops = {
+       .create = ax25_hard_header,
+       .rebuild = ax25_rebuild_header,
+};
+
 EXPORT_SYMBOL(ax25_hard_header);
 EXPORT_SYMBOL(ax25_rebuild_header);
+EXPORT_SYMBOL(ax25_header_ops);
+