Lines Matching refs:rx_ring
34 hash_for_each_possible(ar->htt.rx_ring.skb_table, rxcb, hlist, paddr) in ath10k_htt_rx_find_skb_paddr()
49 if (htt->rx_ring.in_ord_rx) { in ath10k_htt_rx_ring_free()
50 hash_for_each_safe(htt->rx_ring.skb_table, i, n, rxcb, hlist) { in ath10k_htt_rx_ring_free()
59 for (i = 0; i < htt->rx_ring.size; i++) { in ath10k_htt_rx_ring_free()
60 skb = htt->rx_ring.netbufs_ring[i]; in ath10k_htt_rx_ring_free()
72 htt->rx_ring.fill_cnt = 0; in ath10k_htt_rx_ring_free()
73 hash_init(htt->rx_ring.skb_table); in ath10k_htt_rx_ring_free()
74 memset(htt->rx_ring.netbufs_ring, 0, in ath10k_htt_rx_ring_free()
75 htt->rx_ring.size * sizeof(htt->rx_ring.netbufs_ring[0])); in ath10k_htt_rx_ring_free()
80 return htt->rx_ring.size * sizeof(htt->rx_ring.paddrs_ring_32); in ath10k_htt_get_rx_ring_size_32()
85 return htt->rx_ring.size * sizeof(htt->rx_ring.paddrs_ring_64); in ath10k_htt_get_rx_ring_size_64()
91 htt->rx_ring.paddrs_ring_32 = vaddr; in ath10k_htt_config_paddrs_ring_32()
97 htt->rx_ring.paddrs_ring_64 = vaddr; in ath10k_htt_config_paddrs_ring_64()
103 htt->rx_ring.paddrs_ring_32[idx] = __cpu_to_le32(paddr); in ath10k_htt_set_paddrs_ring_32()
109 htt->rx_ring.paddrs_ring_64[idx] = __cpu_to_le64(paddr); in ath10k_htt_set_paddrs_ring_64()
114 htt->rx_ring.paddrs_ring_32[idx] = 0; in ath10k_htt_reset_paddrs_ring_32()
119 htt->rx_ring.paddrs_ring_64[idx] = 0; in ath10k_htt_reset_paddrs_ring_64()
124 return (void *)htt->rx_ring.paddrs_ring_32; in ath10k_htt_get_vaddr_ring_32()
129 return (void *)htt->rx_ring.paddrs_ring_64; in ath10k_htt_get_vaddr_ring_64()
148 idx = __le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr); in __ath10k_htt_rx_ring_fill_n()
150 if (idx < 0 || idx >= htt->rx_ring.size) { in __ath10k_htt_rx_ring_fill_n()
152 idx &= htt->rx_ring.size_mask; in __ath10k_htt_rx_ring_fill_n()
185 htt->rx_ring.netbufs_ring[idx] = skb; in __ath10k_htt_rx_ring_fill_n()
187 htt->rx_ring.fill_cnt++; in __ath10k_htt_rx_ring_fill_n()
189 if (htt->rx_ring.in_ord_rx) { in __ath10k_htt_rx_ring_fill_n()
190 hash_add(htt->rx_ring.skb_table, in __ath10k_htt_rx_ring_fill_n()
197 idx &= htt->rx_ring.size_mask; in __ath10k_htt_rx_ring_fill_n()
206 *htt->rx_ring.alloc_idx.vaddr = __cpu_to_le32(idx); in __ath10k_htt_rx_ring_fill_n()
212 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_ring_fill_n()
236 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_msdu_buff_replenish()
237 num_deficit = htt->rx_ring.fill_level - htt->rx_ring.fill_cnt; in ath10k_htt_rx_msdu_buff_replenish()
248 mod_timer(&htt->rx_ring.refill_retry_timer, jiffies + in ath10k_htt_rx_msdu_buff_replenish()
251 mod_timer(&htt->rx_ring.refill_retry_timer, jiffies + in ath10k_htt_rx_msdu_buff_replenish()
254 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_msdu_buff_replenish()
259 struct ath10k_htt *htt = from_timer(htt, t, rx_ring.refill_retry_timer); in ath10k_htt_rx_ring_refill_retry()
272 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_ring_refill()
273 ret = ath10k_htt_rx_ring_fill_n(htt, (htt->rx_ring.fill_level - in ath10k_htt_rx_ring_refill()
274 htt->rx_ring.fill_cnt)); in ath10k_htt_rx_ring_refill()
279 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_ring_refill()
289 del_timer_sync(&htt->rx_ring.refill_retry_timer); in ath10k_htt_rx_free()
295 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_free()
297 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_free()
302 htt->rx_ring.base_paddr); in ath10k_htt_rx_free()
307 sizeof(*htt->rx_ring.alloc_idx.vaddr), in ath10k_htt_rx_free()
308 htt->rx_ring.alloc_idx.vaddr, in ath10k_htt_rx_free()
309 htt->rx_ring.alloc_idx.paddr); in ath10k_htt_rx_free()
310 htt->rx_ring.alloc_idx.vaddr = NULL; in ath10k_htt_rx_free()
312 kfree(htt->rx_ring.netbufs_ring); in ath10k_htt_rx_free()
313 htt->rx_ring.netbufs_ring = NULL; in ath10k_htt_rx_free()
322 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_netbuf_pop()
324 if (htt->rx_ring.fill_cnt == 0) { in ath10k_htt_rx_netbuf_pop()
329 idx = htt->rx_ring.sw_rd_idx.msdu_payld; in ath10k_htt_rx_netbuf_pop()
330 msdu = htt->rx_ring.netbufs_ring[idx]; in ath10k_htt_rx_netbuf_pop()
331 htt->rx_ring.netbufs_ring[idx] = NULL; in ath10k_htt_rx_netbuf_pop()
335 idx &= htt->rx_ring.size_mask; in ath10k_htt_rx_netbuf_pop()
336 htt->rx_ring.sw_rd_idx.msdu_payld = idx; in ath10k_htt_rx_netbuf_pop()
337 htt->rx_ring.fill_cnt--; in ath10k_htt_rx_netbuf_pop()
363 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_amsdu_pop()
473 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_pop_paddr()
481 htt->rx_ring.fill_cnt--; in ath10k_htt_rx_pop_paddr()
677 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_pop_paddr32_list()
742 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_pop_paddr64_list()
798 struct timer_list *timer = &htt->rx_ring.refill_retry_timer; in ath10k_htt_rx_alloc()
808 htt->rx_ring.size = HTT_RX_RING_SIZE; in ath10k_htt_rx_alloc()
809 htt->rx_ring.size_mask = htt->rx_ring.size - 1; in ath10k_htt_rx_alloc()
810 htt->rx_ring.fill_level = ar->hw_params.rx_ring_fill_level; in ath10k_htt_rx_alloc()
812 if (!is_power_of_2(htt->rx_ring.size)) { in ath10k_htt_rx_alloc()
817 htt->rx_ring.netbufs_ring = in ath10k_htt_rx_alloc()
818 kcalloc(htt->rx_ring.size, sizeof(struct sk_buff *), in ath10k_htt_rx_alloc()
820 if (!htt->rx_ring.netbufs_ring) in ath10k_htt_rx_alloc()
830 htt->rx_ring.base_paddr = paddr; in ath10k_htt_rx_alloc()
833 sizeof(*htt->rx_ring.alloc_idx.vaddr), in ath10k_htt_rx_alloc()
838 htt->rx_ring.alloc_idx.vaddr = vaddr; in ath10k_htt_rx_alloc()
839 htt->rx_ring.alloc_idx.paddr = paddr; in ath10k_htt_rx_alloc()
840 htt->rx_ring.sw_rd_idx.msdu_payld = htt->rx_ring.size_mask; in ath10k_htt_rx_alloc()
841 *htt->rx_ring.alloc_idx.vaddr = 0; in ath10k_htt_rx_alloc()
846 spin_lock_init(&htt->rx_ring.lock); in ath10k_htt_rx_alloc()
851 htt->rx_ring.fill_cnt = 0; in ath10k_htt_rx_alloc()
852 htt->rx_ring.sw_rd_idx.msdu_payld = 0; in ath10k_htt_rx_alloc()
853 hash_init(htt->rx_ring.skb_table); in ath10k_htt_rx_alloc()
861 htt->rx_ring.size, htt->rx_ring.fill_level); in ath10k_htt_rx_alloc()
868 htt->rx_ring.base_paddr); in ath10k_htt_rx_alloc()
871 kfree(htt->rx_ring.netbufs_ring); in ath10k_htt_rx_alloc()
872 htt->rx_ring.netbufs_ring = NULL; in ath10k_htt_rx_alloc()
2474 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2476 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2480 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
3423 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_in_ord_ind()
4529 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_txrx_compl_task()
4531 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_txrx_compl_task()