]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/core/dev.c
[NET]: Memory barrier cleanups
[mv-sheeva.git] / net / core / dev.c
index 5bf13b132dd726edd7cf73cb69334c152607e3a7..59d058a3b50487ea6c7c9dfcec8b541422ae3c45 100644 (file)
@@ -1169,7 +1169,7 @@ EXPORT_SYMBOL(netif_device_attach);
  */
 int skb_checksum_help(struct sk_buff *skb)
 {
-       unsigned int csum;
+       __wsum csum;
        int ret = 0, offset = skb->h.raw - skb->data;
 
        if (skb->ip_summed == CHECKSUM_COMPLETE)
@@ -1191,9 +1191,9 @@ int skb_checksum_help(struct sk_buff *skb)
 
        offset = skb->tail - skb->h.raw;
        BUG_ON(offset <= 0);
-       BUG_ON(skb->csum + 2 > offset);
+       BUG_ON(skb->csum_offset + 2 > offset);
 
-       *(u16*)(skb->h.raw + skb->csum) = csum_fold(csum);
+       *(__sum16*)(skb->h.raw + skb->csum_offset) = csum_fold(csum);
 
 out_set_summed:
        skb->ip_summed = CHECKSUM_NONE;
@@ -1215,7 +1215,7 @@ struct sk_buff *skb_gso_segment(struct sk_buff *skb, int features)
 {
        struct sk_buff *segs = ERR_PTR(-EPROTONOSUPPORT);
        struct packet_type *ptype;
-       int type = skb->protocol;
+       __be16 type = skb->protocol;
        int err;
 
        BUG_ON(skb_shinfo(skb)->frag_list);
@@ -1766,7 +1766,7 @@ int netif_receive_skb(struct sk_buff *skb)
        struct packet_type *ptype, *pt_prev;
        struct net_device *orig_dev;
        int ret = NET_RX_DROP;
-       unsigned short type;
+       __be16 type;
 
        /* if we've gotten here through NAPI, check netpoll */
        if (skb->dev->poll && netpoll_rx(skb))