void acx111_init_fw_txring(struct acx_softc *sc, uint32_t fw_txdesc_start) { struct acx_txbuf *tx_buf; uint32_t desc_paddr; int i; tx_buf = sc->sc_buf_data.tx_buf; desc_paddr = sc->sc_ring_data.tx_ring_paddr; for (i = 0; i < ACX_TX_DESC_CNT; ++i) { tx_buf[i].tb_fwdesc_ofs = fw_txdesc_start + (i * ACX111_FW_TXDESC_SIZE); /* * Except for the following fields, rest of the fields * are setup by hardware. */ FW_TXDESC_SETFIELD_4(sc, &tx_buf[i], f_tx_host_desc, desc_paddr); FW_TXDESC_SETFIELD_1(sc, &tx_buf[i], f_tx_ctrl, DESC_CTRL_HOSTOWN); desc_paddr += (2 * sizeof(struct acx_host_desc)); } }
void acx100_set_fw_txdesc_rate(struct acx_softc *sc, struct acx_txbuf *tx_buf, int rate) { FW_TXDESC_SETFIELD_1(sc, tx_buf, f_tx_rate100, ACX100_RATE(rate)); }