diff --git a/hif/inc/hif.h b/hif/inc/hif.h index 3b0496e346..a6b9cf6ba3 100644 --- a/hif/inc/hif.h +++ b/hif/inc/hif.h @@ -407,7 +407,9 @@ CDF_STATUS hif_diag_write_mem(struct ol_softc *scn, uint32_t address, * Set the FASTPATH_mode_on flag in sc, for use by data path */ #ifdef WLAN_FEATURE_FASTPATH -void hif_enable_fastpath(struct ol_softc *hif_dev); +void hif_enable_fastpath(struct ol_softc *hif_ctx); +bool hif_is_fastpath_mode_enabled(struct ol_softc *hif_ctx); +void *hif_get_ce_handle(struct ol_softc *hif_ctx, int); #endif #if defined(HIF_PCI) && !defined(A_SIMOS_DEVHOST) @@ -655,7 +657,10 @@ void hif_get_hw_info(struct ol_softc *scn, u32 *version, u32 *revision, const char **target_name); struct hif_target_info *hif_get_target_info_handle(struct ol_softc *scn); struct hif_config_info *hif_get_ini_handle(struct ol_softc *scn); -struct bmi_info *hif_get_bmi_ctx(void *hif_ctx); +struct bmi_info *hif_get_bmi_ctx(struct ol_softc *scn); +void hif_lro_flush_cb_register(struct ol_softc *scn, + void (handler)(void *), void *data); +void hif_lro_flush_cb_deregister(struct ol_softc *scn); #ifdef __cplusplus } #endif diff --git a/hif/src/ce/ce_main.c b/hif/src/ce/ce_main.c index 54ef56ed41..89202ed241 100644 --- a/hif/src/ce/ce_main.c +++ b/hif/src/ce/ce_main.c @@ -1071,17 +1071,43 @@ CDF_STATUS hif_start(struct ol_softc *scn) #ifdef WLAN_FEATURE_FASTPATH /** * hif_enable_fastpath() Update that we have enabled fastpath mode - * @hif_device: HIF context + * @hif_ctx: HIF context * * For use in data path * * Retrun: void */ -void -hif_enable_fastpath(struct ol_softc *hif_device) +void hif_enable_fastpath(struct ol_softc *hif_ctx) { HIF_INFO("Enabling fastpath mode\n"); - hif_device->fastpath_mode_on = 1; + hif_ctx->fastpath_mode_on = 1; +} + +/** + * hif_is_fastpath_mode_enabled - API to query if fasthpath mode is enabled + * @hif_ctx: HIF Context + * + * For use in data path to skip HTC + * + * Return: bool + */ +bool hif_is_fastpath_mode_enabled(struct ol_softc *hif_ctx) +{ + return hif_ctx->fastpath_mode_on; +} + +/** + * hif_get_ce_handle - API to get CE handle for FastPath mode + * @hif_ctx: HIF Context + * @id: CopyEngine Id + * + * API to return CE handle for fastpath mode + * + * Return: void + */ +void *hif_get_ce_handle(struct ol_softc *hif_ctx, int id) +{ + return hif_ctx->ce_id_to_state[id]; } #endif /* WLAN_FEATURE_FASTPATH */ diff --git a/hif/src/hif_main.c b/hif/src/hif_main.c index 4c8fc531a5..f6d42a5071 100644 --- a/hif/src/hif_main.c +++ b/hif/src/hif_main.c @@ -866,3 +866,30 @@ struct hif_target_info *hif_get_target_info_handle(struct ol_softc *scn) { return &scn->target_info; } + +#if defined(FEATURE_LRO) +/** + * hif_lro_flush_cb_register - API to register for LRO Flush Callback + * @scn: HIF Context + * @handler: Function pointer to be called by HIF + * @data: Private data to be used by the module registering to HIF + * + * Return: void + */ +void hif_lro_flush_cb_register(struct ol_softc *scn, + void (handler)(void *), void *data) +{ + ce_lro_flush_cb_register(scn, handler, data); +} + +/** + * hif_lro_flush_cb_deregister - API to deregister for LRO Flush Callbacks + * @scn: HIF Context + * + * Return: void + */ +void hif_lro_flush_cb_deregister(struct ol_softc *scn) +{ + ce_lro_flush_cb_deregister(scn); +} +#endif