MLK-11833 bcmdhd: pull back sdpcm_hdrlen length from old skb for new skb
authorDong Aisheng <aisheng.dong@freescale.com>
Thu, 5 Nov 2015 07:52:09 +0000 (15:52 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:39 +0000 (14:49 -0500)
Pull back sdpcm_hdrlen length from old skb as new skb here
is passed to postprocessing.
This is a generic fix. We must have it regardless of host is
non scatter-gather or scatter gather capable.

Suggested by: Vinayak Kamath <vinayak.kamath@broadcom.com>
Signed-off-by: Dong Aisheng <aisheng.dong@freescale.com>
(cherry picked from commit 45c96b8881eaa2b073b9dfa2a44229accd7409b7)
(cherry picked from commit b72fea1818e92d18affe88a90f6f2460eab74360)

drivers/net/wireless/bcmdhd/dhd_sdio.c

index c7f587c..7b99222 100644 (file)
@@ -1869,6 +1869,11 @@ static int dhdsdio_txpkt_preprocess(dhd_bus_t *bus, void *pkt, int chan, int txs
                PKTALIGN(osh, tmp_pkt, PKTLEN(osh, pkt), DHD_SDALIGN);
                bcopy(PKTDATA(osh, pkt), PKTDATA(osh, tmp_pkt), PKTLEN(osh, pkt));
                *new_pkt = tmp_pkt;
+                /*
+                * pull back sdpcm_hdrlen length from old skb as new skb here
+                * is passed to postprocessing
+                 */
+               PKTPULL(osh, pkt, sdpcm_hdrlen);
                pkt = tmp_pkt;
        }