Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Apr 2010 17:38:16 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r207001 - head/sys/dev/iwn
Message-ID:  <201004211738.o3LHcGtH021502@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Wed Apr 21 17:38:16 2010
New Revision: 207001
URL: http://svn.freebsd.org/changeset/base/207001

Log:
  Use correct bus_dma_tag_t for TX frames.
  
  Reported by:	Andreas Nilsson <andrnils at gmail.com>
  Approved by:	rpaulo (mentor)
  MFC after:	3 days

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Wed Apr 21 17:23:31 2010	(r207000)
+++ head/sys/dev/iwn/if_iwn.c	Wed Apr 21 17:38:16 2010	(r207001)
@@ -2282,6 +2282,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st
     struct iwn_rx_data *data)
 {
 	struct iwn4965_tx_stat *stat = (struct iwn4965_tx_stat *)(desc + 1);
+	struct iwn_tx_ring *ring = &sc->txq[desc->qid & 0xf];
 
 	DPRINTF(sc, IWN_DEBUG_XMIT, "%s: "
 	    "qid %d idx %d retries %d nkill %d rate %x duration %d status %x\n",
@@ -2289,7 +2290,7 @@ iwn4965_tx_done(struct iwn_softc *sc, st
 	    stat->btkillcnt, stat->rate, le16toh(stat->duration),
 	    le32toh(stat->status));
 
-	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
+	bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 	iwn_tx_done(sc, desc, stat->ackfailcnt, le32toh(stat->status) & 0xff);
 }
 
@@ -2298,6 +2299,7 @@ iwn5000_tx_done(struct iwn_softc *sc, st
     struct iwn_rx_data *data)
 {
 	struct iwn5000_tx_stat *stat = (struct iwn5000_tx_stat *)(desc + 1);
+	struct iwn_tx_ring *ring = &sc->txq[desc->qid & 0xf];
 
 	DPRINTF(sc, IWN_DEBUG_XMIT, "%s: "
 	    "qid %d idx %d retries %d nkill %d rate %x duration %d status %x\n",
@@ -2310,7 +2312,7 @@ iwn5000_tx_done(struct iwn_softc *sc, st
 	iwn5000_reset_sched(sc, desc->qid & 0xf, desc->idx);
 #endif
 
-	bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD);
+	bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD);
 	iwn_tx_done(sc, desc, stat->ackfailcnt, le16toh(stat->status) & 0xff);
 }
 



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