net: cpsw: avoid alignment faults by taking NET_IP_ALIGN into account
[linux-2.6-microblaze.git] / drivers / net / ethernet / ti / cpsw_new.c
index 279e261..bd4b152 100644 (file)
@@ -283,7 +283,7 @@ static void cpsw_rx_handler(void *token, int len, int status)
 {
        struct page *new_page, *page = token;
        void *pa = page_address(page);
-       int headroom = CPSW_HEADROOM;
+       int headroom = CPSW_HEADROOM_NA;
        struct cpsw_meta_xdp *xmeta;
        struct cpsw_common *cpsw;
        struct net_device *ndev;
@@ -336,7 +336,7 @@ static void cpsw_rx_handler(void *token, int len, int status)
        }
 
        if (priv->xdp_prog) {
-               int headroom = CPSW_HEADROOM, size = len;
+               int size = len;
 
                xdp_init_buff(&xdp, PAGE_SIZE, &priv->xdp_rxq[ch]);
                if (status & CPDMA_RX_VLAN_ENCAP) {
@@ -386,7 +386,7 @@ requeue:
        xmeta->ndev = ndev;
        xmeta->ch = ch;
 
-       dma = page_pool_get_dma_addr(new_page) + CPSW_HEADROOM;
+       dma = page_pool_get_dma_addr(new_page) + CPSW_HEADROOM_NA;
        ret = cpdma_chan_submit_mapped(cpsw->rxv[ch].ch, new_page, dma,
                                       pkt_size, 0);
        if (ret < 0) {