Merge branch 'e1000-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[pandora-kernel.git] / net / ipx / ipx_route.c
index bba3431..e16c114 100644 (file)
@@ -7,7 +7,6 @@
  *     See net/ipx/ChangeLog.
  */
 
-#include <linux/config.h>
 #include <linux/list.h>
 #include <linux/route.h>
 #include <linux/spinlock.h>
@@ -20,17 +19,17 @@ DEFINE_RWLOCK(ipx_routes_lock);
 
 extern struct ipx_interface *ipx_internal_net;
 
-extern __u16 ipx_cksum(struct ipxhdr *packet, int length);
-extern struct ipx_interface *ipxitf_find_using_net(__u32 net);
+extern __be16 ipx_cksum(struct ipxhdr *packet, int length);
+extern struct ipx_interface *ipxitf_find_using_net(__be32 net);
 extern int ipxitf_demux_socket(struct ipx_interface *intrfc,
                               struct sk_buff *skb, int copy);
 extern int ipxitf_demux_socket(struct ipx_interface *intrfc,
                               struct sk_buff *skb, int copy);
 extern int ipxitf_send(struct ipx_interface *intrfc, struct sk_buff *skb,
                       char *node);
-extern struct ipx_interface *ipxitf_find_using_net(__u32 net);
+extern struct ipx_interface *ipxitf_find_using_net(__be32 net);
 
-struct ipx_route *ipxrtr_lookup(__u32 net)
+struct ipx_route *ipxrtr_lookup(__be32 net)
 {
        struct ipx_route *r;
 
@@ -49,7 +48,7 @@ unlock:
 /*
  * Caller must hold a reference to intrfc
  */
-int ipxrtr_add_route(__u32 network, struct ipx_interface *intrfc,
+int ipxrtr_add_route(__be32 network, struct ipx_interface *intrfc,
                     unsigned char *node)
 {
        struct ipx_route *rt;
@@ -119,7 +118,7 @@ out:
        return rc;
 }
 
-static int ipxrtr_delete(__u32 net)
+static int ipxrtr_delete(__be32 net)
 {
        struct ipx_route *r, *tmp;
        int rc;
@@ -204,7 +203,9 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
        skb->sk = sk;
 
        /* Fill in IPX header */
-       skb->h.raw = skb->nh.raw = skb_put(skb, sizeof(struct ipxhdr));
+       skb_reset_network_header(skb);
+       skb_reset_transport_header(skb);
+       skb_put(skb, sizeof(struct ipxhdr));
        ipx = ipx_hdr(skb);
        ipx->ipx_pktsize = htons(len + sizeof(struct ipxhdr));
        IPX_SKB_CB(skb)->ipx_tctrl = 0;
@@ -235,15 +236,15 @@ int ipxrtr_route_packet(struct sock *sk, struct sockaddr_ipx *usipx,
        if (rc) {
                kfree_skb(skb);
                goto out_put;
-       }       
+       }
 
        /* Apply checksum. Not allowed on 802.3 links. */
        if (sk->sk_no_check || intrfc->if_dlink_type == htons(IPX_FRAME_8023))
-               ipx->ipx_checksum = 0xFFFF;
+               ipx->ipx_checksum = htons(0xFFFF);
        else
                ipx->ipx_checksum = ipx_cksum(ipx, len + sizeof(struct ipxhdr));
 
-       rc = ipxitf_send(intrfc, skb, (rt && rt->ir_routed) ? 
+       rc = ipxitf_send(intrfc, skb, (rt && rt->ir_routed) ?
                         rt->ir_router_node : ipx->ipx_dest.node);
 out_put:
        ipxitf_put(intrfc);