diff --git a/core/hif/inc/hif.h b/core/hif/inc/hif.h index ab99b62c1c1d..78f82d60dcce 100644 --- a/core/hif/inc/hif.h +++ b/core/hif/inc/hif.h @@ -292,8 +292,6 @@ struct ol_softc { */ cdf_spinlock_t target_lock; unsigned int ce_count; /* Number of Copy Engines supported */ - bool force_break; /* Flag to indicate whether to - * break out the DPC context */ unsigned int receive_count; /* count Num Of Receive Buffers * handled for one interrupt * DPC routine */ diff --git a/core/hif/src/ce/ce_internal.h b/core/hif/src/ce/ce_internal.h index b3fa70737007..7e5a039d704d 100644 --- a/core/hif/src/ce/ce_internal.h +++ b/core/hif/src/ce/ce_internal.h @@ -129,6 +129,8 @@ struct CE_state { struct CE_ring_state *src_ring; struct CE_ring_state *dest_ring; atomic_t rx_pending; + bool force_break; /* Flag to indicate whether to + * break out the DPC context */ /* epping */ bool timer_inited; diff --git a/core/hif/src/ce/ce_main.c b/core/hif/src/ce/ce_main.c index db5884017770..f27ab12125fe 100644 --- a/core/hif/src/ce/ce_main.c +++ b/core/hif/src/ce/ce_main.c @@ -729,6 +729,7 @@ hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context, struct HIF_CE_pipe_info *pipe_info = (struct HIF_CE_pipe_info *)ce_context; struct HIF_CE_state *hif_state = pipe_info->HIF_CE_state; + struct CE_state *ce_state = (struct CE_state *) copyeng; struct ol_softc *scn = hif_state->scn; struct HIF_CE_completion_state *compl_state; struct HIF_CE_completion_state *compl_queue_head, *compl_queue_tail; @@ -780,7 +781,7 @@ hif_pci_ce_recv_data(struct CE_handle *copyeng, void *ce_context, scn->receive_count++; if (cdf_unlikely(hif_max_num_receives_reached( scn->receive_count))) { - scn->force_break = 1; + ce_state->force_break = 1; break; } } while (ce_completed_recv_next(copyeng, &ce_context, &transfer_context, diff --git a/core/hif/src/ce/ce_service.c b/core/hif/src/ce/ce_service.c index 4b6c37bc7ccc..6bf9e616fe66 100644 --- a/core/hif/src/ce/ce_service.c +++ b/core/hif/src/ce/ce_service.c @@ -1182,7 +1182,7 @@ int ce_per_engine_service(struct ol_softc *scn, unsigned int CE_id) /* NAPI: scn variables- thread/multi-processing safety? */ scn->receive_count = 0; - scn->force_break = 0; + CE_state->force_break = 0; more_completions: if (CE_state->recv_cb) { @@ -1215,7 +1215,7 @@ more_completions: /* Break the receive processes by * force if force_break set up */ - if (cdf_unlikely(scn->force_break)) { + if (cdf_unlikely(CE_state->force_break)) { cdf_atomic_set(&CE_state->rx_pending, 1); CE_ENGINE_INT_STATUS_CLEAR(scn, ctrl_addr, HOST_IS_COPY_COMPLETE_MASK);