Lines Matching refs:htt
31 hash_for_each_possible(ar->htt.rx_ring.skb_table, rxcb, hlist, paddr) in ath10k_htt_rx_find_skb_paddr()
39 static void ath10k_htt_rx_ring_free(struct ath10k_htt *htt) in ath10k_htt_rx_ring_free() argument
46 if (htt->rx_ring.in_ord_rx) { in ath10k_htt_rx_ring_free()
47 hash_for_each_safe(htt->rx_ring.skb_table, i, n, rxcb, hlist) { in ath10k_htt_rx_ring_free()
49 dma_unmap_single(htt->ar->dev, rxcb->paddr, in ath10k_htt_rx_ring_free()
56 for (i = 0; i < htt->rx_ring.size; i++) { in ath10k_htt_rx_ring_free()
57 skb = htt->rx_ring.netbufs_ring[i]; in ath10k_htt_rx_ring_free()
62 dma_unmap_single(htt->ar->dev, rxcb->paddr, in ath10k_htt_rx_ring_free()
69 htt->rx_ring.fill_cnt = 0; in ath10k_htt_rx_ring_free()
70 hash_init(htt->rx_ring.skb_table); in ath10k_htt_rx_ring_free()
71 memset(htt->rx_ring.netbufs_ring, 0, in ath10k_htt_rx_ring_free()
72 htt->rx_ring.size * sizeof(htt->rx_ring.netbufs_ring[0])); in ath10k_htt_rx_ring_free()
75 static size_t ath10k_htt_get_rx_ring_size_32(struct ath10k_htt *htt) in ath10k_htt_get_rx_ring_size_32() argument
77 return htt->rx_ring.size * sizeof(htt->rx_ring.paddrs_ring_32); in ath10k_htt_get_rx_ring_size_32()
80 static size_t ath10k_htt_get_rx_ring_size_64(struct ath10k_htt *htt) in ath10k_htt_get_rx_ring_size_64() argument
82 return htt->rx_ring.size * sizeof(htt->rx_ring.paddrs_ring_64); in ath10k_htt_get_rx_ring_size_64()
85 static void ath10k_htt_config_paddrs_ring_32(struct ath10k_htt *htt, in ath10k_htt_config_paddrs_ring_32() argument
88 htt->rx_ring.paddrs_ring_32 = vaddr; in ath10k_htt_config_paddrs_ring_32()
91 static void ath10k_htt_config_paddrs_ring_64(struct ath10k_htt *htt, in ath10k_htt_config_paddrs_ring_64() argument
94 htt->rx_ring.paddrs_ring_64 = vaddr; in ath10k_htt_config_paddrs_ring_64()
97 static void ath10k_htt_set_paddrs_ring_32(struct ath10k_htt *htt, in ath10k_htt_set_paddrs_ring_32() argument
100 htt->rx_ring.paddrs_ring_32[idx] = __cpu_to_le32(paddr); in ath10k_htt_set_paddrs_ring_32()
103 static void ath10k_htt_set_paddrs_ring_64(struct ath10k_htt *htt, in ath10k_htt_set_paddrs_ring_64() argument
106 htt->rx_ring.paddrs_ring_64[idx] = __cpu_to_le64(paddr); in ath10k_htt_set_paddrs_ring_64()
109 static void ath10k_htt_reset_paddrs_ring_32(struct ath10k_htt *htt, int idx) in ath10k_htt_reset_paddrs_ring_32() argument
111 htt->rx_ring.paddrs_ring_32[idx] = 0; in ath10k_htt_reset_paddrs_ring_32()
114 static void ath10k_htt_reset_paddrs_ring_64(struct ath10k_htt *htt, int idx) in ath10k_htt_reset_paddrs_ring_64() argument
116 htt->rx_ring.paddrs_ring_64[idx] = 0; in ath10k_htt_reset_paddrs_ring_64()
119 static void *ath10k_htt_get_vaddr_ring_32(struct ath10k_htt *htt) in ath10k_htt_get_vaddr_ring_32() argument
121 return (void *)htt->rx_ring.paddrs_ring_32; in ath10k_htt_get_vaddr_ring_32()
124 static void *ath10k_htt_get_vaddr_ring_64(struct ath10k_htt *htt) in ath10k_htt_get_vaddr_ring_64() argument
126 return (void *)htt->rx_ring.paddrs_ring_64; in ath10k_htt_get_vaddr_ring_64()
129 static int __ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num) in __ath10k_htt_rx_ring_fill_n() argument
144 idx = __le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr); in __ath10k_htt_rx_ring_fill_n()
146 if (idx < 0 || idx >= htt->rx_ring.size) { in __ath10k_htt_rx_ring_fill_n()
147 ath10k_err(htt->ar, "rx ring index is not valid, firmware malfunctioning?\n"); in __ath10k_htt_rx_ring_fill_n()
148 idx &= htt->rx_ring.size_mask; in __ath10k_htt_rx_ring_fill_n()
169 paddr = dma_map_single(htt->ar->dev, skb->data, in __ath10k_htt_rx_ring_fill_n()
173 if (unlikely(dma_mapping_error(htt->ar->dev, paddr))) { in __ath10k_htt_rx_ring_fill_n()
181 htt->rx_ring.netbufs_ring[idx] = skb; in __ath10k_htt_rx_ring_fill_n()
182 ath10k_htt_set_paddrs_ring(htt, paddr, idx); in __ath10k_htt_rx_ring_fill_n()
183 htt->rx_ring.fill_cnt++; in __ath10k_htt_rx_ring_fill_n()
185 if (htt->rx_ring.in_ord_rx) { in __ath10k_htt_rx_ring_fill_n()
186 hash_add(htt->rx_ring.skb_table, in __ath10k_htt_rx_ring_fill_n()
193 idx &= htt->rx_ring.size_mask; in __ath10k_htt_rx_ring_fill_n()
202 *htt->rx_ring.alloc_idx.vaddr = __cpu_to_le32(idx); in __ath10k_htt_rx_ring_fill_n()
206 static int ath10k_htt_rx_ring_fill_n(struct ath10k_htt *htt, int num) in ath10k_htt_rx_ring_fill_n() argument
208 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_ring_fill_n()
209 return __ath10k_htt_rx_ring_fill_n(htt, num); in ath10k_htt_rx_ring_fill_n()
212 static void ath10k_htt_rx_msdu_buff_replenish(struct ath10k_htt *htt) in ath10k_htt_rx_msdu_buff_replenish() argument
232 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_msdu_buff_replenish()
233 num_deficit = htt->rx_ring.fill_level - htt->rx_ring.fill_cnt; in ath10k_htt_rx_msdu_buff_replenish()
236 ret = ath10k_htt_rx_ring_fill_n(htt, num_to_fill); in ath10k_htt_rx_msdu_buff_replenish()
244 mod_timer(&htt->rx_ring.refill_retry_timer, jiffies + in ath10k_htt_rx_msdu_buff_replenish()
247 mod_timer(&htt->rx_ring.refill_retry_timer, jiffies + in ath10k_htt_rx_msdu_buff_replenish()
250 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_msdu_buff_replenish()
255 struct ath10k_htt *htt = from_timer(htt, t, rx_ring.refill_retry_timer); in ath10k_htt_rx_ring_refill_retry() local
257 ath10k_htt_rx_msdu_buff_replenish(htt); in ath10k_htt_rx_ring_refill_retry()
262 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_ring_refill() local
268 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_ring_refill()
269 ret = ath10k_htt_rx_ring_fill_n(htt, (htt->rx_ring.fill_level - in ath10k_htt_rx_ring_refill()
270 htt->rx_ring.fill_cnt)); in ath10k_htt_rx_ring_refill()
273 ath10k_htt_rx_ring_free(htt); in ath10k_htt_rx_ring_refill()
275 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_ring_refill()
280 void ath10k_htt_rx_free(struct ath10k_htt *htt) in ath10k_htt_rx_free() argument
282 if (htt->ar->bus_param.dev_type == ATH10K_DEV_TYPE_HL) in ath10k_htt_rx_free()
285 del_timer_sync(&htt->rx_ring.refill_retry_timer); in ath10k_htt_rx_free()
287 skb_queue_purge(&htt->rx_msdus_q); in ath10k_htt_rx_free()
288 skb_queue_purge(&htt->rx_in_ord_compl_q); in ath10k_htt_rx_free()
289 skb_queue_purge(&htt->tx_fetch_ind_q); in ath10k_htt_rx_free()
291 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_free()
292 ath10k_htt_rx_ring_free(htt); in ath10k_htt_rx_free()
293 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_free()
295 dma_free_coherent(htt->ar->dev, in ath10k_htt_rx_free()
296 ath10k_htt_get_rx_ring_size(htt), in ath10k_htt_rx_free()
297 ath10k_htt_get_vaddr_ring(htt), in ath10k_htt_rx_free()
298 htt->rx_ring.base_paddr); in ath10k_htt_rx_free()
300 dma_free_coherent(htt->ar->dev, in ath10k_htt_rx_free()
301 sizeof(*htt->rx_ring.alloc_idx.vaddr), in ath10k_htt_rx_free()
302 htt->rx_ring.alloc_idx.vaddr, in ath10k_htt_rx_free()
303 htt->rx_ring.alloc_idx.paddr); in ath10k_htt_rx_free()
305 kfree(htt->rx_ring.netbufs_ring); in ath10k_htt_rx_free()
308 static inline struct sk_buff *ath10k_htt_rx_netbuf_pop(struct ath10k_htt *htt) in ath10k_htt_rx_netbuf_pop() argument
310 struct ath10k *ar = htt->ar; in ath10k_htt_rx_netbuf_pop()
314 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_netbuf_pop()
316 if (htt->rx_ring.fill_cnt == 0) { in ath10k_htt_rx_netbuf_pop()
321 idx = htt->rx_ring.sw_rd_idx.msdu_payld; in ath10k_htt_rx_netbuf_pop()
322 msdu = htt->rx_ring.netbufs_ring[idx]; in ath10k_htt_rx_netbuf_pop()
323 htt->rx_ring.netbufs_ring[idx] = NULL; in ath10k_htt_rx_netbuf_pop()
324 ath10k_htt_reset_paddrs_ring(htt, idx); in ath10k_htt_rx_netbuf_pop()
327 idx &= htt->rx_ring.size_mask; in ath10k_htt_rx_netbuf_pop()
328 htt->rx_ring.sw_rd_idx.msdu_payld = idx; in ath10k_htt_rx_netbuf_pop()
329 htt->rx_ring.fill_cnt--; in ath10k_htt_rx_netbuf_pop()
331 dma_unmap_single(htt->ar->dev, in ath10k_htt_rx_netbuf_pop()
342 static int ath10k_htt_rx_amsdu_pop(struct ath10k_htt *htt, in ath10k_htt_rx_amsdu_pop() argument
345 struct ath10k *ar = htt->ar; in ath10k_htt_rx_amsdu_pop()
350 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_amsdu_pop()
355 msdu = ath10k_htt_rx_netbuf_pop(htt); in ath10k_htt_rx_amsdu_pop()
401 msdu = ath10k_htt_rx_netbuf_pop(htt); in ath10k_htt_rx_amsdu_pop()
443 static struct sk_buff *ath10k_htt_rx_pop_paddr(struct ath10k_htt *htt, in ath10k_htt_rx_pop_paddr() argument
446 struct ath10k *ar = htt->ar; in ath10k_htt_rx_pop_paddr()
450 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_pop_paddr()
458 htt->rx_ring.fill_cnt--; in ath10k_htt_rx_pop_paddr()
460 dma_unmap_single(htt->ar->dev, rxcb->paddr, in ath10k_htt_rx_pop_paddr()
478 static int ath10k_htt_rx_handle_amsdu_mon_32(struct ath10k_htt *htt, in ath10k_htt_rx_handle_amsdu_mon_32() argument
482 struct ath10k *ar = htt->ar; in ath10k_htt_rx_handle_amsdu_mon_32()
511 frag_buf = ath10k_htt_rx_pop_paddr(htt, paddr); in ath10k_htt_rx_handle_amsdu_mon_32()
526 frag_buf = ath10k_htt_rx_pop_paddr(htt, paddr); in ath10k_htt_rx_handle_amsdu_mon_32()
554 ath10k_htt_rx_handle_amsdu_mon_64(struct ath10k_htt *htt, in ath10k_htt_rx_handle_amsdu_mon_64() argument
558 struct ath10k *ar = htt->ar; in ath10k_htt_rx_handle_amsdu_mon_64()
587 frag_buf = ath10k_htt_rx_pop_paddr(htt, paddr); in ath10k_htt_rx_handle_amsdu_mon_64()
602 frag_buf = ath10k_htt_rx_pop_paddr(htt, paddr); in ath10k_htt_rx_handle_amsdu_mon_64()
629 static int ath10k_htt_rx_pop_paddr32_list(struct ath10k_htt *htt, in ath10k_htt_rx_pop_paddr32_list() argument
633 struct ath10k *ar = htt->ar; in ath10k_htt_rx_pop_paddr32_list()
641 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_pop_paddr32_list()
649 msdu = ath10k_htt_rx_pop_paddr(htt, paddr); in ath10k_htt_rx_pop_paddr32_list()
656 ret = ath10k_htt_rx_handle_amsdu_mon_32(htt, msdu, in ath10k_htt_rx_pop_paddr32_list()
680 ath10k_warn(htt->ar, "tried to pop an incomplete frame, oops!\n"); in ath10k_htt_rx_pop_paddr32_list()
691 static int ath10k_htt_rx_pop_paddr64_list(struct ath10k_htt *htt, in ath10k_htt_rx_pop_paddr64_list() argument
695 struct ath10k *ar = htt->ar; in ath10k_htt_rx_pop_paddr64_list()
703 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_pop_paddr64_list()
710 msdu = ath10k_htt_rx_pop_paddr(htt, paddr); in ath10k_htt_rx_pop_paddr64_list()
717 ret = ath10k_htt_rx_handle_amsdu_mon_64(htt, msdu, in ath10k_htt_rx_pop_paddr64_list()
741 ath10k_warn(htt->ar, "tried to pop an incomplete frame, oops!\n"); in ath10k_htt_rx_pop_paddr64_list()
752 int ath10k_htt_rx_alloc(struct ath10k_htt *htt) in ath10k_htt_rx_alloc() argument
754 struct ath10k *ar = htt->ar; in ath10k_htt_rx_alloc()
758 struct timer_list *timer = &htt->rx_ring.refill_retry_timer; in ath10k_htt_rx_alloc()
763 htt->rx_confused = false; in ath10k_htt_rx_alloc()
768 htt->rx_ring.size = HTT_RX_RING_SIZE; in ath10k_htt_rx_alloc()
769 htt->rx_ring.size_mask = htt->rx_ring.size - 1; in ath10k_htt_rx_alloc()
770 htt->rx_ring.fill_level = ar->hw_params.rx_ring_fill_level; in ath10k_htt_rx_alloc()
772 if (!is_power_of_2(htt->rx_ring.size)) { in ath10k_htt_rx_alloc()
777 htt->rx_ring.netbufs_ring = in ath10k_htt_rx_alloc()
778 kcalloc(htt->rx_ring.size, sizeof(struct sk_buff *), in ath10k_htt_rx_alloc()
780 if (!htt->rx_ring.netbufs_ring) in ath10k_htt_rx_alloc()
783 size = ath10k_htt_get_rx_ring_size(htt); in ath10k_htt_rx_alloc()
785 vaddr_ring = dma_alloc_coherent(htt->ar->dev, size, &paddr, GFP_KERNEL); in ath10k_htt_rx_alloc()
789 ath10k_htt_config_paddrs_ring(htt, vaddr_ring); in ath10k_htt_rx_alloc()
790 htt->rx_ring.base_paddr = paddr; in ath10k_htt_rx_alloc()
792 vaddr = dma_alloc_coherent(htt->ar->dev, in ath10k_htt_rx_alloc()
793 sizeof(*htt->rx_ring.alloc_idx.vaddr), in ath10k_htt_rx_alloc()
798 htt->rx_ring.alloc_idx.vaddr = vaddr; in ath10k_htt_rx_alloc()
799 htt->rx_ring.alloc_idx.paddr = paddr; in ath10k_htt_rx_alloc()
800 htt->rx_ring.sw_rd_idx.msdu_payld = htt->rx_ring.size_mask; in ath10k_htt_rx_alloc()
801 *htt->rx_ring.alloc_idx.vaddr = 0; in ath10k_htt_rx_alloc()
806 spin_lock_init(&htt->rx_ring.lock); in ath10k_htt_rx_alloc()
808 htt->rx_ring.fill_cnt = 0; in ath10k_htt_rx_alloc()
809 htt->rx_ring.sw_rd_idx.msdu_payld = 0; in ath10k_htt_rx_alloc()
810 hash_init(htt->rx_ring.skb_table); in ath10k_htt_rx_alloc()
812 skb_queue_head_init(&htt->rx_msdus_q); in ath10k_htt_rx_alloc()
813 skb_queue_head_init(&htt->rx_in_ord_compl_q); in ath10k_htt_rx_alloc()
814 skb_queue_head_init(&htt->tx_fetch_ind_q); in ath10k_htt_rx_alloc()
815 atomic_set(&htt->num_mpdus_ready, 0); in ath10k_htt_rx_alloc()
818 htt->rx_ring.size, htt->rx_ring.fill_level); in ath10k_htt_rx_alloc()
822 dma_free_coherent(htt->ar->dev, in ath10k_htt_rx_alloc()
823 ath10k_htt_get_rx_ring_size(htt), in ath10k_htt_rx_alloc()
825 htt->rx_ring.base_paddr); in ath10k_htt_rx_alloc()
827 kfree(htt->rx_ring.netbufs_ring); in ath10k_htt_rx_alloc()
1291 skb_queue_tail(&ar->htt.rx_msdus_q, skb); in ath10k_htt_rx_h_queue_msdu()
2200 static int ath10k_htt_rx_handle_amsdu(struct ath10k_htt *htt) in ath10k_htt_rx_handle_amsdu() argument
2202 struct ath10k *ar = htt->ar; in ath10k_htt_rx_handle_amsdu()
2203 struct ieee80211_rx_status *rx_status = &htt->rx_status; in ath10k_htt_rx_handle_amsdu()
2215 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2216 if (htt->rx_confused) { in ath10k_htt_rx_handle_amsdu()
2217 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2220 ret = ath10k_htt_rx_amsdu_pop(htt, &amsdu); in ath10k_htt_rx_handle_amsdu()
2221 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2229 htt->rx_confused = true; in ath10k_htt_rx_handle_amsdu()
2334 static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt, in ath10k_htt_rx_proc_rx_ind_hl() argument
2340 struct ath10k *ar = htt->ar; in ath10k_htt_rx_proc_rx_ind_hl()
2638 static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt, in ath10k_htt_rx_proc_rx_frag_ind_hl() argument
2642 struct ath10k *ar = htt->ar; in ath10k_htt_rx_proc_rx_frag_ind_hl()
2695 return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, in ath10k_htt_rx_proc_rx_frag_ind_hl()
2757 return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, in ath10k_htt_rx_proc_rx_frag_ind_hl()
2784 return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, in ath10k_htt_rx_proc_rx_frag_ind_hl()
2796 static void ath10k_htt_rx_proc_rx_ind_ll(struct ath10k_htt *htt, in ath10k_htt_rx_proc_rx_ind_ll() argument
2799 struct ath10k *ar = htt->ar; in ath10k_htt_rx_proc_rx_ind_ll()
2819 atomic_add(mpdu_count, &htt->num_mpdus_ready); in ath10k_htt_rx_proc_rx_ind_ll()
2828 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_tx_compl_ind() local
2897 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_rx_tx_compl_ind()
2898 } else if (!kfifo_put(&htt->txdone_fifo, tx_done)) { in ath10k_htt_rx_tx_compl_ind()
2901 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_rx_tx_compl_ind()
3085 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_h_rx_offload() local
3086 struct ieee80211_rx_status *status = &htt->rx_status; in ath10k_htt_rx_h_rx_offload()
3134 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_in_ord_ind() local
3136 struct ieee80211_rx_status *status = &htt->rx_status; in ath10k_htt_rx_in_ord_ind()
3147 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_in_ord_ind()
3149 if (htt->rx_confused) in ath10k_htt_rx_in_ord_ind()
3177 ret = ath10k_htt_rx_pop_paddr64_list(htt, &resp->rx_in_ord_ind, in ath10k_htt_rx_in_ord_ind()
3180 ret = ath10k_htt_rx_pop_paddr32_list(htt, &resp->rx_in_ord_ind, in ath10k_htt_rx_in_ord_ind()
3185 htt->rx_confused = true; in ath10k_htt_rx_in_ord_ind()
3217 htt->rx_confused = true; in ath10k_htt_rx_in_ord_ind()
3288 if (!ar->htt.tx_q_state.enabled) { in ath10k_htt_rx_tx_fetch_ind()
3293 if (ar->htt.tx_q_state.mode == HTT_TX_MODE_SWITCH_PUSH) { in ath10k_htt_rx_tx_fetch_ind()
3312 if (unlikely(peer_id >= ar->htt.tx_q_state.num_peers) || in ath10k_htt_rx_tx_fetch_ind()
3313 unlikely(tid >= ar->htt.tx_q_state.num_tids)) { in ath10k_htt_rx_tx_fetch_ind()
3464 ar->htt.tx_q_state.enabled = enable; in ath10k_htt_rx_tx_mode_switch_ind()
3465 ar->htt.tx_q_state.mode = mode; in ath10k_htt_rx_tx_mode_switch_ind()
3466 ar->htt.tx_q_state.num_push_allowed = threshold; in ath10k_htt_rx_tx_mode_switch_ind()
3476 if (unlikely(peer_id >= ar->htt.tx_q_state.num_peers) || in ath10k_htt_rx_tx_mode_switch_ind()
3477 unlikely(tid >= ar->htt.tx_q_state.num_tids)) { in ath10k_htt_rx_tx_mode_switch_ind()
3497 spin_lock_bh(&ar->htt.tx_lock); in ath10k_htt_rx_tx_mode_switch_ind()
3500 spin_unlock_bh(&ar->htt.tx_lock); in ath10k_htt_rx_tx_mode_switch_ind()
3770 if (ar->htt.disable_tx_comp) { in ath10k_update_per_peer_tx_stats()
3943 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_t2h_msg_handler() local
3954 if (resp->hdr.msg_type >= ar->htt.t2h_msg_types_max) { in ath10k_htt_t2h_msg_handler()
3956 resp->hdr.msg_type, ar->htt.t2h_msg_types_max); in ath10k_htt_t2h_msg_handler()
3959 type = ar->htt.t2h_msg_types[resp->hdr.msg_type]; in ath10k_htt_t2h_msg_handler()
3963 htt->target_version_major = resp->ver_resp.major; in ath10k_htt_t2h_msg_handler()
3964 htt->target_version_minor = resp->ver_resp.minor; in ath10k_htt_t2h_msg_handler()
3965 complete(&htt->target_version_received); in ath10k_htt_t2h_msg_handler()
3970 ath10k_htt_rx_proc_rx_ind_ll(htt, &resp->rx_ind); in ath10k_htt_t2h_msg_handler()
3972 skb_queue_tail(&htt->rx_indication_head, skb); in ath10k_htt_t2h_msg_handler()
3982 ath10k_peer_map_event(htt, &ev); in ath10k_htt_t2h_msg_handler()
3989 ath10k_peer_unmap_event(htt, &ev); in ath10k_htt_t2h_msg_handler()
3994 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_t2h_msg_handler() local
3996 struct ath10k_htc_ep *ep = &ar->htc.endpoint[htt->eid]; in ath10k_htt_t2h_msg_handler()
4022 if (htt->disable_tx_comp) { in ath10k_htt_t2h_msg_handler()
4028 status = ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_t2h_msg_handler()
4030 spin_lock_bh(&htt->tx_lock); in ath10k_htt_t2h_msg_handler()
4031 ath10k_htt_tx_mgmt_dec_pending(htt); in ath10k_htt_t2h_msg_handler()
4032 spin_unlock_bh(&htt->tx_lock); in ath10k_htt_t2h_msg_handler()
4037 ath10k_htt_rx_tx_compl_ind(htt->ar, skb); in ath10k_htt_t2h_msg_handler()
4040 struct ath10k *ar = htt->ar; in ath10k_htt_t2h_msg_handler()
4055 atomic_inc(&htt->num_mpdus_ready); in ath10k_htt_t2h_msg_handler()
4057 return ath10k_htt_rx_proc_rx_frag_ind(htt, in ath10k_htt_t2h_msg_handler()
4098 skb_queue_tail(&htt->rx_in_ord_compl_q, skb); in ath10k_htt_t2h_msg_handler()
4102 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_t2h_msg_handler() local
4104 struct ath10k_htc_ep *ep = &ar->htc.endpoint[htt->eid]; in ath10k_htt_t2h_msg_handler()
4116 if (htt->disable_tx_comp) { in ath10k_htt_t2h_msg_handler()
4146 skb_queue_tail(&htt->tx_fetch_ind_q, tx_fetch_ind); in ath10k_htt_t2h_msg_handler()
4183 if (skb_queue_empty(&ar->htt.rx_msdus_q)) in ath10k_htt_rx_deliver_msdu()
4186 skb = skb_dequeue(&ar->htt.rx_msdus_q); in ath10k_htt_rx_deliver_msdu()
4199 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_hl_indication() local
4205 skb = skb_dequeue(&htt->rx_indication_head); in ath10k_htt_rx_hl_indication()
4211 release = ath10k_htt_rx_proc_rx_ind_hl(htt, in ath10k_htt_rx_hl_indication()
4221 skb_queue_len(&htt->rx_indication_head)); in ath10k_htt_rx_hl_indication()
4229 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_txrx_compl_task() local
4248 while ((skb = skb_dequeue(&htt->rx_in_ord_compl_q))) { in ath10k_htt_txrx_compl_task()
4249 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_txrx_compl_task()
4251 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_txrx_compl_task()
4260 while (atomic_read(&htt->num_mpdus_ready)) { in ath10k_htt_txrx_compl_task()
4261 ret = ath10k_htt_rx_handle_amsdu(htt); in ath10k_htt_txrx_compl_task()
4266 atomic_dec(&htt->num_mpdus_ready); in ath10k_htt_txrx_compl_task()
4277 if ((quota < budget) && !kfifo_is_empty(&htt->txdone_fifo)) in ath10k_htt_txrx_compl_task()
4285 while (kfifo_get(&htt->txdone_fifo, &tx_done)) in ath10k_htt_txrx_compl_task()
4286 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_txrx_compl_task()
4290 spin_lock_irqsave(&htt->tx_fetch_ind_q.lock, flags); in ath10k_htt_txrx_compl_task()
4291 skb_queue_splice_init(&htt->tx_fetch_ind_q, &tx_ind_q); in ath10k_htt_txrx_compl_task()
4292 spin_unlock_irqrestore(&htt->tx_fetch_ind_q.lock, flags); in ath10k_htt_txrx_compl_task()
4300 ath10k_htt_rx_msdu_buff_replenish(htt); in ath10k_htt_txrx_compl_task()
4330 void ath10k_htt_set_rx_ops(struct ath10k_htt *htt) in ath10k_htt_set_rx_ops() argument
4332 struct ath10k *ar = htt->ar; in ath10k_htt_set_rx_ops()
4335 htt->rx_ops = &htt_rx_ops_hl; in ath10k_htt_set_rx_ops()
4337 htt->rx_ops = &htt_rx_ops_64; in ath10k_htt_set_rx_ops()
4339 htt->rx_ops = &htt_rx_ops_32; in ath10k_htt_set_rx_ops()