FreeBSD/sys/dev/iwn/if_iwn.c
/*
 * Process a TX_DONE firmware notification.  Unfortunately, the 4965AGN
 * and 5000 adapters have different incompatible TX status formats.
 */
Process a TX_DONE firmware notification.  Unfortunately, the 4965AGN
and 5000 adapters have different incompatible TX status formats.
Process a TX_DONE firmware notification . Unfortunately the 4965AGN and 5000 adapters have different incompatible TX status formats .
static void
iwn4965_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
    struct iwn_rx_data *data)
{
	struct iwn4965_tx_stat *stat = (struct iwn4965_tx_stat *)(desc + 1);
	struct iwn_tx_ring *ring;
	int qid;
	qid = desc->qid & 0xf;
	ring = &sc->txq[qid];
	DPRINTF(sc, IWN_DEBUG_XMIT, "%s: "
	    "qid %d idx %d RTS retries %d ACK retries %d nkill %d rate %x duration %d status %x\n",
	    __func__, desc->qid, desc->idx,
	    stat->rtsfailcnt,
	    stat->ackfailcnt,
	    stat->btkillcnt,
	    stat->rate, le16toh(stat->duration),
	    le32toh(stat->status));
	bus_dmamap_sync(ring->data_dmat, data->map, BUS_DMASYNC_POSTREAD);
	if (qid >= sc->firstaggqueue) {
		iwn_ampdu_tx_done(sc, qid, desc->idx, stat->nframes,
		    stat->ackfailcnt, &stat->status);
	} else {
		iwn_tx_done(sc, desc, stat->ackfailcnt,
		    le32toh(stat->status) & 0xff);
	}
}
static void iwn4965_tx_done ( struct iwn_softc * sc , struct iwn_rx_desc * desc , struct iwn_rx_data * data ) { struct iwn4965_tx_stat * stat = ( struct iwn4965_tx_stat * ) ( desc + 1 ) ; struct iwn_tx_ring * ring ; int qid ; qid = desc -> qid & 0xf ; ring = & sc -> txq [ qid ] ; DPRINTF ( sc , IWN_DEBUG_XMIT , " " " \n " , __func__ , desc -> qid , desc -> idx , stat -> rtsfailcnt , stat -> ackfailcnt , stat -> btkillcnt , stat -> rate , le16toh ( stat -> duration ) , le32toh ( stat -> status ) ) ; bus_dmamap_sync ( ring -> data_dmat , data -> map , BUS_DMASYNC_POSTREAD ) ; if ( qid >= sc -> firstaggqueue ) { iwn_ampdu_tx_done ( sc , qid , desc -> idx , stat -> nframes , stat -> ackfailcnt , & stat -> status ) ; } else { iwn_tx_done ( sc , desc , stat -> ackfailcnt , le32toh ( stat -> status ) & 0xff ) ; } }
Process a TX_DONE firmware notification.
Process a TX_DONE firmware notification .