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()
2032 static int ath10k_htt_rx_handle_amsdu(struct ath10k_htt *htt) in ath10k_htt_rx_handle_amsdu() argument
2034 struct ath10k *ar = htt->ar; in ath10k_htt_rx_handle_amsdu()
2035 struct ieee80211_rx_status *rx_status = &htt->rx_status; in ath10k_htt_rx_handle_amsdu()
2047 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2048 if (htt->rx_confused) { in ath10k_htt_rx_handle_amsdu()
2049 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2052 ret = ath10k_htt_rx_amsdu_pop(htt, &amsdu); in ath10k_htt_rx_handle_amsdu()
2053 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_rx_handle_amsdu()
2061 htt->rx_confused = true; in ath10k_htt_rx_handle_amsdu()
2165 static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt, in ath10k_htt_rx_proc_rx_ind_hl() argument
2171 struct ath10k *ar = htt->ar; in ath10k_htt_rx_proc_rx_ind_hl()
2464 static bool ath10k_htt_rx_proc_rx_frag_ind_hl(struct ath10k_htt *htt, in ath10k_htt_rx_proc_rx_frag_ind_hl() argument
2468 struct ath10k *ar = htt->ar; in ath10k_htt_rx_proc_rx_frag_ind_hl()
2514 return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, in ath10k_htt_rx_proc_rx_frag_ind_hl()
2578 return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, in ath10k_htt_rx_proc_rx_frag_ind_hl()
2605 return ath10k_htt_rx_proc_rx_ind_hl(htt, &resp->rx_ind_hl, skb, in ath10k_htt_rx_proc_rx_frag_ind_hl()
2617 static void ath10k_htt_rx_proc_rx_ind_ll(struct ath10k_htt *htt, in ath10k_htt_rx_proc_rx_ind_ll() argument
2620 struct ath10k *ar = htt->ar; in ath10k_htt_rx_proc_rx_ind_ll()
2640 atomic_add(mpdu_count, &htt->num_mpdus_ready); in ath10k_htt_rx_proc_rx_ind_ll()
2649 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_tx_compl_ind() local
2718 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_rx_tx_compl_ind()
2719 } else if (!kfifo_put(&htt->txdone_fifo, tx_done)) { in ath10k_htt_rx_tx_compl_ind()
2722 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_rx_tx_compl_ind()
2906 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_h_rx_offload() local
2907 struct ieee80211_rx_status *status = &htt->rx_status; in ath10k_htt_rx_h_rx_offload()
2955 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_in_ord_ind() local
2957 struct ieee80211_rx_status *status = &htt->rx_status; in ath10k_htt_rx_in_ord_ind()
2968 lockdep_assert_held(&htt->rx_ring.lock); in ath10k_htt_rx_in_ord_ind()
2970 if (htt->rx_confused) in ath10k_htt_rx_in_ord_ind()
2998 ret = ath10k_htt_rx_pop_paddr64_list(htt, &resp->rx_in_ord_ind, in ath10k_htt_rx_in_ord_ind()
3001 ret = ath10k_htt_rx_pop_paddr32_list(htt, &resp->rx_in_ord_ind, in ath10k_htt_rx_in_ord_ind()
3006 htt->rx_confused = true; in ath10k_htt_rx_in_ord_ind()
3038 htt->rx_confused = true; in ath10k_htt_rx_in_ord_ind()
3109 if (!ar->htt.tx_q_state.enabled) { in ath10k_htt_rx_tx_fetch_ind()
3114 if (ar->htt.tx_q_state.mode == HTT_TX_MODE_SWITCH_PUSH) { in ath10k_htt_rx_tx_fetch_ind()
3133 if (unlikely(peer_id >= ar->htt.tx_q_state.num_peers) || in ath10k_htt_rx_tx_fetch_ind()
3134 unlikely(tid >= ar->htt.tx_q_state.num_tids)) { in ath10k_htt_rx_tx_fetch_ind()
3285 ar->htt.tx_q_state.enabled = enable; in ath10k_htt_rx_tx_mode_switch_ind()
3286 ar->htt.tx_q_state.mode = mode; in ath10k_htt_rx_tx_mode_switch_ind()
3287 ar->htt.tx_q_state.num_push_allowed = threshold; in ath10k_htt_rx_tx_mode_switch_ind()
3297 if (unlikely(peer_id >= ar->htt.tx_q_state.num_peers) || in ath10k_htt_rx_tx_mode_switch_ind()
3298 unlikely(tid >= ar->htt.tx_q_state.num_tids)) { in ath10k_htt_rx_tx_mode_switch_ind()
3318 spin_lock_bh(&ar->htt.tx_lock); in ath10k_htt_rx_tx_mode_switch_ind()
3321 spin_unlock_bh(&ar->htt.tx_lock); in ath10k_htt_rx_tx_mode_switch_ind()
3591 if (ar->htt.disable_tx_comp) { in ath10k_update_per_peer_tx_stats()
3764 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_t2h_msg_handler() local
3775 if (resp->hdr.msg_type >= ar->htt.t2h_msg_types_max) { in ath10k_htt_t2h_msg_handler()
3777 resp->hdr.msg_type, ar->htt.t2h_msg_types_max); in ath10k_htt_t2h_msg_handler()
3780 type = ar->htt.t2h_msg_types[resp->hdr.msg_type]; in ath10k_htt_t2h_msg_handler()
3784 htt->target_version_major = resp->ver_resp.major; in ath10k_htt_t2h_msg_handler()
3785 htt->target_version_minor = resp->ver_resp.minor; in ath10k_htt_t2h_msg_handler()
3786 complete(&htt->target_version_received); in ath10k_htt_t2h_msg_handler()
3791 ath10k_htt_rx_proc_rx_ind_ll(htt, &resp->rx_ind); in ath10k_htt_t2h_msg_handler()
3793 skb_queue_tail(&htt->rx_indication_head, skb); in ath10k_htt_t2h_msg_handler()
3803 ath10k_peer_map_event(htt, &ev); in ath10k_htt_t2h_msg_handler()
3810 ath10k_peer_unmap_event(htt, &ev); in ath10k_htt_t2h_msg_handler()
3815 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_t2h_msg_handler() local
3817 struct ath10k_htc_ep *ep = &ar->htc.endpoint[htt->eid]; in ath10k_htt_t2h_msg_handler()
3843 if (htt->disable_tx_comp) { in ath10k_htt_t2h_msg_handler()
3849 status = ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_t2h_msg_handler()
3851 spin_lock_bh(&htt->tx_lock); in ath10k_htt_t2h_msg_handler()
3852 ath10k_htt_tx_mgmt_dec_pending(htt); in ath10k_htt_t2h_msg_handler()
3853 spin_unlock_bh(&htt->tx_lock); in ath10k_htt_t2h_msg_handler()
3858 ath10k_htt_rx_tx_compl_ind(htt->ar, skb); in ath10k_htt_t2h_msg_handler()
3861 struct ath10k *ar = htt->ar; in ath10k_htt_t2h_msg_handler()
3876 atomic_inc(&htt->num_mpdus_ready); in ath10k_htt_t2h_msg_handler()
3878 return ath10k_htt_rx_proc_rx_frag_ind(htt, in ath10k_htt_t2h_msg_handler()
3920 skb_queue_tail(&htt->rx_in_ord_compl_q, skb); in ath10k_htt_t2h_msg_handler()
3924 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_t2h_msg_handler() local
3926 struct ath10k_htc_ep *ep = &ar->htc.endpoint[htt->eid]; in ath10k_htt_t2h_msg_handler()
3938 if (htt->disable_tx_comp) { in ath10k_htt_t2h_msg_handler()
3968 skb_queue_tail(&htt->tx_fetch_ind_q, tx_fetch_ind); in ath10k_htt_t2h_msg_handler()
4005 if (skb_queue_empty(&ar->htt.rx_msdus_q)) in ath10k_htt_rx_deliver_msdu()
4008 skb = skb_dequeue(&ar->htt.rx_msdus_q); in ath10k_htt_rx_deliver_msdu()
4021 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_rx_hl_indication() local
4027 skb = skb_dequeue(&htt->rx_indication_head); in ath10k_htt_rx_hl_indication()
4033 release = ath10k_htt_rx_proc_rx_ind_hl(htt, in ath10k_htt_rx_hl_indication()
4043 skb_queue_len(&htt->rx_indication_head)); in ath10k_htt_rx_hl_indication()
4051 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_txrx_compl_task() local
4070 while ((skb = skb_dequeue(&htt->rx_in_ord_compl_q))) { in ath10k_htt_txrx_compl_task()
4071 spin_lock_bh(&htt->rx_ring.lock); in ath10k_htt_txrx_compl_task()
4073 spin_unlock_bh(&htt->rx_ring.lock); in ath10k_htt_txrx_compl_task()
4082 while (atomic_read(&htt->num_mpdus_ready)) { in ath10k_htt_txrx_compl_task()
4083 ret = ath10k_htt_rx_handle_amsdu(htt); in ath10k_htt_txrx_compl_task()
4088 atomic_dec(&htt->num_mpdus_ready); in ath10k_htt_txrx_compl_task()
4099 if ((quota < budget) && !kfifo_is_empty(&htt->txdone_fifo)) in ath10k_htt_txrx_compl_task()
4107 while (kfifo_get(&htt->txdone_fifo, &tx_done)) in ath10k_htt_txrx_compl_task()
4108 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_txrx_compl_task()
4112 spin_lock_irqsave(&htt->tx_fetch_ind_q.lock, flags); in ath10k_htt_txrx_compl_task()
4113 skb_queue_splice_init(&htt->tx_fetch_ind_q, &tx_ind_q); in ath10k_htt_txrx_compl_task()
4114 spin_unlock_irqrestore(&htt->tx_fetch_ind_q.lock, flags); in ath10k_htt_txrx_compl_task()
4122 ath10k_htt_rx_msdu_buff_replenish(htt); in ath10k_htt_txrx_compl_task()
4152 void ath10k_htt_set_rx_ops(struct ath10k_htt *htt) in ath10k_htt_set_rx_ops() argument
4154 struct ath10k *ar = htt->ar; in ath10k_htt_set_rx_ops()
4157 htt->rx_ops = &htt_rx_ops_hl; in ath10k_htt_set_rx_ops()
4159 htt->rx_ops = &htt_rx_ops_64; in ath10k_htt_set_rx_ops()
4161 htt->rx_ops = &htt_rx_ops_32; in ath10k_htt_set_rx_ops()