Lines Matching defs:rxq
580 struct athn_rxq *rxq = &sc->sc_rxq[0];
586 rxq->bf = malloc(ATHN_NRXBUFS * sizeof(*bf), M_DEVBUF,
592 BUS_DMA_NOWAIT, &rxq->map);
596 error = bus_dmamem_alloc(sc->sc_dmat, size, 0, 0, &rxq->seg, 1,
602 error = bus_dmamem_map(sc->sc_dmat, &rxq->seg, 1, size,
603 (void **)&rxq->descs, BUS_DMA_NOWAIT | BUS_DMA_COHERENT);
607 error = bus_dmamap_load(sc->sc_dmat, rxq->map, rxq->descs,
613 bf = &rxq->bf[i];
614 ds = &((struct ar_rx_desc *)rxq->descs)[i];
649 bf->bf_daddr = rxq->map->dm_segs[0].ds_addr +
661 struct athn_rxq *rxq = &sc->sc_rxq[0];
665 if (rxq->bf == NULL)
668 bf = &rxq->bf[i];
674 free(rxq->bf, M_DEVBUF);
677 if (rxq->map != NULL) {
678 if (rxq->descs != NULL) {
679 bus_dmamap_unload(sc->sc_dmat, rxq->map);
680 bus_dmamem_unmap(sc->sc_dmat, (void *)rxq->descs,
682 bus_dmamem_free(sc->sc_dmat, &rxq->seg, 1);
684 bus_dmamap_destroy(sc->sc_dmat, rxq->map);
691 struct athn_rxq *rxq = &sc->sc_rxq[0];
697 SIMPLEQ_INIT(&rxq->head);
698 rxq->lastds = NULL;
700 bf = &rxq->bf[i];
707 if (rxq->lastds != NULL) {
708 ((struct ar_rx_desc *)rxq->lastds)->ds_link =
711 SIMPLEQ_INSERT_TAIL(&rxq->head, bf, bf_list);
712 rxq->lastds = ds;
714 bus_dmamap_sync(sc->sc_dmat, rxq->map, 0, rxq->map->dm_mapsize,
718 AR_WRITE(sc, AR_RXDP, SIMPLEQ_FIRST(&rxq->head)->bf_daddr);
790 struct athn_rxq *rxq = &sc->sc_rxq[0];
799 bf = SIMPLEQ_FIRST(&rxq->head);
940 SIMPLEQ_REMOVE_HEAD(&rxq->head, bf_list);
946 if (__predict_true(!SIMPLEQ_EMPTY(&rxq->head)))
947 ((struct ar_rx_desc *)rxq->lastds)->ds_link = bf->bf_daddr;
950 SIMPLEQ_INSERT_TAIL(&rxq->head, bf, bf_list);
951 rxq->lastds = ds;