Author: bschmidt
Date: Sat Apr 16 09:39:08 2011
New Revision: 220694
URL: http://svn.freebsd.org/changeset/base/220694

Log:
  scratch_paddr has the same address pre-assigned, use that instead.

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

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c   Sat Apr 16 09:34:40 2011        (r220693)
+++ head/sys/dev/iwn/if_iwn.c   Sat Apr 16 09:39:08 2011        (r220694)
@@ -3145,7 +3145,6 @@ iwn_tx_data_raw(struct iwn_softc *sc, st
        struct iwn_tx_desc *desc;
        struct iwn_tx_data *data;
        struct mbuf *mnew;
-       bus_addr_t paddr;
        bus_dma_segment_t segs[IWN_MAX_SCATTER];
        uint32_t flags;
        u_int hdrlen;
@@ -3246,9 +3245,8 @@ iwn_tx_data_raw(struct iwn_softc *sc, st
        txant = IWN_LSB(sc->txchainmask);
        tx->rflags |= IWN_RFLAG_ANT(txant);
        /* Set physical address of "scratch area". */
-       paddr = ring->cmd_dma.paddr + ring->cur * sizeof (struct iwn_tx_cmd);
-       tx->loaddr = htole32(IWN_LOADDR(paddr));
-       tx->hiaddr = IWN_HIADDR(paddr);
+       tx->loaddr = htole32(IWN_LOADDR(data->scratch_paddr));
+       tx->hiaddr = IWN_HIADDR(data->scratch_paddr);
 
        /* Copy 802.11 header in TX command. */
        memcpy((uint8_t *)(tx + 1), wh, hdrlen);
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to