Lines Matching refs:CE_state

479 	struct CE_state *CE_state = (struct CE_state *)arg;  in ce_poll_timeout()  local
481 if (CE_state->timer_inited) { in ce_poll_timeout()
482 ce_per_engine_service(CE_state->scn, CE_state->id); in ce_poll_timeout()
483 qdf_timer_mod(&CE_state->poll_timer, CE_POLL_TIMEOUT); in ce_poll_timeout()
1564 static bool ce_mark_datapath(struct CE_state *ce_state) in ce_mark_datapath()
1593 static void ce_update_msi_batch_intr_flags(struct CE_state *ce_state) in ce_update_msi_batch_intr_flags()
1598 struct CE_state *ce_state, in ce_update_wrt_idx_offset()
1603 static bool ce_mark_datapath(struct CE_state *ce_state) in ce_mark_datapath()
1631 static void ce_update_msi_batch_intr_flags(struct CE_state *ce_state) in ce_update_msi_batch_intr_flags()
1638 struct CE_state *ce_state, in ce_update_wrt_idx_offset()
1665 struct CE_state *ce_state; in hif_ce_print_ring_stats()
2019 static struct CE_ring_state *ce_alloc_ring_state(struct CE_state *CE_state, in ce_alloc_ring_state() argument
2027 struct hif_softc *scn = CE_state->scn; in ce_alloc_ring_state()
2050 if (ce_alloc_desc_ring(scn, CE_state->id, &base_addr, in ce_alloc_ring_state()
2097 static void ce_srng_cleanup(struct hif_softc *scn, struct CE_state *CE_state, in ce_srng_cleanup() argument
2104 CE_state, ring_type); in ce_srng_cleanup()
2111 struct CE_state *ce_state; in hif_ce_bus_early_suspend()
2140 struct CE_state *ce_state; in hif_ce_bus_late_resume()
2181 struct CE_state *ce_state = context; in ce_oom_recovery()
2508 struct CE_state *CE_state = (struct CE_state *)cestate; in ce_enable_polling() local
2510 if (CE_state && CE_state->attr_flags & CE_ATTR_ENABLE_POLL) in ce_enable_polling()
2511 CE_state->timer_inited = true; in ce_enable_polling()
2516 struct CE_state *CE_state = (struct CE_state *)cestate; in ce_disable_polling() local
2518 if (CE_state && CE_state->attr_flags & CE_ATTR_ENABLE_POLL) in ce_disable_polling()
2519 CE_state->timer_inited = false; in ce_disable_polling()
2532 void ce_ring_dump_register_region(struct CE_state *CE_state, unsigned int CE_id) in ce_ring_dump_register_region() argument
2540 qdf_ssr_driver_dump_register_region(ce, CE_state, sizeof(*CE_state)); in ce_ring_dump_register_region()
2542 if (CE_state->status_ring) { in ce_ring_dump_register_region()
2543 ce_ring = CE_state->status_ring; in ce_ring_dump_register_region()
2554 if (CE_state->dest_ring) { in ce_ring_dump_register_region()
2555 ce_ring = CE_state->dest_ring; in ce_ring_dump_register_region()
2566 if (CE_state->src_ring) { in ce_ring_dump_register_region()
2567 ce_ring = CE_state->src_ring; in ce_ring_dump_register_region()
2588 ce_ring_dump_unregister_region(struct CE_state *CE_state, unsigned int CE_id) in ce_ring_dump_unregister_region() argument
2596 if (CE_state->status_ring) { in ce_ring_dump_unregister_region()
2604 if (CE_state->dest_ring) { in ce_ring_dump_unregister_region()
2612 if (CE_state->src_ring) { in ce_ring_dump_unregister_region()
2623 void ce_ring_dump_register_region(struct CE_state *CE_state, unsigned int CE_id) in ce_ring_dump_register_region() argument
2628 ce_ring_dump_unregister_region(struct CE_state *CE_state, unsigned int CE_id) in ce_ring_dump_unregister_region() argument
2645 struct CE_state *CE_state; in ce_init() local
2655 CE_state = scn->ce_id_to_state[CE_id]; in ce_init()
2657 if (!CE_state) { in ce_init()
2658 CE_state = in ce_init()
2659 (struct CE_state *)qdf_mem_malloc(sizeof(*CE_state)); in ce_init()
2660 if (!CE_state) in ce_init()
2664 qdf_spinlock_create(&CE_state->ce_index_lock); in ce_init()
2666 qdf_spinlock_create(&CE_state->ce_interrupt_lock); in ce_init()
2669 CE_state->id = CE_id; in ce_init()
2670 CE_state->ctrl_addr = ctrl_addr; in ce_init()
2671 CE_state->state = CE_RUNNING; in ce_init()
2672 CE_state->attr_flags = attr->flags; in ce_init()
2674 CE_state->scn = scn; in ce_init()
2675 CE_state->service = ce_engine_service_reg; in ce_init()
2677 qdf_atomic_init(&CE_state->rx_pending); in ce_init()
2680 return (struct CE_handle *)CE_state; in ce_init()
2683 if (CE_state->src_sz_max) in ce_init()
2684 QDF_ASSERT(CE_state->src_sz_max == attr->src_sz_max); in ce_init()
2686 CE_state->src_sz_max = attr->src_sz_max; in ce_init()
2697 if (CE_state->src_ring) { in ce_init()
2698 QDF_ASSERT(CE_state->src_ring->nentries == nentries); in ce_init()
2700 src_ring = CE_state->src_ring = in ce_init()
2701 ce_alloc_ring_state(CE_state, in ce_init()
2712 qdf_mem_free(CE_state); in ce_init()
2744 if (CE_state->attr_flags & CE_ATTR_ENABLE_POLL) { in ce_init()
2746 &CE_state->poll_timer, in ce_init()
2748 CE_state, in ce_init()
2750 ce_enable_polling(CE_state); in ce_init()
2751 qdf_timer_mod(&CE_state->poll_timer, in ce_init()
2763 if (CE_state->dest_ring) { in ce_init()
2764 QDF_ASSERT(CE_state->dest_ring->nentries == nentries); in ce_init()
2766 dest_ring = CE_state->dest_ring = in ce_init()
2767 ce_alloc_ring_state(CE_state, in ce_init()
2788 if (ce_srng_based(CE_state->scn)) { in ce_init()
2789 CE_state->status_ring = in ce_init()
2790 ce_alloc_ring_state(CE_state, in ce_init()
2793 if (!CE_state->status_ring) { in ce_init()
2795 qdf_mem_free(CE_state->dest_ring); in ce_init()
2798 (CE_state->src_ring); in ce_init()
2799 CE_state->src_ring = NULL; in ce_init()
2806 qdf_mem_free(CE_state); in ce_init()
2814 CE_id, CE_state->status_ring, in ce_init()
2823 if (CE_state->attr_flags & CE_ATTR_ENABLE_POLL) { in ce_init()
2825 &CE_state->poll_timer, in ce_init()
2827 CE_state, in ce_init()
2829 ce_enable_polling(CE_state); in ce_init()
2830 qdf_timer_mod(&CE_state->poll_timer, in ce_init()
2845 qdf_create_work(scn->qdf_dev, &CE_state->oom_allocation_work, in ce_init()
2846 ce_oom_recovery, CE_state); in ce_init()
2849 ce_mark_datapath(CE_state); in ce_init()
2850 scn->ce_id_to_state[CE_id] = CE_state; in ce_init()
2852 ce_ring_dump_register_region(CE_state, CE_id); in ce_init()
2858 ce_update_msi_batch_intr_flags(CE_state); in ce_init()
2859 ce_update_wrt_idx_offset(scn, CE_state, attr); in ce_init()
2861 return (struct CE_handle *)CE_state; in ce_init()
2865 ce_fini((struct CE_handle *)CE_state); in ce_init()
2942 hif_calc_wbuff_pool_size(struct hif_softc *scn, struct CE_state *ce_state) in hif_calc_wbuff_pool_size()
2987 struct CE_state *ce_state; in hif_ce_rx_wbuff_register()
3111 struct CE_state *ce_state = (struct CE_state *)ce_hdl; in ce_h2t_tx_ce_cleanup()
3144 struct CE_state *ce_state = (struct CE_state *)ce_hdl; in ce_t2h_msg_ce_cleanup()
3205 struct CE_state *ce_state = in hif_update_fastpath_recv_bufs_cnt()
3225 struct CE_state *CE_state = (struct CE_state *)copyeng; in ce_fini() local
3226 unsigned int CE_id = CE_state->id; in ce_fini()
3227 struct hif_softc *scn = CE_state->scn; in ce_fini()
3230 bool inited = CE_state->timer_inited; in ce_fini()
3231 CE_state->state = CE_UNUSED; in ce_fini()
3234 ce_disable_polling(CE_state); in ce_fini()
3236 qdf_lro_deinit(CE_state->lro_data); in ce_fini()
3238 ce_ring_dump_unregister_region(CE_state, CE_id); in ce_fini()
3240 if (CE_state->src_ring) { in ce_fini()
3245 if (CE_state->src_ring->shadow_base_unaligned) in ce_fini()
3246 qdf_mem_free(CE_state->src_ring->shadow_base_unaligned); in ce_fini()
3247 if (CE_state->src_ring->base_addr_owner_space_unaligned) in ce_fini()
3248 ce_free_desc_ring(scn, CE_state->id, in ce_fini()
3249 CE_state->src_ring, in ce_fini()
3251 ce_srng_cleanup(scn, CE_state, CE_RING_SRC); in ce_fini()
3252 qdf_mem_free(CE_state->src_ring); in ce_fini()
3254 if (CE_state->dest_ring) { in ce_fini()
3259 if (CE_state->dest_ring->base_addr_owner_space_unaligned) in ce_fini()
3260 ce_free_desc_ring(scn, CE_state->id, in ce_fini()
3261 CE_state->dest_ring, in ce_fini()
3263 ce_srng_cleanup(scn, CE_state, CE_RING_DEST); in ce_fini()
3264 qdf_mem_free(CE_state->dest_ring); in ce_fini()
3268 qdf_timer_free(&CE_state->poll_timer); in ce_fini()
3271 if ((ce_srng_based(CE_state->scn)) && (CE_state->status_ring)) { in ce_fini()
3275 if (CE_state->status_ring->shadow_base_unaligned) in ce_fini()
3277 CE_state->status_ring->shadow_base_unaligned); in ce_fini()
3280 if (CE_state->status_ring->base_addr_owner_space_unaligned) in ce_fini()
3281 ce_free_desc_ring(scn, CE_state->id, in ce_fini()
3282 CE_state->status_ring, in ce_fini()
3284 ce_srng_cleanup(scn, CE_state, CE_RING_STATUS); in ce_fini()
3285 qdf_mem_free(CE_state->status_ring); in ce_fini()
3292 qdf_spinlock_destroy(&CE_state->ce_index_lock); in ce_fini()
3294 qdf_spinlock_destroy(&CE_state->ce_interrupt_lock); in ce_fini()
3296 qdf_mem_free(CE_state); in ce_fini()
3646 struct CE_state *ce_state = (struct CE_state *) copyeng; in hif_pci_ce_recv_data()
3703 struct CE_state *ce_state; in hif_completion_thread_startup_by_ceid()
3847 struct CE_state *CE_state = (struct CE_state *)pipe_info->ce_hdl; in hif_post_recv_buffers_failure() local
3849 int ce_id = CE_state->id; in hif_post_recv_buffers_failure()
3864 if (bufs_needed_tmp == CE_state->dest_ring->nentries - 1 || in hif_post_recv_buffers_failure()
3866 bufs_needed_tmp == CE_state->dest_ring->nentries - 2)) { in hif_post_recv_buffers_failure()
3869 &CE_state->oom_allocation_work)) in hif_post_recv_buffers_failure()
3896 ce_id = ((struct CE_state *)ce_hdl)->id; in hif_post_recv_buffers_for_pipe()
4069 struct CE_state *ce_state = NULL; in hif_post_recv_buffers()
4254 struct CE_state *ce_state; in hif_buffer_cleanup()
4282 struct CE_state *ce_state; in hif_destroy_oom_work()
5248 struct CE_state *ce_state = NULL; in hif_config_ce_by_id()
5718 struct CE_state *ce_state; in hif_ce_get_lro_ctx()
5891 struct CE_state *ce_state = (struct CE_state *)ce_hdl; in hif_get_addl_pipe_info()
5948 struct CE_state *CE_state = scn->ce_id_to_state[pipe_num]; in hif_disable_interrupt() local
5949 uint32_t ctrl_addr = CE_state->ctrl_addr; in hif_disable_interrupt()