Lines Matching refs:htt
51 lockdep_assert_held(&ar->htt.tx_lock); in __ath10k_htt_tx_txq_recalc()
53 if (!ar->htt.tx_q_state.enabled) in __ath10k_htt_tx_txq_recalc()
56 if (ar->htt.tx_q_state.mode != HTT_TX_MODE_SWITCH_PUSH_PULL) in __ath10k_htt_tx_txq_recalc()
73 if (unlikely(peer_id >= ar->htt.tx_q_state.num_peers) || in __ath10k_htt_tx_txq_recalc()
74 unlikely(tid >= ar->htt.tx_q_state.num_tids)) { in __ath10k_htt_tx_txq_recalc()
80 ar->htt.tx_q_state.vaddr->count[tid][peer_id] = count; in __ath10k_htt_tx_txq_recalc()
81 ar->htt.tx_q_state.vaddr->map[tid][idx] &= ~bit; in __ath10k_htt_tx_txq_recalc()
82 ar->htt.tx_q_state.vaddr->map[tid][idx] |= count ? bit : 0; in __ath10k_htt_tx_txq_recalc()
93 lockdep_assert_held(&ar->htt.tx_lock); in __ath10k_htt_tx_txq_sync()
95 if (!ar->htt.tx_q_state.enabled) in __ath10k_htt_tx_txq_sync()
98 if (ar->htt.tx_q_state.mode != HTT_TX_MODE_SWITCH_PUSH_PULL) in __ath10k_htt_tx_txq_sync()
101 seq = le32_to_cpu(ar->htt.tx_q_state.vaddr->seq); in __ath10k_htt_tx_txq_sync()
103 ar->htt.tx_q_state.vaddr->seq = cpu_to_le32(seq); in __ath10k_htt_tx_txq_sync()
108 size = sizeof(*ar->htt.tx_q_state.vaddr); in __ath10k_htt_tx_txq_sync()
110 ar->htt.tx_q_state.paddr, in __ath10k_htt_tx_txq_sync()
120 spin_lock_bh(&ar->htt.tx_lock); in ath10k_htt_tx_txq_recalc()
122 spin_unlock_bh(&ar->htt.tx_lock); in ath10k_htt_tx_txq_recalc()
127 spin_lock_bh(&ar->htt.tx_lock); in ath10k_htt_tx_txq_sync()
129 spin_unlock_bh(&ar->htt.tx_lock); in ath10k_htt_tx_txq_sync()
137 spin_lock_bh(&ar->htt.tx_lock); in ath10k_htt_tx_txq_update()
140 spin_unlock_bh(&ar->htt.tx_lock); in ath10k_htt_tx_txq_update()
143 void ath10k_htt_tx_dec_pending(struct ath10k_htt *htt) in ath10k_htt_tx_dec_pending() argument
145 lockdep_assert_held(&htt->tx_lock); in ath10k_htt_tx_dec_pending()
147 htt->num_pending_tx--; in ath10k_htt_tx_dec_pending()
148 if (htt->num_pending_tx == htt->max_num_pending_tx - 1) in ath10k_htt_tx_dec_pending()
149 ath10k_mac_tx_unlock(htt->ar, ATH10K_TX_PAUSE_Q_FULL); in ath10k_htt_tx_dec_pending()
152 int ath10k_htt_tx_inc_pending(struct ath10k_htt *htt) in ath10k_htt_tx_inc_pending() argument
154 lockdep_assert_held(&htt->tx_lock); in ath10k_htt_tx_inc_pending()
156 if (htt->num_pending_tx >= htt->max_num_pending_tx) in ath10k_htt_tx_inc_pending()
159 htt->num_pending_tx++; in ath10k_htt_tx_inc_pending()
160 if (htt->num_pending_tx == htt->max_num_pending_tx) in ath10k_htt_tx_inc_pending()
161 ath10k_mac_tx_lock(htt->ar, ATH10K_TX_PAUSE_Q_FULL); in ath10k_htt_tx_inc_pending()
166 int ath10k_htt_tx_mgmt_inc_pending(struct ath10k_htt *htt, bool is_mgmt, in ath10k_htt_tx_mgmt_inc_pending() argument
169 struct ath10k *ar = htt->ar; in ath10k_htt_tx_mgmt_inc_pending()
171 lockdep_assert_held(&htt->tx_lock); in ath10k_htt_tx_mgmt_inc_pending()
177 ar->hw_params.max_probe_resp_desc_thres < htt->num_pending_mgmt_tx) in ath10k_htt_tx_mgmt_inc_pending()
180 htt->num_pending_mgmt_tx++; in ath10k_htt_tx_mgmt_inc_pending()
185 void ath10k_htt_tx_mgmt_dec_pending(struct ath10k_htt *htt) in ath10k_htt_tx_mgmt_dec_pending() argument
187 lockdep_assert_held(&htt->tx_lock); in ath10k_htt_tx_mgmt_dec_pending()
189 if (!htt->ar->hw_params.max_probe_resp_desc_thres) in ath10k_htt_tx_mgmt_dec_pending()
192 htt->num_pending_mgmt_tx--; in ath10k_htt_tx_mgmt_dec_pending()
195 int ath10k_htt_tx_alloc_msdu_id(struct ath10k_htt *htt, struct sk_buff *skb) in ath10k_htt_tx_alloc_msdu_id() argument
197 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_msdu_id()
200 spin_lock_bh(&htt->tx_lock); in ath10k_htt_tx_alloc_msdu_id()
201 ret = idr_alloc(&htt->pending_tx, skb, 0, in ath10k_htt_tx_alloc_msdu_id()
202 htt->max_num_pending_tx, GFP_ATOMIC); in ath10k_htt_tx_alloc_msdu_id()
203 spin_unlock_bh(&htt->tx_lock); in ath10k_htt_tx_alloc_msdu_id()
210 void ath10k_htt_tx_free_msdu_id(struct ath10k_htt *htt, u16 msdu_id) in ath10k_htt_tx_free_msdu_id() argument
212 struct ath10k *ar = htt->ar; in ath10k_htt_tx_free_msdu_id()
214 lockdep_assert_held(&htt->tx_lock); in ath10k_htt_tx_free_msdu_id()
218 idr_remove(&htt->pending_tx, msdu_id); in ath10k_htt_tx_free_msdu_id()
221 static void ath10k_htt_tx_free_cont_txbuf_32(struct ath10k_htt *htt) in ath10k_htt_tx_free_cont_txbuf_32() argument
223 struct ath10k *ar = htt->ar; in ath10k_htt_tx_free_cont_txbuf_32()
226 if (!htt->txbuf.vaddr_txbuff_32) in ath10k_htt_tx_free_cont_txbuf_32()
229 size = htt->txbuf.size; in ath10k_htt_tx_free_cont_txbuf_32()
230 dma_free_coherent(ar->dev, size, htt->txbuf.vaddr_txbuff_32, in ath10k_htt_tx_free_cont_txbuf_32()
231 htt->txbuf.paddr); in ath10k_htt_tx_free_cont_txbuf_32()
232 htt->txbuf.vaddr_txbuff_32 = NULL; in ath10k_htt_tx_free_cont_txbuf_32()
235 static int ath10k_htt_tx_alloc_cont_txbuf_32(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_cont_txbuf_32() argument
237 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_cont_txbuf_32()
240 size = htt->max_num_pending_tx * in ath10k_htt_tx_alloc_cont_txbuf_32()
243 htt->txbuf.vaddr_txbuff_32 = dma_alloc_coherent(ar->dev, size, in ath10k_htt_tx_alloc_cont_txbuf_32()
244 &htt->txbuf.paddr, in ath10k_htt_tx_alloc_cont_txbuf_32()
246 if (!htt->txbuf.vaddr_txbuff_32) in ath10k_htt_tx_alloc_cont_txbuf_32()
249 htt->txbuf.size = size; in ath10k_htt_tx_alloc_cont_txbuf_32()
254 static void ath10k_htt_tx_free_cont_txbuf_64(struct ath10k_htt *htt) in ath10k_htt_tx_free_cont_txbuf_64() argument
256 struct ath10k *ar = htt->ar; in ath10k_htt_tx_free_cont_txbuf_64()
259 if (!htt->txbuf.vaddr_txbuff_64) in ath10k_htt_tx_free_cont_txbuf_64()
262 size = htt->txbuf.size; in ath10k_htt_tx_free_cont_txbuf_64()
263 dma_free_coherent(ar->dev, size, htt->txbuf.vaddr_txbuff_64, in ath10k_htt_tx_free_cont_txbuf_64()
264 htt->txbuf.paddr); in ath10k_htt_tx_free_cont_txbuf_64()
265 htt->txbuf.vaddr_txbuff_64 = NULL; in ath10k_htt_tx_free_cont_txbuf_64()
268 static int ath10k_htt_tx_alloc_cont_txbuf_64(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_cont_txbuf_64() argument
270 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_cont_txbuf_64()
273 size = htt->max_num_pending_tx * in ath10k_htt_tx_alloc_cont_txbuf_64()
276 htt->txbuf.vaddr_txbuff_64 = dma_alloc_coherent(ar->dev, size, in ath10k_htt_tx_alloc_cont_txbuf_64()
277 &htt->txbuf.paddr, in ath10k_htt_tx_alloc_cont_txbuf_64()
279 if (!htt->txbuf.vaddr_txbuff_64) in ath10k_htt_tx_alloc_cont_txbuf_64()
282 htt->txbuf.size = size; in ath10k_htt_tx_alloc_cont_txbuf_64()
287 static void ath10k_htt_tx_free_cont_frag_desc_32(struct ath10k_htt *htt) in ath10k_htt_tx_free_cont_frag_desc_32() argument
291 if (!htt->frag_desc.vaddr_desc_32) in ath10k_htt_tx_free_cont_frag_desc_32()
294 size = htt->max_num_pending_tx * in ath10k_htt_tx_free_cont_frag_desc_32()
297 dma_free_coherent(htt->ar->dev, in ath10k_htt_tx_free_cont_frag_desc_32()
299 htt->frag_desc.vaddr_desc_32, in ath10k_htt_tx_free_cont_frag_desc_32()
300 htt->frag_desc.paddr); in ath10k_htt_tx_free_cont_frag_desc_32()
302 htt->frag_desc.vaddr_desc_32 = NULL; in ath10k_htt_tx_free_cont_frag_desc_32()
305 static int ath10k_htt_tx_alloc_cont_frag_desc_32(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_cont_frag_desc_32() argument
307 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_cont_frag_desc_32()
313 size = htt->max_num_pending_tx * in ath10k_htt_tx_alloc_cont_frag_desc_32()
315 htt->frag_desc.vaddr_desc_32 = dma_alloc_coherent(ar->dev, size, in ath10k_htt_tx_alloc_cont_frag_desc_32()
316 &htt->frag_desc.paddr, in ath10k_htt_tx_alloc_cont_frag_desc_32()
318 if (!htt->frag_desc.vaddr_desc_32) { in ath10k_htt_tx_alloc_cont_frag_desc_32()
322 htt->frag_desc.size = size; in ath10k_htt_tx_alloc_cont_frag_desc_32()
327 static void ath10k_htt_tx_free_cont_frag_desc_64(struct ath10k_htt *htt) in ath10k_htt_tx_free_cont_frag_desc_64() argument
331 if (!htt->frag_desc.vaddr_desc_64) in ath10k_htt_tx_free_cont_frag_desc_64()
334 size = htt->max_num_pending_tx * in ath10k_htt_tx_free_cont_frag_desc_64()
337 dma_free_coherent(htt->ar->dev, in ath10k_htt_tx_free_cont_frag_desc_64()
339 htt->frag_desc.vaddr_desc_64, in ath10k_htt_tx_free_cont_frag_desc_64()
340 htt->frag_desc.paddr); in ath10k_htt_tx_free_cont_frag_desc_64()
342 htt->frag_desc.vaddr_desc_64 = NULL; in ath10k_htt_tx_free_cont_frag_desc_64()
345 static int ath10k_htt_tx_alloc_cont_frag_desc_64(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_cont_frag_desc_64() argument
347 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_cont_frag_desc_64()
353 size = htt->max_num_pending_tx * in ath10k_htt_tx_alloc_cont_frag_desc_64()
356 htt->frag_desc.vaddr_desc_64 = dma_alloc_coherent(ar->dev, size, in ath10k_htt_tx_alloc_cont_frag_desc_64()
357 &htt->frag_desc.paddr, in ath10k_htt_tx_alloc_cont_frag_desc_64()
359 if (!htt->frag_desc.vaddr_desc_64) { in ath10k_htt_tx_alloc_cont_frag_desc_64()
363 htt->frag_desc.size = size; in ath10k_htt_tx_alloc_cont_frag_desc_64()
368 static void ath10k_htt_tx_free_txq(struct ath10k_htt *htt) in ath10k_htt_tx_free_txq() argument
370 struct ath10k *ar = htt->ar; in ath10k_htt_tx_free_txq()
377 size = sizeof(*htt->tx_q_state.vaddr); in ath10k_htt_tx_free_txq()
379 dma_unmap_single(ar->dev, htt->tx_q_state.paddr, size, DMA_TO_DEVICE); in ath10k_htt_tx_free_txq()
380 kfree(htt->tx_q_state.vaddr); in ath10k_htt_tx_free_txq()
383 static int ath10k_htt_tx_alloc_txq(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_txq() argument
385 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_txq()
393 htt->tx_q_state.num_peers = HTT_TX_Q_STATE_NUM_PEERS; in ath10k_htt_tx_alloc_txq()
394 htt->tx_q_state.num_tids = HTT_TX_Q_STATE_NUM_TIDS; in ath10k_htt_tx_alloc_txq()
395 htt->tx_q_state.type = HTT_Q_DEPTH_TYPE_BYTES; in ath10k_htt_tx_alloc_txq()
397 size = sizeof(*htt->tx_q_state.vaddr); in ath10k_htt_tx_alloc_txq()
398 htt->tx_q_state.vaddr = kzalloc(size, GFP_KERNEL); in ath10k_htt_tx_alloc_txq()
399 if (!htt->tx_q_state.vaddr) in ath10k_htt_tx_alloc_txq()
402 htt->tx_q_state.paddr = dma_map_single(ar->dev, htt->tx_q_state.vaddr, in ath10k_htt_tx_alloc_txq()
404 ret = dma_mapping_error(ar->dev, htt->tx_q_state.paddr); in ath10k_htt_tx_alloc_txq()
407 kfree(htt->tx_q_state.vaddr); in ath10k_htt_tx_alloc_txq()
414 static void ath10k_htt_tx_free_txdone_fifo(struct ath10k_htt *htt) in ath10k_htt_tx_free_txdone_fifo() argument
416 WARN_ON(!kfifo_is_empty(&htt->txdone_fifo)); in ath10k_htt_tx_free_txdone_fifo()
417 kfifo_free(&htt->txdone_fifo); in ath10k_htt_tx_free_txdone_fifo()
420 static int ath10k_htt_tx_alloc_txdone_fifo(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_txdone_fifo() argument
425 size = roundup_pow_of_two(htt->max_num_pending_tx); in ath10k_htt_tx_alloc_txdone_fifo()
426 ret = kfifo_alloc(&htt->txdone_fifo, size, GFP_KERNEL); in ath10k_htt_tx_alloc_txdone_fifo()
430 static int ath10k_htt_tx_alloc_buf(struct ath10k_htt *htt) in ath10k_htt_tx_alloc_buf() argument
432 struct ath10k *ar = htt->ar; in ath10k_htt_tx_alloc_buf()
435 ret = ath10k_htt_alloc_txbuff(htt); in ath10k_htt_tx_alloc_buf()
441 ret = ath10k_htt_alloc_frag_desc(htt); in ath10k_htt_tx_alloc_buf()
447 ret = ath10k_htt_tx_alloc_txq(htt); in ath10k_htt_tx_alloc_buf()
453 ret = ath10k_htt_tx_alloc_txdone_fifo(htt); in ath10k_htt_tx_alloc_buf()
462 ath10k_htt_tx_free_txq(htt); in ath10k_htt_tx_alloc_buf()
465 ath10k_htt_free_frag_desc(htt); in ath10k_htt_tx_alloc_buf()
468 ath10k_htt_free_txbuff(htt); in ath10k_htt_tx_alloc_buf()
473 int ath10k_htt_tx_start(struct ath10k_htt *htt) in ath10k_htt_tx_start() argument
475 struct ath10k *ar = htt->ar; in ath10k_htt_tx_start()
479 htt->max_num_pending_tx); in ath10k_htt_tx_start()
481 spin_lock_init(&htt->tx_lock); in ath10k_htt_tx_start()
482 idr_init(&htt->pending_tx); in ath10k_htt_tx_start()
484 if (htt->tx_mem_allocated) in ath10k_htt_tx_start()
490 ret = ath10k_htt_tx_alloc_buf(htt); in ath10k_htt_tx_start()
494 htt->tx_mem_allocated = true; in ath10k_htt_tx_start()
499 idr_destroy(&htt->pending_tx); in ath10k_htt_tx_start()
507 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_tx_clean_up_pending() local
515 ath10k_txrx_tx_unref(htt, &tx_done); in ath10k_htt_tx_clean_up_pending()
520 void ath10k_htt_tx_destroy(struct ath10k_htt *htt) in ath10k_htt_tx_destroy() argument
522 if (!htt->tx_mem_allocated) in ath10k_htt_tx_destroy()
525 ath10k_htt_free_txbuff(htt); in ath10k_htt_tx_destroy()
526 ath10k_htt_tx_free_txq(htt); in ath10k_htt_tx_destroy()
527 ath10k_htt_free_frag_desc(htt); in ath10k_htt_tx_destroy()
528 ath10k_htt_tx_free_txdone_fifo(htt); in ath10k_htt_tx_destroy()
529 htt->tx_mem_allocated = false; in ath10k_htt_tx_destroy()
532 static void ath10k_htt_flush_tx_queue(struct ath10k_htt *htt) in ath10k_htt_flush_tx_queue() argument
534 ath10k_htc_stop_hl(htt->ar); in ath10k_htt_flush_tx_queue()
535 idr_for_each(&htt->pending_tx, ath10k_htt_tx_clean_up_pending, htt->ar); in ath10k_htt_flush_tx_queue()
538 void ath10k_htt_tx_stop(struct ath10k_htt *htt) in ath10k_htt_tx_stop() argument
540 ath10k_htt_flush_tx_queue(htt); in ath10k_htt_tx_stop()
541 idr_destroy(&htt->pending_tx); in ath10k_htt_tx_stop()
544 void ath10k_htt_tx_free(struct ath10k_htt *htt) in ath10k_htt_tx_free() argument
546 ath10k_htt_tx_stop(htt); in ath10k_htt_tx_free()
547 ath10k_htt_tx_destroy(htt); in ath10k_htt_tx_free()
557 struct ath10k_htt *htt = &ar->htt; in ath10k_htt_htc_tx_complete() local
564 if (htt->disable_tx_comp) { in ath10k_htt_htc_tx_complete()
577 if ((!htt->disable_tx_comp) || (msg_type != HTT_H2T_MSG_TYPE_TX_FRM)) in ath10k_htt_htc_tx_complete()
589 ath10k_txrx_tx_unref(&ar->htt, &tx_done); in ath10k_htt_htc_tx_complete()
598 int ath10k_htt_h2t_ver_req_msg(struct ath10k_htt *htt) in ath10k_htt_h2t_ver_req_msg() argument
600 struct ath10k *ar = htt->ar; in ath10k_htt_h2t_ver_req_msg()
617 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_h2t_ver_req_msg()
626 int ath10k_htt_h2t_stats_req(struct ath10k_htt *htt, u32 mask, u32 reset_mask, in ath10k_htt_h2t_stats_req() argument
629 struct ath10k *ar = htt->ar; in ath10k_htt_h2t_stats_req()
659 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_h2t_stats_req()
670 static int ath10k_htt_send_frag_desc_bank_cfg_32(struct ath10k_htt *htt) in ath10k_htt_send_frag_desc_bank_cfg_32() argument
672 struct ath10k *ar = htt->ar; in ath10k_htt_send_frag_desc_bank_cfg_32()
682 if (!htt->frag_desc.paddr) { in ath10k_htt_send_frag_desc_bank_cfg_32()
697 info |= SM(htt->tx_q_state.type, in ath10k_htt_send_frag_desc_bank_cfg_32()
708 cfg->bank_base_addrs[0] = __cpu_to_le32(htt->frag_desc.paddr); in ath10k_htt_send_frag_desc_bank_cfg_32()
710 cfg->bank_id[0].bank_max_id = __cpu_to_le16(htt->max_num_pending_tx - in ath10k_htt_send_frag_desc_bank_cfg_32()
713 cfg->q_state.paddr = cpu_to_le32(htt->tx_q_state.paddr); in ath10k_htt_send_frag_desc_bank_cfg_32()
714 cfg->q_state.num_peers = cpu_to_le16(htt->tx_q_state.num_peers); in ath10k_htt_send_frag_desc_bank_cfg_32()
715 cfg->q_state.num_tids = cpu_to_le16(htt->tx_q_state.num_tids); in ath10k_htt_send_frag_desc_bank_cfg_32()
721 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_send_frag_desc_bank_cfg_32()
732 static int ath10k_htt_send_frag_desc_bank_cfg_64(struct ath10k_htt *htt) in ath10k_htt_send_frag_desc_bank_cfg_64() argument
734 struct ath10k *ar = htt->ar; in ath10k_htt_send_frag_desc_bank_cfg_64()
744 if (!htt->frag_desc.paddr) { in ath10k_htt_send_frag_desc_bank_cfg_64()
759 info |= SM(htt->tx_q_state.type, in ath10k_htt_send_frag_desc_bank_cfg_64()
770 cfg->bank_base_addrs[0] = __cpu_to_le64(htt->frag_desc.paddr); in ath10k_htt_send_frag_desc_bank_cfg_64()
772 cfg->bank_id[0].bank_max_id = __cpu_to_le16(htt->max_num_pending_tx - in ath10k_htt_send_frag_desc_bank_cfg_64()
775 cfg->q_state.paddr = cpu_to_le32(htt->tx_q_state.paddr); in ath10k_htt_send_frag_desc_bank_cfg_64()
776 cfg->q_state.num_peers = cpu_to_le16(htt->tx_q_state.num_peers); in ath10k_htt_send_frag_desc_bank_cfg_64()
777 cfg->q_state.num_tids = cpu_to_le16(htt->tx_q_state.num_tids); in ath10k_htt_send_frag_desc_bank_cfg_64()
783 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_send_frag_desc_bank_cfg_64()
832 static int ath10k_htt_send_rx_ring_cfg_32(struct ath10k_htt *htt) in ath10k_htt_send_rx_ring_cfg_32() argument
834 struct ath10k *ar = htt->ar; in ath10k_htt_send_rx_ring_cfg_32()
884 fw_idx = __le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr); in ath10k_htt_send_rx_ring_cfg_32()
887 __cpu_to_le32(htt->rx_ring.alloc_idx.paddr); in ath10k_htt_send_rx_ring_cfg_32()
888 ring->rx_ring_base_paddr = __cpu_to_le32(htt->rx_ring.base_paddr); in ath10k_htt_send_rx_ring_cfg_32()
889 ring->rx_ring_len = __cpu_to_le16(htt->rx_ring.size); in ath10k_htt_send_rx_ring_cfg_32()
895 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_send_rx_ring_cfg_32()
904 static int ath10k_htt_send_rx_ring_cfg_64(struct ath10k_htt *htt) in ath10k_htt_send_rx_ring_cfg_64() argument
906 struct ath10k *ar = htt->ar; in ath10k_htt_send_rx_ring_cfg_64()
954 fw_idx = __le32_to_cpu(*htt->rx_ring.alloc_idx.vaddr); in ath10k_htt_send_rx_ring_cfg_64()
956 ring->fw_idx_shadow_reg_paddr = __cpu_to_le64(htt->rx_ring.alloc_idx.paddr); in ath10k_htt_send_rx_ring_cfg_64()
957 ring->rx_ring_base_paddr = __cpu_to_le64(htt->rx_ring.base_paddr); in ath10k_htt_send_rx_ring_cfg_64()
958 ring->rx_ring_len = __cpu_to_le16(htt->rx_ring.size); in ath10k_htt_send_rx_ring_cfg_64()
964 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_send_rx_ring_cfg_64()
973 static int ath10k_htt_send_rx_ring_cfg_hl(struct ath10k_htt *htt) in ath10k_htt_send_rx_ring_cfg_hl() argument
975 struct ath10k *ar = htt->ar; in ath10k_htt_send_rx_ring_cfg_hl()
1015 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_send_rx_ring_cfg_hl()
1024 static int ath10k_htt_h2t_aggr_cfg_msg_32(struct ath10k_htt *htt, in ath10k_htt_h2t_aggr_cfg_msg_32() argument
1028 struct ath10k *ar = htt->ar; in ath10k_htt_h2t_aggr_cfg_msg_32()
1062 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_h2t_aggr_cfg_msg_32()
1071 static int ath10k_htt_h2t_aggr_cfg_msg_v2(struct ath10k_htt *htt, in ath10k_htt_h2t_aggr_cfg_msg_v2() argument
1075 struct ath10k *ar = htt->ar; in ath10k_htt_h2t_aggr_cfg_msg_v2()
1109 ret = ath10k_htc_send(&htt->ar->htc, htt->eid, skb); in ath10k_htt_h2t_aggr_cfg_msg_v2()
1153 ret = ath10k_htc_send(&ar->htc, ar->htt.eid, skb); in ath10k_htt_tx_fetch_resp()
1198 int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) in ath10k_htt_mgmt_tx() argument
1200 struct ath10k *ar = htt->ar; in ath10k_htt_mgmt_tx()
1215 res = ath10k_htt_tx_alloc_msdu_id(htt, msdu); in ath10k_htt_mgmt_tx()
1263 res = ath10k_htc_send(&htt->ar->htc, htt->eid, txdesc); in ath10k_htt_mgmt_tx()
1275 spin_lock_bh(&htt->tx_lock); in ath10k_htt_mgmt_tx()
1276 ath10k_htt_tx_free_msdu_id(htt, msdu_id); in ath10k_htt_mgmt_tx()
1277 spin_unlock_bh(&htt->tx_lock); in ath10k_htt_mgmt_tx()
1287 static int ath10k_htt_tx_hl(struct ath10k_htt *htt, enum ath10k_hw_txrx_mode txmode, in ath10k_htt_tx_hl() argument
1290 struct ath10k *ar = htt->ar; in ath10k_htt_tx_hl()
1326 if (htt->disable_tx_comp) in ath10k_htt_tx_hl()
1348 ath10k_dbg(htt->ar, ATH10K_DBG_HTT, in ath10k_htt_tx_hl()
1354 ath10k_warn(htt->ar, "htt hl tx: Unable to realloc skb!\n"); in ath10k_htt_tx_hl()
1362 res = ath10k_htt_tx_alloc_msdu_id(htt, msdu); in ath10k_htt_tx_hl()
1393 res = ath10k_htc_send_hl(&htt->ar->htc, htt->eid, msdu); in ath10k_htt_tx_hl()
1399 static int ath10k_htt_tx_32(struct ath10k_htt *htt, in ath10k_htt_tx_32() argument
1403 struct ath10k *ar = htt->ar; in ath10k_htt_tx_32()
1424 res = ath10k_htt_tx_alloc_msdu_id(htt, msdu); in ath10k_htt_tx_32()
1430 prefetch_len = min(htt->prefetch_len, msdu->len); in ath10k_htt_tx_32()
1433 txbuf = htt->txbuf.vaddr_txbuff_32 + msdu_id; in ath10k_htt_tx_32()
1434 txbuf_paddr = htt->txbuf.paddr + in ath10k_htt_tx_32()
1466 ext_desc_t = htt->frag_desc.vaddr_desc_32; in ath10k_htt_tx_32()
1477 frags_paddr = htt->frag_desc.paddr + in ath10k_htt_tx_32()
1517 txbuf->htc_hdr.eid = htt->eid; in ath10k_htt_tx_32()
1583 res = ath10k_hif_tx_sg(htt->ar, in ath10k_htt_tx_32()
1584 htt->ar->htc.endpoint[htt->eid].ul_pipe_id, in ath10k_htt_tx_32()
1594 spin_lock_bh(&htt->tx_lock); in ath10k_htt_tx_32()
1595 ath10k_htt_tx_free_msdu_id(htt, msdu_id); in ath10k_htt_tx_32()
1596 spin_unlock_bh(&htt->tx_lock); in ath10k_htt_tx_32()
1601 static int ath10k_htt_tx_64(struct ath10k_htt *htt, in ath10k_htt_tx_64() argument
1605 struct ath10k *ar = htt->ar; in ath10k_htt_tx_64()
1626 res = ath10k_htt_tx_alloc_msdu_id(htt, msdu); in ath10k_htt_tx_64()
1632 prefetch_len = min(htt->prefetch_len, msdu->len); in ath10k_htt_tx_64()
1635 txbuf = htt->txbuf.vaddr_txbuff_64 + msdu_id; in ath10k_htt_tx_64()
1636 txbuf_paddr = htt->txbuf.paddr + in ath10k_htt_tx_64()
1668 ext_desc_t = htt->frag_desc.vaddr_desc_64; in ath10k_htt_tx_64()
1680 frags_paddr = htt->frag_desc.paddr + in ath10k_htt_tx_64()
1721 txbuf->htc_hdr.eid = htt->eid; in ath10k_htt_tx_64()
1792 res = ath10k_hif_tx_sg(htt->ar, in ath10k_htt_tx_64()
1793 htt->ar->htc.endpoint[htt->eid].ul_pipe_id, in ath10k_htt_tx_64()
1803 spin_lock_bh(&htt->tx_lock); in ath10k_htt_tx_64()
1804 ath10k_htt_tx_free_msdu_id(htt, msdu_id); in ath10k_htt_tx_64()
1805 spin_unlock_bh(&htt->tx_lock); in ath10k_htt_tx_64()
1840 void ath10k_htt_set_tx_ops(struct ath10k_htt *htt) in ath10k_htt_set_tx_ops() argument
1842 struct ath10k *ar = htt->ar; in ath10k_htt_set_tx_ops()
1845 htt->tx_ops = &htt_tx_ops_hl; in ath10k_htt_set_tx_ops()
1847 htt->tx_ops = &htt_tx_ops_64; in ath10k_htt_set_tx_ops()
1849 htt->tx_ops = &htt_tx_ops_32; in ath10k_htt_set_tx_ops()