]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/infiniband/ulp/ipoib/ipoib_cm.c
[SK_BUFF]: Introduce skb_reset_mac_header(skb)
[net-next-2.6.git] / drivers / infiniband / ulp / ipoib / ipoib_cm.c
index e70492db74f636eadd46a52bbc951a33e85e09bc..c722e5c141b3be697e69557ed6e7047d8404c409 100644 (file)
@@ -131,7 +131,7 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, int id, int
                skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE);
 
                mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page,
-                                                0, PAGE_SIZE, DMA_TO_DEVICE);
+                                                0, PAGE_SIZE, DMA_FROM_DEVICE);
                if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1])))
                        goto partial_error;
        }
@@ -408,7 +408,7 @@ void ipoib_cm_handle_rx_wc(struct net_device *dev, struct ib_wc *wc)
        skb_put_frags(skb, IPOIB_CM_HEAD_SIZE, wc->byte_len, newskb);
 
        skb->protocol = ((struct ipoib_header *) skb->data)->proto;
-       skb->mac.raw = skb->data;
+       skb_reset_mac_header(skb);
        skb_pull(skb, IPOIB_ENCAP_LEN);
 
        dev->last_rx = jiffies;