Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Oct 2012 22:58:12 +0000 (UTC)
From:      Tim Kientzle <kientzle@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241562 - head/sys/arm/ti/cpsw
Message-ID:  <201210142258.q9EMwCSS059331@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kientzle
Date: Sun Oct 14 22:58:12 2012
New Revision: 241562
URL: http://svn.freebsd.org/changeset/base/241562

Log:
  Return correct packet size.

Modified:
  head/sys/arm/ti/cpsw/if_cpsw.c

Modified: head/sys/arm/ti/cpsw/if_cpsw.c
==============================================================================
--- head/sys/arm/ti/cpsw/if_cpsw.c	Sun Oct 14 22:33:17 2012	(r241561)
+++ head/sys/arm/ti/cpsw/if_cpsw.c	Sun Oct 14 22:58:12 2012	(r241562)
@@ -804,9 +804,9 @@ cpsw_intr_rx_locked(void *arg)
 		bus_dmamap_sync(sc->mbuf_dtag, sc->rx_dmamap[i], BUS_DMASYNC_POSTREAD);
 
 		/* Fill mbuf */
-		sc->rx_mbuf[i]->m_hdr.mh_data +=2;
-		sc->rx_mbuf[i]->m_len = bd.pktlen-2;
-		sc->rx_mbuf[i]->m_pkthdr.len = bd.pktlen-2;
+		sc->rx_mbuf[i]->m_hdr.mh_data += bd.bufoff;
+		sc->rx_mbuf[i]->m_hdr.mh_len = bd.pktlen - 4;
+		sc->rx_mbuf[i]->m_pkthdr.len = bd.pktlen - 4;
 		sc->rx_mbuf[i]->m_flags |= M_PKTHDR;
 		sc->rx_mbuf[i]->m_pkthdr.rcvif = ifp;
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210142258.q9EMwCSS059331>