Lines Matching refs:ab
13 struct ath11k_base *ab = ar->ab; in ath11k_dbring_bufs_replenish() local
21 srng = &ab->hal.srng_list[ring->refill_srng.ring_id]; in ath11k_dbring_bufs_replenish()
25 ath11k_hal_srng_access_begin(ab, srng); in ath11k_dbring_bufs_replenish()
29 paddr = dma_map_single(ab->dev, ptr_aligned, ring->buf_sz, in ath11k_dbring_bufs_replenish()
32 ret = dma_mapping_error(ab->dev, paddr); in ath11k_dbring_bufs_replenish()
44 desc = ath11k_hal_srng_src_get_next_entry(ab, srng); in ath11k_dbring_bufs_replenish()
57 ath11k_hal_srng_access_end(ab, srng); in ath11k_dbring_bufs_replenish()
66 dma_unmap_single(ab->dev, paddr, ring->buf_sz, in ath11k_dbring_bufs_replenish()
69 ath11k_hal_srng_access_end(ab, srng); in ath11k_dbring_bufs_replenish()
82 srng = &ar->ab->hal.srng_list[ring->refill_srng.ring_id]; in ath11k_dbring_fill_bufs()
86 num_free = ath11k_hal_srng_src_num_free(ar->ab, srng, true); in ath11k_dbring_fill_bufs()
99 ath11k_warn(ar->ab, "failed to replenish db ring num_remain %d req_ent %d\n", in ath11k_dbring_fill_bufs()
137 ath11k_warn(ar->ab, "failed to setup db ring cfg\n"); in ath11k_dbring_wmi_cfg_setup()
163 struct ath11k_base *ab = ar->ab; in ath11k_dbring_buf_setup() local
167 srng = &ab->hal.srng_list[ring->refill_srng.ring_id]; in ath11k_dbring_buf_setup()
169 ath11k_hal_srng_get_entrysize(ab, HAL_RXDMA_DIR_BUF); in ath11k_dbring_buf_setup()
174 ring->hp_addr = ath11k_hal_srng_get_hp_addr(ar->ab, srng); in ath11k_dbring_buf_setup()
175 ring->tp_addr = ath11k_hal_srng_get_tp_addr(ar->ab, srng); in ath11k_dbring_buf_setup()
187 ret = ath11k_dp_srng_setup(ar->ab, &ring->refill_srng, HAL_RXDMA_DIR_BUF, in ath11k_dbring_srng_setup()
190 ath11k_warn(ar->ab, "failed to setup srng: %d ring_id %d\n", in ath11k_dbring_srng_setup()
197 ath11k_dp_srng_cleanup(ar->ab, &ring->refill_srng); in ath11k_dbring_srng_setup()
201 int ath11k_dbring_get_cap(struct ath11k_base *ab, in ath11k_dbring_get_cap() argument
208 if (!ab->num_db_cap || !ab->db_caps) in ath11k_dbring_get_cap()
214 for (i = 0; i < ab->num_db_cap; i++) { in ath11k_dbring_get_cap()
215 if (pdev_idx == ab->db_caps[i].pdev_id && in ath11k_dbring_get_cap()
216 id == ab->db_caps[i].id) { in ath11k_dbring_get_cap()
217 *db_cap = ab->db_caps[i]; in ath11k_dbring_get_cap()
226 int ath11k_dbring_buffer_release_event(struct ath11k_base *ab, in ath11k_dbring_buffer_release_event() argument
246 if (pdev_idx >= ab->num_radios) { in ath11k_dbring_buffer_release_event()
247 ath11k_warn(ab, "Invalid pdev id %d\n", pdev_idx); in ath11k_dbring_buffer_release_event()
253 ath11k_warn(ab, "Buffer entry %d mismatch meta entry %d\n", in ath11k_dbring_buffer_release_event()
259 ar = ab->pdevs[pdev_idx].ar; in ath11k_dbring_buffer_release_event()
262 if (!rcu_dereference(ab->pdevs_active[pdev_idx])) { in ath11k_dbring_buffer_release_event()
273 ath11k_warn(ab, "Recv dma buffer release ev on unsupp module %d\n", in ath11k_dbring_buffer_release_event()
283 srng = &ab->hal.srng_list[ring->refill_srng.ring_id]; in ath11k_dbring_buffer_release_event()
310 dma_unmap_single(ab->dev, buff->paddr, ring->buf_sz, in ath11k_dbring_buffer_release_event()
336 ath11k_dp_srng_cleanup(ar->ab, &ring->refill_srng); in ath11k_dbring_srng_cleanup()
347 dma_unmap_single(ar->ab->dev, buff->paddr, in ath11k_dbring_buf_cleanup()