diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c index 3926e3b807..e6576d9df4 100644 --- a/dp/wifi3.0/dp_htt.c +++ b/dp/wifi3.0/dp_htt.c @@ -606,6 +606,15 @@ htt_htc_pkt_pool_free(struct htt_soc *soc) soc->htt_htc_pkt_freelist = NULL; } +#ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST + +static void +htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt) +{ +} + +#else /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */ + /* * htt_htc_misc_pkt_list_trim() - trim misc list * @htt_soc: HTT SOC handle @@ -668,6 +677,8 @@ htt_htc_misc_pkt_list_add(struct htt_soc *soc, struct dp_htt_htc_pkt *pkt) htt_htc_misc_pkt_list_trim(soc, misclist_trim_level); } +#endif /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */ + /** * DP_HTT_SEND_HTC_PKT() - Send htt packet from host * @soc : HTT SOC handle @@ -778,6 +789,7 @@ dp_htt_h2t_send_complete_free_netbuf( qdf_nbuf_free(netbuf); } +#ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST /* * dp_htt_h2t_send_complete() - H2T completion handler * @context: Opaque context (HTT SOC handle) @@ -785,9 +797,36 @@ dp_htt_h2t_send_complete_free_netbuf( */ static void dp_htt_h2t_send_complete(void *context, HTC_PACKET *htc_pkt) +{ + struct htt_soc *soc = (struct htt_soc *) context; + struct dp_htt_htc_pkt *htt_pkt; + qdf_nbuf_t netbuf; + + htt_pkt = container_of(htc_pkt, struct dp_htt_htc_pkt, htc_pkt); + + /* process (free or keep) the netbuf that held the message */ + netbuf = (qdf_nbuf_t) htc_pkt->pNetBufContext; + /* + * adf sendcomplete is required for windows only + */ + /* qdf_nbuf_set_sendcompleteflag(netbuf, TRUE); */ + /* free the htt_htc_pkt / HTC_PACKET object */ + qdf_nbuf_free(netbuf); + htt_htc_pkt_free(soc, htt_pkt); +} + +#else /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */ + +/* + * * dp_htt_h2t_send_complete() - H2T completion handler + * * @context: Opaque context (HTT SOC handle) + * * @htc_pkt: HTC packet + * */ +static void +dp_htt_h2t_send_complete(void *context, HTC_PACKET *htc_pkt) { void (*send_complete_part2)( - void *soc, QDF_STATUS status, qdf_nbuf_t msdu); + void *soc, QDF_STATUS status, qdf_nbuf_t msdu); struct htt_soc *soc = (struct htt_soc *) context; struct dp_htt_htc_pkt *htt_pkt; qdf_nbuf_t netbuf; @@ -800,16 +839,18 @@ dp_htt_h2t_send_complete(void *context, HTC_PACKET *htc_pkt) netbuf = (qdf_nbuf_t) htc_pkt->pNetBufContext; /* * adf sendcomplete is required for windows only - */ + */ /* qdf_nbuf_set_sendcompleteflag(netbuf, TRUE); */ - if (send_complete_part2) { + if (send_complete_part2){ send_complete_part2( - htt_pkt->soc_ctxt, htc_pkt->Status, netbuf); + htt_pkt->soc_ctxt, htc_pkt->Status, netbuf); } /* free the htt_htc_pkt / HTC_PACKET object */ htt_htc_pkt_free(soc, htt_pkt); } +#endif /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */ + /* * htt_h2t_ver_req_msg() - Send HTT version request message to target * @htt_soc: HTT SOC handle diff --git a/hif/src/ce/ce_assignment.h b/hif/src/ce/ce_assignment.h index e5a7219adb..3756a099f1 100644 --- a/hif/src/ce/ce_assignment.h +++ b/hif/src/ce/ce_assignment.h @@ -74,6 +74,12 @@ static void hif_target_dump_access_log(void); #define CE_ATTR_DIAG_FLAGS \ (CE_ATTR_FLAGS | CE_ATTR_DIAG) +#ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST +#define CE4_COMP_HTT_HTC CE_ATTR_FLAGS +#else +#define CE4_COMP_HTT_HTC (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR) +#endif + #ifdef QCN7605_SUPPORT #define QCN7605_CE_COUNT 9 @@ -1274,7 +1280,7 @@ static struct CE_attr host_ce_config_wlan_qca6490[] = { /* host->target WMI */ { /* CE3 */ CE_ATTR_FLAGS, 0, 32, 2048, 0, NULL,}, /* host->target HTT */ - { /* CE4 */ (CE_ATTR_FLAGS | CE_ATTR_DISABLE_INTR), 0, + { /* CE4 */ CE4_COMP_HTT_HTC, 0, CE_HTT_H2T_MSG_SRC_NENTRIES_QCA6490, 256, 0, NULL,}, /* target -> host PKTLOG */ { /* CE5 */ CE_ATTR_FLAGS, 0, 0, 2048, 512, NULL,}, diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index ac0b0a50f0..d822f664ed 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -2519,7 +2519,7 @@ void hif_send_complete_check(struct hif_opaque_softc *hif_ctx, uint8_t pipe, 1)) return; } -#if ATH_11AC_TXCOMPACT +#ifdef ATH_11AC_TXCOMPACT ce_per_engine_servicereap(scn, pipe); #else ce_per_engine_service(scn, pipe); diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c index 121f50d812..05c05508b7 100644 --- a/hif/src/ce/ce_service.c +++ b/hif/src/ce/ce_service.c @@ -923,6 +923,27 @@ void ce_per_engine_servicereap(struct hif_softc *scn, unsigned int ce_id) #endif /*ATH_11AC_TXCOMPACT */ +#ifdef ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST +static inline bool check_ce_id_and_epping_enabled(int CE_id, uint32_t mode) +{ + // QDF_IS_EPPING_ENABLED is pre lithium feature + // CE4 completion is enabled only lithium and later + // so no need to check for EPPING + return true; +} + +#else /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */ + +static inline bool check_ce_id_and_epping_enabled(int CE_id, uint32_t mode) +{ + if (CE_id != CE_HTT_H2T_MSG || QDF_IS_EPPING_ENABLED(mode)) + return true; + else + return false; +} + +#endif /* ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST */ + /* * ce_engine_service_reg: * @@ -1006,8 +1027,7 @@ more_completions: &id, &sw_idx, &hw_idx, &toeplitz_hash_result) == QDF_STATUS_SUCCESS) { - if (CE_id != CE_HTT_H2T_MSG || - QDF_IS_EPPING_ENABLED(mode)) { + if (check_ce_id_and_epping_enabled(CE_id, mode)) { qdf_spin_unlock(&CE_state->ce_index_lock); CE_state->send_cb((struct CE_handle *)CE_state, CE_context, transfer_context, diff --git a/htc/htc_send.c b/htc/htc_send.c index 1663d470f0..ed81d2dfd7 100644 --- a/htc/htc_send.c +++ b/htc/htc_send.c @@ -2459,7 +2459,9 @@ QDF_STATUS htc_tx_completion_handler(void *Context, netbuf = NULL; break; } - if (pPacket->PktInfo.AsTx.Tag != HTC_TX_PACKET_TAG_AUTO_PM) + if (pPacket->PktInfo.AsTx.Tag != HTC_TX_PACKET_TAG_AUTO_PM && + pPacket->PktInfo.AsTx.Tag != HTC_TX_PACKET_TAG_RUNTIME_PUT && + pPacket->PktInfo.AsTx.Tag != HTC_TX_PACKET_TAG_RTPM_PUT_RC) hif_pm_runtime_put(target->hif_dev, RTPM_ID_WMI);