Lines Matching refs:pipe_info
72 QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info);
2184 struct HIF_CE_pipe_info *pipe_info = in ce_oom_recovery() local
2185 &ce_softc->pipe_info[ce_state->id]; in ce_oom_recovery()
2187 hif_post_recv_buffers_for_pipe(pipe_info); in ce_oom_recovery()
2919 struct HIF_CE_pipe_info *pipe_info = &hif_state->pipe_info[ce_id]; in hif_ce_rx_nbuf_alloc() local
2925 nbuf = qdf_nbuf_alloc(scn->qdf_dev, pipe_info->buf_sz, in hif_ce_rx_nbuf_alloc()
2986 struct HIF_CE_pipe_info *pipe_info; in hif_ce_rx_wbuff_register() local
2991 pipe_info = &hif_state->pipe_info[ce_id]; in hif_ce_rx_wbuff_register()
2994 if (!pipe_info->buf_sz) in hif_ce_rx_wbuff_register()
3000 if (!atomic_read(&pipe_info->recv_bufs_needed)) in hif_ce_rx_wbuff_register()
3004 wbuff_alloc[ce_id].buffer_size = pipe_info->buf_sz; in hif_ce_rx_wbuff_register()
3024 struct HIF_CE_pipe_info *pipe_info = &hif_state->pipe_info[ce_id]; in hif_ce_rx_nbuf_alloc() local
3026 return qdf_nbuf_alloc(scn->qdf_dev, pipe_info->buf_sz, 0, 4, false); in hif_ce_rx_nbuf_alloc()
3203 struct HIF_CE_pipe_info *pipe_info = in hif_update_fastpath_recv_bufs_cnt() local
3204 &hif_state->pipe_info[pipe_num]; in hif_update_fastpath_recv_bufs_cnt()
3206 scn->ce_id_to_state[pipe_info->pipe_num]; in hif_update_fastpath_recv_bufs_cnt()
3209 atomic_inc(&pipe_info->recv_bufs_needed); in hif_update_fastpath_recv_bufs_cnt()
3322 struct HIF_CE_pipe_info *pipe_info = &(hif_state->pipe_info[pipe]); in hif_send_head() local
3323 struct CE_handle *ce_hdl = pipe_info->ce_hdl; in hif_send_head()
3379 qdf_spin_lock_bh(&pipe_info->completion_freeq_lock); in hif_send_head()
3380 if (pipe_info->num_sends_allowed < nfrags) { in hif_send_head()
3381 qdf_spin_unlock_bh(&pipe_info->completion_freeq_lock); in hif_send_head()
3385 pipe_info->num_sends_allowed -= nfrags; in hif_send_head()
3386 qdf_spin_unlock_bh(&pipe_info->completion_freeq_lock); in hif_send_head()
3441 struct HIF_CE_pipe_info *pipe_info; in hif_register_ce_custom_cb() local
3446 pipe_info = &hif_state->pipe_info[pipe]; in hif_register_ce_custom_cb()
3447 ce_register_custom_cb(pipe_info->ce_hdl, custom_cb, custom_cb_context); in hif_register_ce_custom_cb()
3457 struct HIF_CE_pipe_info *pipe_info; in hif_unregister_ce_custom_cb() local
3462 pipe_info = &hif_state->pipe_info[pipe]; in hif_unregister_ce_custom_cb()
3463 ce_unregister_custom_cb(pipe_info->ce_hdl); in hif_unregister_ce_custom_cb()
3473 struct HIF_CE_pipe_info *pipe_info; in hif_enable_ce_custom_cb() local
3478 pipe_info = &hif_state->pipe_info[pipe]; in hif_enable_ce_custom_cb()
3479 ce_enable_custom_cb(pipe_info->ce_hdl); in hif_enable_ce_custom_cb()
3490 struct HIF_CE_pipe_info *pipe_info; in hif_disable_ce_custom_cb() local
3495 pipe_info = &hif_state->pipe_info[pipe]; in hif_disable_ce_custom_cb()
3496 ce_disable_custom_cb(pipe_info->ce_hdl); in hif_disable_ce_custom_cb()
3539 struct HIF_CE_pipe_info *pipe_info = &(hif_state->pipe_info[pipe]); in hif_get_free_queue_number() local
3542 qdf_spin_lock_bh(&pipe_info->completion_freeq_lock); in hif_get_free_queue_number()
3543 rv = pipe_info->num_sends_allowed; in hif_get_free_queue_number()
3544 qdf_spin_unlock_bh(&pipe_info->completion_freeq_lock); in hif_get_free_queue_number()
3556 struct HIF_CE_pipe_info *pipe_info = in hif_pci_ce_send_done() local
3560 &pipe_info->pipe_callbacks; in hif_pci_ce_send_done()
3573 qdf_spin_lock_bh(&pipe_info->completion_freeq_lock); in hif_pci_ce_send_done()
3574 pipe_info->num_sends_allowed++; in hif_pci_ce_send_done()
3575 qdf_spin_unlock_bh(&pipe_info->completion_freeq_lock); in hif_pci_ce_send_done()
3597 struct HIF_CE_pipe_info *pipe_info) { in hif_ce_do_recv() argument
3598 if (nbytes <= pipe_info->buf_sz) { in hif_ce_do_recv()
3602 netbuf, pipe_info->pipe_num); in hif_ce_do_recv()
3643 struct HIF_CE_pipe_info *pipe_info = in hif_pci_ce_recv_data() local
3645 struct HIF_CE_state *hif_state = pipe_info->HIF_CE_state; in hif_pci_ce_recv_data()
3648 struct hif_msg_callbacks *msg_callbacks = &pipe_info->pipe_callbacks; in hif_pci_ce_recv_data()
3656 atomic_inc(&pipe_info->recv_bufs_needed); in hif_pci_ce_recv_data()
3657 hif_post_recv_buffers_for_pipe(pipe_info); in hif_pci_ce_recv_data()
3662 nbytes, pipe_info); in hif_pci_ce_recv_data()
3702 struct HIF_CE_pipe_info *pipe_info; in hif_completion_thread_startup_by_ceid() local
3708 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_completion_thread_startup_by_ceid()
3722 pipe_num, pipe_info); in hif_completion_thread_startup_by_ceid()
3723 ce_send_cb_register(pipe_info->ce_hdl, in hif_completion_thread_startup_by_ceid()
3724 hif_pci_ce_send_done, pipe_info, in hif_completion_thread_startup_by_ceid()
3726 pipe_info->num_sends_allowed = attr.src_nentries - 1; in hif_completion_thread_startup_by_ceid()
3730 pipe_num, pipe_info); in hif_completion_thread_startup_by_ceid()
3732 ce_recv_cb_register(pipe_info->ce_hdl, in hif_completion_thread_startup_by_ceid()
3733 hif_pci_ce_recv_data, pipe_info, in hif_completion_thread_startup_by_ceid()
3738 qdf_spinlock_create(&pipe_info->completion_freeq_lock); in hif_completion_thread_startup_by_ceid()
3741 qdf_mem_copy(&pipe_info->pipe_callbacks, hif_msg_callbacks, in hif_completion_thread_startup_by_ceid()
3742 sizeof(pipe_info->pipe_callbacks)); in hif_completion_thread_startup_by_ceid()
3763 struct HIF_CE_pipe_info *pipe_info; in hif_completion_thread_startup() local
3765 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_completion_thread_startup()
3766 if (pipe_info->ce_hdl == ce_diag) in hif_completion_thread_startup()
3824 struct HIF_CE_pipe_info *pipe_info; in hif_dump_pipe_debug_count() local
3826 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_dump_pipe_debug_count()
3828 if (pipe_info->nbuf_alloc_err_count > 0 || in hif_dump_pipe_debug_count()
3829 pipe_info->nbuf_dma_err_count > 0 || in hif_dump_pipe_debug_count()
3830 pipe_info->nbuf_ce_enqueue_err_count) in hif_dump_pipe_debug_count()
3833 pipe_info->pipe_num, in hif_dump_pipe_debug_count()
3834 atomic_read(&pipe_info->recv_bufs_needed), in hif_dump_pipe_debug_count()
3835 pipe_info->nbuf_alloc_err_count, in hif_dump_pipe_debug_count()
3836 pipe_info->nbuf_dma_err_count, in hif_dump_pipe_debug_count()
3837 pipe_info->nbuf_ce_enqueue_err_count); in hif_dump_pipe_debug_count()
3841 static void hif_post_recv_buffers_failure(struct HIF_CE_pipe_info *pipe_info, in hif_post_recv_buffers_failure() argument
3846 int bufs_needed_tmp = atomic_inc_return(&pipe_info->recv_bufs_needed); in hif_post_recv_buffers_failure()
3847 struct CE_state *CE_state = (struct CE_state *)pipe_info->ce_hdl; in hif_post_recv_buffers_failure()
3848 struct hif_softc *scn = HIF_GET_SOFTC(pipe_info->HIF_CE_state); in hif_post_recv_buffers_failure()
3852 qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock); in hif_post_recv_buffers_failure()
3854 qdf_spin_unlock_bh(&pipe_info->recv_bufs_needed_lock); in hif_post_recv_buffers_failure()
3856 pipe_info->pipe_num, bufs_needed_tmp, error_cnt_tmp, in hif_post_recv_buffers_failure()
3875 QDF_STATUS hif_post_recv_buffers_for_pipe(struct HIF_CE_pipe_info *pipe_info) in hif_post_recv_buffers_for_pipe() argument
3879 struct hif_softc *scn = HIF_GET_SOFTC(pipe_info->HIF_CE_state); in hif_post_recv_buffers_for_pipe()
3884 buf_sz = pipe_info->buf_sz; in hif_post_recv_buffers_for_pipe()
3890 ce_hdl = pipe_info->ce_hdl; in hif_post_recv_buffers_for_pipe()
3898 qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock); in hif_post_recv_buffers_for_pipe()
3899 while (atomic_read(&pipe_info->recv_bufs_needed) > 0) { in hif_post_recv_buffers_for_pipe()
3903 atomic_dec(&pipe_info->recv_bufs_needed); in hif_post_recv_buffers_for_pipe()
3904 qdf_spin_unlock_bh(&pipe_info->recv_bufs_needed_lock); in hif_post_recv_buffers_for_pipe()
3911 hif_post_recv_buffers_failure(pipe_info, nbuf, in hif_post_recv_buffers_for_pipe()
3912 &pipe_info->nbuf_alloc_err_count, in hif_post_recv_buffers_for_pipe()
3930 hif_post_recv_buffers_failure(pipe_info, nbuf, in hif_post_recv_buffers_for_pipe()
3931 &pipe_info->nbuf_dma_err_count, in hif_post_recv_buffers_for_pipe()
3946 hif_post_recv_buffers_failure(pipe_info, nbuf, in hif_post_recv_buffers_for_pipe()
3947 &pipe_info->nbuf_ce_enqueue_err_count, in hif_post_recv_buffers_for_pipe()
3957 qdf_spin_lock_bh(&pipe_info->recv_bufs_needed_lock); in hif_post_recv_buffers_for_pipe()
3960 pipe_info->nbuf_alloc_err_count = in hif_post_recv_buffers_for_pipe()
3961 (pipe_info->nbuf_alloc_err_count > bufs_posted) ? in hif_post_recv_buffers_for_pipe()
3962 pipe_info->nbuf_alloc_err_count - bufs_posted : 0; in hif_post_recv_buffers_for_pipe()
3963 pipe_info->nbuf_dma_err_count = in hif_post_recv_buffers_for_pipe()
3964 (pipe_info->nbuf_dma_err_count > bufs_posted) ? in hif_post_recv_buffers_for_pipe()
3965 pipe_info->nbuf_dma_err_count - bufs_posted : 0; in hif_post_recv_buffers_for_pipe()
3966 pipe_info->nbuf_ce_enqueue_err_count = in hif_post_recv_buffers_for_pipe()
3967 (pipe_info->nbuf_ce_enqueue_err_count > bufs_posted) ? in hif_post_recv_buffers_for_pipe()
3968 pipe_info->nbuf_ce_enqueue_err_count - bufs_posted : 0; in hif_post_recv_buffers_for_pipe()
3970 qdf_spin_unlock_bh(&pipe_info->recv_bufs_needed_lock); in hif_post_recv_buffers_for_pipe()
3982 struct HIF_CE_pipe_info *pipe_info; in hif_alloc_pages_for_direct_link_recv_pipe() local
3997 pipe_info = &hif_ce_state->pipe_info[pipe_num]; in hif_alloc_pages_for_direct_link_recv_pipe()
3998 recv_bufs_needed = atomic_read(&pipe_info->recv_bufs_needed); in hif_alloc_pages_for_direct_link_recv_pipe()
4000 if (!pipe_info->buf_sz || !recv_bufs_needed) in hif_alloc_pages_for_direct_link_recv_pipe()
4013 pipe_info->buf_sz, recv_bufs_needed, in hif_alloc_pages_for_direct_link_recv_pipe()
4021 dma_addr += (i % num_elem_per_page) * pipe_info->buf_sz; in hif_alloc_pages_for_direct_link_recv_pipe()
4022 ce_recv_buf_enqueue(pipe_info->ce_hdl, NULL, dma_addr); in hif_alloc_pages_for_direct_link_recv_pipe()
4074 struct HIF_CE_pipe_info *pipe_info; in hif_post_recv_buffers() local
4082 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_post_recv_buffers()
4101 qdf_status = hif_post_recv_buffers_for_pipe(pipe_info); in hif_post_recv_buffers()
4144 static void hif_recv_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info) in hif_recv_buffer_cleanup_on_pipe() argument
4155 buf_sz = pipe_info->buf_sz; in hif_recv_buffer_cleanup_on_pipe()
4161 hif_state = pipe_info->HIF_CE_state; in hif_recv_buffer_cleanup_on_pipe()
4166 ce_hdl = pipe_info->ce_hdl; in hif_recv_buffer_cleanup_on_pipe()
4172 pipe_info->pipe_num); in hif_recv_buffer_cleanup_on_pipe()
4187 static void hif_send_buffer_cleanup_on_pipe(struct HIF_CE_pipe_info *pipe_info) in hif_send_buffer_cleanup_on_pipe() argument
4200 buf_sz = pipe_info->buf_sz; in hif_send_buffer_cleanup_on_pipe()
4206 hif_state = pipe_info->HIF_CE_state; in hif_send_buffer_cleanup_on_pipe()
4213 ce_hdl = pipe_info->ce_hdl; in hif_send_buffer_cleanup_on_pipe()
4233 if (pipe_info->pipe_callbacks.txCompletionHandler) in hif_send_buffer_cleanup_on_pipe()
4234 pipe_info->pipe_callbacks. in hif_send_buffer_cleanup_on_pipe()
4235 txCompletionHandler(pipe_info-> in hif_send_buffer_cleanup_on_pipe()
4257 struct HIF_CE_pipe_info *pipe_info; in hif_buffer_cleanup() local
4266 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_buffer_cleanup()
4267 hif_recv_buffer_cleanup_on_pipe(pipe_info); in hif_buffer_cleanup()
4268 hif_send_buffer_cleanup_on_pipe(pipe_info); in hif_buffer_cleanup()
4322 struct HIF_CE_pipe_info *pipe_info; in hif_ce_stop() local
4326 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_ce_stop()
4327 if (pipe_info->ce_hdl) { in hif_ce_stop()
4328 if (pipe_info->ce_hdl != ce_diag && in hif_ce_stop()
4332 qdf_spinlock_destroy(&pipe_info-> in hif_ce_stop()
4335 ce_fini(pipe_info->ce_hdl); in hif_ce_stop()
4336 pipe_info->ce_hdl = NULL; in hif_ce_stop()
4337 pipe_info->buf_sz = 0; in hif_ce_stop()
4338 qdf_spinlock_destroy(&pipe_info->recv_bufs_needed_lock); in hif_ce_stop()
5077 struct HIF_CE_pipe_info *pipe_info; in hif_unconfig_ce() local
5082 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_unconfig_ce()
5083 if (pipe_info->ce_hdl) { in hif_unconfig_ce()
5089 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_unconfig_ce()
5090 if (pipe_info->ce_hdl) { in hif_unconfig_ce()
5091 ce_fini(pipe_info->ce_hdl); in hif_unconfig_ce()
5092 pipe_info->ce_hdl = NULL; in hif_unconfig_ce()
5093 pipe_info->buf_sz = 0; in hif_unconfig_ce()
5094 qdf_spinlock_destroy(&pipe_info->recv_bufs_needed_lock); in hif_unconfig_ce()
5247 struct HIF_CE_pipe_info *pipe_info; in hif_config_ce_by_id() local
5255 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_config_ce_by_id()
5256 pipe_info->pipe_num = pipe_num; in hif_config_ce_by_id()
5257 pipe_info->HIF_CE_state = hif_state; in hif_config_ce_by_id()
5267 pipe_info->ce_hdl = ce_init(scn, pipe_num, attr); in hif_config_ce_by_id()
5274 qdf_spinlock_create(&pipe_info->recv_bufs_needed_lock); in hif_config_ce_by_id()
5275 QDF_ASSERT(pipe_info->ce_hdl); in hif_config_ce_by_id()
5276 if (!pipe_info->ce_hdl) { in hif_config_ce_by_id()
5288 hif_state->ce_diag = pipe_info->ce_hdl; in hif_config_ce_by_id()
5297 pipe_info->buf_sz = (qdf_size_t)(attr->src_sz_max); in hif_config_ce_by_id()
5299 atomic_set(&pipe_info->recv_bufs_needed, in hif_config_ce_by_id()
5303 atomic_dec(&pipe_info->recv_bufs_needed); in hif_config_ce_by_id()
5305 atomic_set(&pipe_info->recv_bufs_needed, 0); in hif_config_ce_by_id()
5350 struct HIF_CE_pipe_info *pipe_info; in hif_config_ce() local
5380 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_config_ce()
5433 struct HIF_CE_pipe_info *pipe_info; in hif_config_ce_pktlog() local
5447 pipe_info = &hif_state->pipe_info[pipe_num]; in hif_config_ce_pktlog()
5465 qdf_status = hif_post_recv_buffers_for_pipe(pipe_info); in hif_config_ce_pktlog()
5499 struct HIF_CE_pipe_info *pipe_info = in hif_ce_ipa_get_ce_resource() local
5500 &(hif_state->pipe_info[HIF_PCI_IPA_UC_ASSIGNED_CE]); in hif_ce_ipa_get_ce_resource()
5501 struct CE_handle *ce_hdl = pipe_info->ce_hdl; in hif_ce_ipa_get_ce_resource()
5889 struct HIF_CE_pipe_info *pipe_info = &(hif_state->pipe_info[pipe]); in hif_get_addl_pipe_info() local
5890 struct CE_handle *ce_hdl = pipe_info->ce_hdl; in hif_get_addl_pipe_info()