Lines Matching refs:scn

121 	struct hif_softc *scn = ce_state->scn;  in ce_send_fast()  local
154 Q_TARGET_ACCESS_BEGIN(scn); in ce_send_fast()
155 DATA_CE_UPDATE_SWINDEX(src_ring->sw_index, scn, ctrl_addr); in ce_send_fast()
160 hif_record_ce_desc_event(scn, ce_state->id, in ce_send_fast()
170 OL_ATH_CE_PKT_ERROR_COUNT_INCR(scn, CE_RING_DELTA_FAIL); in ce_send_fast()
172 Q_TARGET_ACCESS_END(scn); in ce_send_fast()
256 hif_record_ce_desc_event(scn, ce_state->id, type, in ce_send_fast()
275 war_ce_src_ring_write_idx_set(scn, ctrl_addr, in ce_send_fast()
277 Q_TARGET_ACCESS_END(scn); in ce_send_fast()
303 struct hif_softc *scn = ce_state->scn; in ce_fastpath_rx_handle() local
316 hif_record_ce_desc_event(scn, ce_state->id, in ce_fastpath_rx_handle()
320 CE_DEST_RING_WRITE_IDX_SET(scn, ctrl_addr, write_index); in ce_fastpath_rx_handle()
336 void ce_per_engine_service_fast(struct hif_softc *scn, int ce_id) in ce_per_engine_service_fast() argument
338 struct CE_state *ce_state = scn->ce_id_to_state[ce_id]; in ce_per_engine_service_fast()
339 struct hif_opaque_softc *hif_hdl = GET_HIF_OPAQUE_HDL(scn); in ce_per_engine_service_fast()
354 struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn); in ce_per_engine_service_fast()
404 qdf_mem_dma_sync_single_for_cpu(scn->qdf_dev, paddr, in ce_per_engine_service_fast()
421 if (nbuf_cmpl_idx == scn->ce_service_max_rx_ind_flush) { in ce_per_engine_service_fast()
422 hif_record_ce_desc_event(scn, ce_state->id, in ce_per_engine_service_fast()
431 scn, ce_state))) { in ce_per_engine_service_fast()
442 hif_record_ce_desc_event(scn, ce_state->id, in ce_per_engine_service_fast()
457 if (qdf_unlikely(hif_ce_service_should_yield(scn, ce_state))) { in ce_per_engine_service_fast()
472 if (TARGET_REGISTER_ACCESS_ALLOWED(scn)) { in ce_per_engine_service_fast()
474 CE_ENGINE_INT_STATUS_CLEAR(scn, ctrl_addr, in ce_per_engine_service_fast()
481 if (ce_services->ce_recv_entries_done_nolock(scn, ce_state)) { in ce_per_engine_service_fast()
488 CE_DEST_RING_READ_IDX_GET(scn, ctrl_addr)); in ce_per_engine_service_fast()
508 static inline bool ce_is_fastpath_enabled(struct hif_softc *scn) in ce_is_fastpath_enabled() argument
510 return scn->fastpath_mode_on; in ce_is_fastpath_enabled()
513 void ce_per_engine_service_fast(struct hif_softc *scn, int ce_id) in ce_per_engine_service_fast() argument
517 static inline bool ce_is_fastpath_enabled(struct hif_softc *scn) in ce_is_fastpath_enabled() argument
540 struct hif_softc *scn = CE_state->scn; in ce_send_nolock_legacy() local
542 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_send_nolock_legacy()
546 OL_ATH_CE_PKT_ERROR_COUNT_INCR(scn, CE_RING_DELTA_FAIL); in ce_send_nolock_legacy()
547 Q_TARGET_ACCESS_END(scn); in ce_send_nolock_legacy()
607 war_ce_src_ring_write_idx_set(scn, ctrl_addr, in ce_send_nolock_legacy()
614 hif_record_ce_desc_event(scn, CE_state->id, event_type, in ce_send_nolock_legacy()
621 Q_TARGET_ACCESS_END(scn); in ce_send_nolock_legacy()
638 struct hif_softc *scn = CE_state->scn; in ce_sendlist_send_legacy() local
644 if (CE_state->scn->fastpath_mode_on && CE_state->htt_tx_data && in ce_sendlist_send_legacy()
645 Q_TARGET_ACCESS_BEGIN(scn) == 0) { in ce_sendlist_send_legacy()
647 scn, CE_state->ctrl_addr); in ce_sendlist_send_legacy()
648 Q_TARGET_ACCESS_END(scn); in ce_sendlist_send_legacy()
723 struct hif_softc *scn = CE_state->scn; in ce_recv_buf_enqueue_legacy() local
729 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) { in ce_recv_buf_enqueue_legacy()
735 (ce_is_fastpath_enabled(scn) && CE_state->htt_rx_data)) { in ce_recv_buf_enqueue_legacy()
753 hif_record_ce_desc_event(scn, CE_state->id, in ce_recv_buf_enqueue_legacy()
762 CE_DEST_RING_WRITE_IDX_SET(scn, ctrl_addr, write_index); in ce_recv_buf_enqueue_legacy()
769 Q_TARGET_ACCESS_END(scn); in ce_recv_buf_enqueue_legacy()
775 ce_send_entries_done_nolock_legacy(struct hif_softc *scn, in ce_send_entries_done_nolock_legacy() argument
785 read_index = CE_SRC_RING_READ_IDX_GET(scn, ctrl_addr); in ce_send_entries_done_nolock_legacy()
791 ce_recv_entries_done_nolock_legacy(struct hif_softc *scn, in ce_recv_entries_done_nolock_legacy() argument
801 read_index = CE_DEST_RING_READ_IDX_GET(scn, ctrl_addr); in ce_recv_entries_done_nolock_legacy()
819 struct hif_softc *scn = CE_state->scn; in ce_completed_recv_next_nolock_legacy() local
843 hif_record_ce_desc_event(scn, CE_state->id, HIF_RX_DESC_COMPLETION, in ce_completed_recv_next_nolock_legacy()
887 struct hif_softc *scn; in ce_revoke_recv_next_legacy() local
894 scn = CE_state->scn; in ce_revoke_recv_next_legacy()
951 struct hif_softc *scn = CE_state->scn; in ce_completed_send_next_nolock_legacy() local
961 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_completed_send_next_nolock_legacy()
964 CE_SRC_RING_READ_IDX_GET_FROM_DDR(scn, ctrl_addr); in ce_completed_send_next_nolock_legacy()
965 if (Q_TARGET_ACCESS_END(scn) < 0) in ce_completed_send_next_nolock_legacy()
987 hif_record_ce_desc_event(scn, CE_state->id, in ce_completed_send_next_nolock_legacy()
1035 struct hif_softc *scn; in ce_cancel_send_next_legacy() local
1042 scn = CE_state->scn; in ce_cancel_send_next_legacy()
1097 struct hif_softc *scn = CE_state->scn; in ce_per_engine_handler_adjust_legacy() local
1104 if (Q_TARGET_ACCESS_BEGIN(scn) < 0) in ce_per_engine_handler_adjust_legacy()
1107 if (!TARGET_REGISTER_ACCESS_ALLOWED(scn)) { in ce_per_engine_handler_adjust_legacy()
1114 CE_COPY_COMPLETE_INTR_ENABLE(scn, ctrl_addr); in ce_per_engine_handler_adjust_legacy()
1116 CE_COPY_COMPLETE_INTR_DISABLE(scn, ctrl_addr); in ce_per_engine_handler_adjust_legacy()
1119 CE_WATERMARK_INTR_ENABLE(scn, ctrl_addr); in ce_per_engine_handler_adjust_legacy()
1121 CE_WATERMARK_INTR_DISABLE(scn, ctrl_addr); in ce_per_engine_handler_adjust_legacy()
1122 Q_TARGET_ACCESS_END(scn); in ce_per_engine_handler_adjust_legacy()
1130 struct hif_softc *scn = ce_state->scn; in ce_enqueue_desc() local
1152 DATA_CE_UPDATE_SWINDEX(src_ring->sw_index, scn, ctrl_addr); in ce_enqueue_desc()
1156 hif_record_ce_desc_event(scn, ce_state->id, in ce_enqueue_desc()
1166 OL_ATH_CE_PKT_ERROR_COUNT_INCR(scn, CE_RING_DELTA_FAIL); in ce_enqueue_desc()
1249 hif_record_ce_desc_event(scn, ce_state->id, type, in ce_enqueue_desc()
1268 static void ce_legacy_msi_param_setup(struct hif_softc *scn, uint32_t ctrl_addr, in ce_legacy_msi_param_setup() argument
1280 ret = pld_get_user_msi_assignment(scn->qdf_dev->dev, "CE", in ce_legacy_msi_param_setup()
1290 irq_id = scn->int_assignment->msi_idx[ce_id]; in ce_legacy_msi_param_setup()
1291 pld_get_msi_address(scn->qdf_dev->dev, &addr_low, &addr_high); in ce_legacy_msi_param_setup()
1293 CE_MSI_ADDR_LOW_SET(scn, ctrl_addr, addr_low); in ce_legacy_msi_param_setup()
1294 tmp = CE_MSI_ADDR_HIGH_GET(scn, ctrl_addr); in ce_legacy_msi_param_setup()
1297 CE_MSI_ADDR_HIGH_SET(scn, ctrl_addr, tmp); in ce_legacy_msi_param_setup()
1298 CE_MSI_DATA_SET(scn, ctrl_addr, irq_id + msi_data_start); in ce_legacy_msi_param_setup()
1299 CE_MSI_EN_SET(scn, ctrl_addr); in ce_legacy_msi_param_setup()
1302 static void ce_legacy_src_intr_thres_setup(struct hif_softc *scn, in ce_legacy_src_intr_thres_setup() argument
1310 tmp = CE_CHANNEL_SRC_BATCH_TIMER_INT_SETUP_GET(scn, ctrl_addr); in ce_legacy_src_intr_thres_setup()
1324 CE_CHANNEL_SRC_BATCH_TIMER_INT_SETUP(scn, ctrl_addr, tmp); in ce_legacy_src_intr_thres_setup()
1325 CE_CHANNEL_SRC_TIMER_BATCH_INT_EN(scn, ctrl_addr); in ce_legacy_src_intr_thres_setup()
1328 static void ce_legacy_dest_intr_thres_setup(struct hif_softc *scn, in ce_legacy_dest_intr_thres_setup() argument
1336 tmp = CE_CHANNEL_DST_BATCH_TIMER_INT_SETUP_GET(scn, ctrl_addr); in ce_legacy_dest_intr_thres_setup()
1350 CE_CHANNEL_DST_BATCH_TIMER_INT_SETUP(scn, ctrl_addr, tmp); in ce_legacy_dest_intr_thres_setup()
1351 CE_CHANNEL_DST_TIMER_BATCH_INT_EN(scn, ctrl_addr); in ce_legacy_dest_intr_thres_setup()
1354 static void ce_legacy_msi_param_setup(struct hif_softc *scn, uint32_t ctrl_addr, in ce_legacy_msi_param_setup() argument
1359 static void ce_legacy_src_intr_thres_setup(struct hif_softc *scn, in ce_legacy_src_intr_thres_setup() argument
1367 static void ce_legacy_dest_intr_thres_setup(struct hif_softc *scn, in ce_legacy_dest_intr_thres_setup() argument
1376 static void ce_legacy_src_ring_setup(struct hif_softc *scn, uint32_t ce_id, in ce_legacy_src_ring_setup() argument
1385 QDF_ASSERT(ce_id < scn->ce_count); in ce_legacy_src_ring_setup()
1389 CE_SRC_RING_READ_IDX_GET_FROM_REGISTER(scn, ctrl_addr); in ce_legacy_src_ring_setup()
1392 CE_SRC_RING_WRITE_IDX_GET_FROM_REGISTER(scn, ctrl_addr); in ce_legacy_src_ring_setup()
1394 CE_SRC_RING_BASE_ADDR_SET(scn, ctrl_addr, in ce_legacy_src_ring_setup()
1402 scn, ctrl_addr); in ce_legacy_src_ring_setup()
1406 CE_SRC_RING_BASE_ADDR_HIGH_SET(scn, in ce_legacy_src_ring_setup()
1409 CE_SRC_RING_SZ_SET(scn, ctrl_addr, src_ring->nentries); in ce_legacy_src_ring_setup()
1410 CE_SRC_RING_DMAX_SET(scn, ctrl_addr, attr->src_sz_max); in ce_legacy_src_ring_setup()
1413 CE_SRC_RING_BYTE_SWAP_SET(scn, ctrl_addr, 1); in ce_legacy_src_ring_setup()
1415 CE_SRC_RING_LOWMARK_SET(scn, ctrl_addr, 0); in ce_legacy_src_ring_setup()
1416 CE_SRC_RING_HIGHMARK_SET(scn, ctrl_addr, src_ring->nentries); in ce_legacy_src_ring_setup()
1423 ce_legacy_msi_param_setup(scn, ctrl_addr, ce_id, attr); in ce_legacy_src_ring_setup()
1424 ce_legacy_src_intr_thres_setup(scn, ctrl_addr, attr, in ce_legacy_src_ring_setup()
1429 static void ce_legacy_dest_ring_setup(struct hif_softc *scn, uint32_t ce_id, in ce_legacy_dest_ring_setup() argument
1438 QDF_ASSERT(ce_id < scn->ce_count); in ce_legacy_dest_ring_setup()
1441 CE_DEST_RING_READ_IDX_GET_FROM_REGISTER(scn, ctrl_addr); in ce_legacy_dest_ring_setup()
1443 CE_DEST_RING_WRITE_IDX_GET_FROM_REGISTER(scn, ctrl_addr); in ce_legacy_dest_ring_setup()
1445 CE_DEST_RING_BASE_ADDR_SET(scn, ctrl_addr, in ce_legacy_dest_ring_setup()
1452 tmp = CE_DEST_RING_BASE_ADDR_HIGH_GET(scn, in ce_legacy_dest_ring_setup()
1457 CE_DEST_RING_BASE_ADDR_HIGH_SET(scn, in ce_legacy_dest_ring_setup()
1461 CE_DEST_RING_SZ_SET(scn, ctrl_addr, dest_ring->nentries); in ce_legacy_dest_ring_setup()
1464 CE_DEST_RING_BYTE_SWAP_SET(scn, ctrl_addr, 1); in ce_legacy_dest_ring_setup()
1466 CE_DEST_RING_LOWMARK_SET(scn, ctrl_addr, 0); in ce_legacy_dest_ring_setup()
1467 CE_DEST_RING_HIGHMARK_SET(scn, ctrl_addr, dest_ring->nentries); in ce_legacy_dest_ring_setup()
1474 ce_legacy_msi_param_setup(scn, ctrl_addr, ce_id, attr); in ce_legacy_dest_ring_setup()
1475 ce_legacy_dest_intr_thres_setup(scn, ctrl_addr, attr, in ce_legacy_dest_ring_setup()
1497 static int ce_ring_setup_legacy(struct hif_softc *scn, uint8_t ring_type, in ce_ring_setup_legacy() argument
1501 int status = Q_TARGET_ACCESS_BEGIN(scn); in ce_ring_setup_legacy()
1508 ce_legacy_src_ring_setup(scn, ce_id, ring, attr); in ce_ring_setup_legacy()
1511 ce_legacy_dest_ring_setup(scn, ce_id, ring, attr); in ce_ring_setup_legacy()
1519 Q_TARGET_ACCESS_END(scn); in ce_ring_setup_legacy()
1524 static void ce_prepare_shadow_register_v2_cfg_legacy(struct hif_softc *scn, in ce_prepare_shadow_register_v2_cfg_legacy() argument
1537 struct hif_softc *scn = CE_state->scn; in ce_check_int_watermark() local
1539 ce_int_status = CE_ENGINE_INT_STATUS_GET(scn, ctrl_addr); in ce_check_int_watermark()
1563 int ce_get_index_info_legacy(struct hif_softc *scn, void *ce_state, in ce_get_index_info_legacy() argument
1582 static void ce_prepare_shadow_register_v3_cfg_legacy(struct hif_softc *scn, in ce_prepare_shadow_register_v3_cfg_legacy() argument
1586 hif_get_shadow_reg_config_v3(scn, shadow_config, in ce_prepare_shadow_register_v3_cfg_legacy()
1594 hif_preare_shadow_register_cfg_v3(scn); in ce_prepare_shadow_register_v3_cfg_legacy()
1595 hif_get_shadow_reg_config_v3(scn, shadow_config, in ce_prepare_shadow_register_v3_cfg_legacy()