diff --git a/target_if/core/inc/target_if.h b/target_if/core/inc/target_if.h index 6aac3688a4cd..ebe85e81fe55 100644 --- a/target_if/core/inc/target_if.h +++ b/target_if/core/inc/target_if.h @@ -107,6 +107,10 @@ struct host_fw_ver { }; struct common_dbglog_handle; +struct common_hif_handle; +struct common_htc_handle; +struct common_wmi_handle; +struct common_accelerator_handle; /** * struct comp_hdls - Non-umac/lower layer components handles, it is a sub @@ -118,10 +122,10 @@ struct common_dbglog_handle; * @dbglog_hdl: Debug log handle */ struct comp_hdls { - void *hif_hdl; - void *htc_hdl; - void *wmi_hdl; - void *accelerator_hdl; + struct common_hif_handle *hif_hdl; + struct common_htc_handle *htc_hdl; + struct common_wmi_handle *wmi_hdl; + struct common_accelerator_handle *accelerator_hdl; struct common_dbglog_handle *dbglog_hdl; }; @@ -276,8 +280,8 @@ struct target_psoc_info { * @feature_ptr: stores legacy pointer or few driver specific structures */ struct target_pdev_info { - void *wmi_handle; - void *accelerator_hdl; + struct common_wmi_handle *wmi_handle; + struct common_accelerator_handle *accelerator_hdl; int32_t pdev_idx; int32_t phy_idx; void *feature_ptr; @@ -865,7 +869,8 @@ static inline uint32_t target_psoc_get_num_mem_chunks * Return: void */ static inline void target_psoc_set_hif_hdl - (struct target_psoc_info *psoc_info, void *hif_hdl) + (struct target_psoc_info *psoc_info, + struct common_hif_handle *hif_hdl) { if (psoc_info == NULL) return; @@ -881,7 +886,7 @@ static inline void target_psoc_set_hif_hdl * * Return: hif_hdl */ -static inline void *target_psoc_get_hif_hdl +static inline struct common_hif_handle *target_psoc_get_hif_hdl (struct target_psoc_info *psoc_info) { if (psoc_info == NULL) @@ -900,7 +905,8 @@ static inline void *target_psoc_get_hif_hdl * Return: void */ static inline void target_psoc_set_htc_hdl - (struct target_psoc_info *psoc_info, void *htc_hdl) + (struct target_psoc_info *psoc_info, + struct common_htc_handle *htc_hdl) { if (psoc_info == NULL) return; @@ -916,7 +922,7 @@ static inline void target_psoc_set_htc_hdl * * Return: htc_hdl */ -static inline void *target_psoc_get_htc_hdl +static inline struct common_htc_handle *target_psoc_get_htc_hdl (struct target_psoc_info *psoc_info) { if (psoc_info == NULL) @@ -934,7 +940,8 @@ static inline void *target_psoc_get_htc_hdl * Return: void */ static inline void target_psoc_set_wmi_hdl - (struct target_psoc_info *psoc_info, void *wmi_hdl) + (struct target_psoc_info *psoc_info, + struct common_wmi_handle *wmi_hdl) { if (psoc_info == NULL) return; @@ -950,7 +957,7 @@ static inline void target_psoc_set_wmi_hdl * * Return: wmi_hdl */ -static inline void *target_psoc_get_wmi_hdl +static inline struct common_wmi_handle *target_psoc_get_wmi_hdl (struct target_psoc_info *psoc_info) { if (psoc_info == NULL) @@ -969,7 +976,8 @@ static inline void *target_psoc_get_wmi_hdl * Return: void */ static inline void target_psoc_set_accelerator_hdl - (struct target_psoc_info *psoc_info, void *accelerator_hdl) + (struct target_psoc_info *psoc_info, + struct common_accelerator_handle *accelerator_hdl) { if (psoc_info == NULL) return; @@ -985,7 +993,8 @@ static inline void target_psoc_set_accelerator_hdl * * Return: accelerator_hdl */ -static inline void *target_psoc_get_accelerator_hdl +static inline +struct common_accelerator_handle *target_psoc_get_accelerator_hdl (struct target_psoc_info *psoc_info) { if (psoc_info == NULL) @@ -1342,7 +1351,8 @@ static inline void *target_pdev_get_feature_ptr * Return: void */ static inline void target_pdev_set_wmi_handle - (struct target_pdev_info *pdev_info, void *wmi_handle) + (struct target_pdev_info *pdev_info, + struct common_wmi_handle *wmi_handle) { if (pdev_info == NULL) return; @@ -1358,7 +1368,7 @@ static inline void target_pdev_set_wmi_handle * * Return: wmi_handle */ -static inline void *target_pdev_get_wmi_handle +static inline struct common_wmi_handle *target_pdev_get_wmi_handle (struct target_pdev_info *pdev_info) { if (pdev_info == NULL) @@ -1377,7 +1387,8 @@ static inline void *target_pdev_get_wmi_handle * Return: void */ static inline void target_pdev_set_accelerator_hdl - (struct target_pdev_info *pdev_info, void *accelerator_hdl) + (struct target_pdev_info *pdev_info, + struct common_accelerator_handle *accelerator_hdl) { if (pdev_info == NULL) return; @@ -1393,8 +1404,8 @@ static inline void target_pdev_set_accelerator_hdl * * Return: accelerator_hdl */ -static inline void *target_pdev_get_accelerator_hdl - (struct target_pdev_info *pdev_info) +static inline struct common_accelerator_handle * +target_pdev_get_accelerator_hdl(struct target_pdev_info *pdev_info) { if (pdev_info == NULL) return NULL; @@ -1481,7 +1492,8 @@ static inline int32_t target_pdev_get_phy_idx * Return: wmi_handle on success * if tgt handle is not initialized, it returns NULL */ -static inline void *GET_WMI_HDL_FROM_PSOC(struct wlan_objmgr_psoc *psoc) +static inline struct common_wmi_handle *GET_WMI_HDL_FROM_PSOC( + struct wlan_objmgr_psoc *psoc) { void *tgt_if_handle; @@ -1507,7 +1519,8 @@ static inline void *GET_WMI_HDL_FROM_PSOC(struct wlan_objmgr_psoc *psoc) * Return: wmi_handle on success * if tgt handle is not initialized, it returns NULL */ -static inline void *GET_WMI_HDL_FROM_PDEV(struct wlan_objmgr_pdev *pdev) +static inline struct common_wmi_handle *GET_WMI_HDL_FROM_PDEV( + struct wlan_objmgr_pdev *pdev) { void *tgt_if_handle; @@ -1523,6 +1536,36 @@ static inline void *GET_WMI_HDL_FROM_PDEV(struct wlan_objmgr_pdev *pdev) return NULL; } +/** + * get_wmi_unified_hdl_from_psoc - get wmi handle from psoc + * @psoc: psoc object + * + * API to get wmi_handle from psoc + * + * Return: wmi_handle on success + * if tgt handle is not initialized, it returns NULL + */ +static inline wmi_unified_t +get_wmi_unified_hdl_from_psoc(struct wlan_objmgr_psoc *psoc) +{ + return (wmi_unified_t)GET_WMI_HDL_FROM_PSOC(psoc); +} + +/** + * get_wmi_unified_hdl_from_pdev - get wmi handle from pdev + * @pdev: pdev object + * + * API to get wmi_handle from pdev + * + * Return: wmi_handle on success + * if tgt handle is not initialized, it returns NULL + */ +static inline wmi_unified_t +get_wmi_unified_hdl_from_pdev(struct wlan_objmgr_pdev *pdev) +{ + return (wmi_unified_t)GET_WMI_HDL_FROM_PDEV(pdev); +} + /** * target_if_ext_res_cfg_enable - Enable ext resource config * @psoc: psoc object diff --git a/target_if/cp_stats/src/target_if_mc_cp_stats.c b/target_if/cp_stats/src/target_if_mc_cp_stats.c index 2c0c5450ebf5..7d2fe71b73ef 100644 --- a/target_if/cp_stats/src/target_if_mc_cp_stats.c +++ b/target_if/cp_stats/src/target_if_mc_cp_stats.c @@ -187,7 +187,7 @@ static int target_if_mc_cp_stats_stats_event_handler(ol_scn_t scn, cp_stats_err("null psoc"); return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); rx_ops = target_if_cp_stats_get_rx_ops(psoc); if (!rx_ops || !rx_ops->process_stats_event) { @@ -259,7 +259,8 @@ target_if_cp_stats_register_event_handler(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_NULL_VALUE; } - status = wmi_unified_register_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), + status = wmi_unified_register_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), wmi_update_stats_event_id, target_if_mc_cp_stats_stats_event_handler, WMI_RX_WORK_CTX); @@ -279,7 +280,8 @@ target_if_cp_stats_unregister_event_handler(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_INVAL; } - wmi_unified_unregister_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), + wmi_unified_unregister_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), wmi_update_stats_event_id); return QDF_STATUS_SUCCESS; @@ -314,7 +316,7 @@ static QDF_STATUS target_if_cp_stats_send_stats_req( struct wmi_unified *wmi_handle; struct stats_request_params param = {0}; - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { cp_stats_err("wmi_handle is null."); return QDF_STATUS_E_NULL_VALUE; diff --git a/target_if/dfs/src/target_if_dfs.c b/target_if/dfs/src/target_if_dfs.c index 72c64803e537..42b9ab9a4b30 100644 --- a/target_if/dfs/src/target_if_dfs.c +++ b/target_if/dfs/src/target_if_dfs.c @@ -138,9 +138,9 @@ static QDF_STATUS target_if_reg_phyerr_events_dfs2( &is_phyerr_filter_offload))) if (is_phyerr_filter_offload) ret = wmi_unified_register_event( - GET_WMI_HDL_FROM_PSOC(psoc), - wmi_dfs_radar_event_id, - target_if_radar_event_handler); + get_wmi_unified_hdl_from_psoc(psoc), + wmi_dfs_radar_event_id, + target_if_radar_event_handler); if (ret) { target_if_err("failed to register wmi_dfs_radar_event_id"); diff --git a/target_if/dfs/src/target_if_dfs_full_offload.c b/target_if/dfs/src/target_if_dfs_full_offload.c index 31e52235cc3f..cadcd9bf7030 100644 --- a/target_if/dfs/src/target_if_dfs_full_offload.c +++ b/target_if/dfs/src/target_if_dfs_full_offload.c @@ -156,12 +156,14 @@ QDF_STATUS target_if_dfs_reg_offload_events( { int ret1, ret2; - ret1 = wmi_unified_register_event(GET_WMI_HDL_FROM_PSOC(psoc), + ret1 = wmi_unified_register_event( + get_wmi_unified_hdl_from_psoc(psoc), wmi_dfs_radar_detection_event_id, target_if_dfs_radar_detection_event_handler); target_if_debug("wmi_dfs_radar_detection_event_id ret=%d", ret1); - ret2 = wmi_unified_register_event(GET_WMI_HDL_FROM_PSOC(psoc), + ret2 = wmi_unified_register_event( + get_wmi_unified_hdl_from_psoc(psoc), wmi_dfs_cac_complete_id, target_if_dfs_cac_complete_event_handler); target_if_debug("wmi_dfs_cac_complete_id ret=%d", ret2); @@ -187,7 +189,7 @@ QDF_STATUS target_process_bang_radar_cmd( return QDF_STATUS_E_FAILURE; } - wmi_handle = GET_WMI_HDL_FROM_PDEV(pdev); + wmi_handle = get_wmi_unified_hdl_from_pdev(pdev); if (!wmi_handle) { target_if_err("null wmi_handle"); return QDF_STATUS_E_FAILURE; diff --git a/target_if/direct_buf_rx/src/target_if_direct_buf_rx_main.c b/target_if/direct_buf_rx/src/target_if_direct_buf_rx_main.c index ea92307d139f..d8553d6f1e35 100644 --- a/target_if/direct_buf_rx/src/target_if_direct_buf_rx_main.c +++ b/target_if/direct_buf_rx/src/target_if_direct_buf_rx_main.c @@ -1006,10 +1006,11 @@ QDF_STATUS target_if_direct_buf_rx_register_events( return QDF_STATUS_E_INVAL; } - ret = wmi_unified_register_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_dma_buf_release_event_id, - target_if_direct_buf_rx_rsp_event_handler, - WMI_RX_UMAC_CTX); + ret = wmi_unified_register_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_dma_buf_release_event_id, + target_if_direct_buf_rx_rsp_event_handler, + WMI_RX_UMAC_CTX); if (ret) direct_buf_rx_info("event handler not supported", ret); @@ -1025,8 +1026,9 @@ QDF_STATUS target_if_direct_buf_rx_unregister_events( return QDF_STATUS_E_INVAL; } - wmi_unified_unregister_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_dma_buf_release_event_id); + wmi_unified_unregister_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_dma_buf_release_event_id); return QDF_STATUS_SUCCESS; } diff --git a/target_if/ftm/src/target_if_ftm.c b/target_if/ftm/src/target_if_ftm.c index f3aa4f305813..40a916dd8ea5 100644 --- a/target_if/ftm/src/target_if_ftm.c +++ b/target_if/ftm/src/target_if_ftm.c @@ -101,7 +101,7 @@ QDF_STATUS target_if_ftm_cmd_send(struct wlan_objmgr_pdev *pdev, return QDF_STATUS_E_FAILURE; } - handle = GET_WMI_HDL_FROM_PDEV(pdev); + handle = get_wmi_unified_hdl_from_pdev(pdev); if (!handle) { target_if_err("null handle"); return QDF_STATUS_E_FAILURE; @@ -126,7 +126,7 @@ QDF_STATUS target_if_ftm_attach(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_FAILURE; } - handle = GET_WMI_HDL_FROM_PSOC(psoc); + handle = get_wmi_unified_hdl_from_psoc(psoc); if (!handle) { target_if_err("null handle"); return QDF_STATUS_E_FAILURE; @@ -154,7 +154,7 @@ QDF_STATUS target_if_ftm_detach(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_FAILURE; } - handle = GET_WMI_HDL_FROM_PSOC(psoc); + handle = get_wmi_unified_hdl_from_psoc(psoc); if (!handle) { target_if_err("null handle"); return QDF_STATUS_E_FAILURE; diff --git a/target_if/init_deinit/inc/init_deinit_ucfg.h b/target_if/init_deinit/inc/init_deinit_ucfg.h index 34dedc6e4748..c1fbc54aff9e 100644 --- a/target_if/init_deinit/inc/init_deinit_ucfg.h +++ b/target_if/init_deinit/inc/init_deinit_ucfg.h @@ -152,7 +152,17 @@ bool ucfg_is_target_ar900b(struct wlan_objmgr_psoc *psoc); * * Return: wmi handler */ -void *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc); +struct common_wmi_handle *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc); + +/** + * ucfg_get_wmi_unified_hdl() - get wmi handle + * @psoc: pointer to psoc + * + * API to get wmi handle + * + * Return: wmi handler + */ +wmi_unified_t ucfg_get_wmi_unified_hdl(struct wlan_objmgr_psoc *psoc); /** * ucfg_get_htc_hdl() - get htc handler @@ -162,7 +172,7 @@ void *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc); * * Return: htc handler */ -void *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc); +struct common_htc_handle *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc); /** * ucfg_set_htc_hdl() - set htc handle @@ -173,7 +183,8 @@ void *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc); * * Return: void */ -void ucfg_set_htc_hdl(struct wlan_objmgr_psoc *psoc, void *htc_hdl); +void ucfg_set_htc_hdl(struct wlan_objmgr_psoc *psoc, + struct common_htc_handle *htc_hdl); /** * ucfg_get_hif_hdl() - get hif handle @@ -183,7 +194,17 @@ void ucfg_set_htc_hdl(struct wlan_objmgr_psoc *psoc, void *htc_hdl); * * Return: hif handler */ -void *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc); +struct common_hif_handle *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc); + +/** + * ucfg_get_ol_hif_hdl() - get hif handle + * @psoc: pointer to psoc + * + * API to get hif handle + * + * Return: hif handler + */ +struct hif_opaque_softc *ucfg_get_ol_hif_hdl(struct wlan_objmgr_psoc *psoc); /** * ucfg_get_pdev_wmi_handle() - get pdev wmi handle @@ -193,7 +214,19 @@ void *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc); * * Return: wmi handle */ -void *ucfg_get_pdev_wmi_handle(struct wlan_objmgr_pdev *pdev); +struct common_wmi_handle *ucfg_get_pdev_wmi_handle( + struct wlan_objmgr_pdev *pdev); + +/** + * ucfg_get_pdev_wmi_unified_handle() - get pdev wmi handle + * @pdev: pointer to dev + * + * API to get wmi handle + * + * Return: wmi handle + */ +wmi_unified_t ucfg_get_pdev_wmi_unified_handle( + struct wlan_objmgr_pdev *pdev); /** * ucfg_get_psoc_feature_ptr() - get feature pointer diff --git a/target_if/init_deinit/src/init_cmd_api.c b/target_if/init_deinit/src/init_cmd_api.c index e1ca4f746717..c6a3c22473d6 100644 --- a/target_if/init_deinit/src/init_cmd_api.c +++ b/target_if/init_deinit/src/init_cmd_api.c @@ -318,7 +318,7 @@ QDF_STATUS init_deinit_handle_host_mem_req( uint32_t i; uint32_t idx; QDF_STATUS status = QDF_STATUS_SUCCESS; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; struct tgt_info *info; if (!tgt_hdl) { @@ -329,8 +329,8 @@ QDF_STATUS init_deinit_handle_host_mem_req( wmi_handle = target_psoc_get_wmi_hdl(tgt_hdl); info = (&tgt_hdl->info); - mem_reqs = wmi_extract_host_mem_req_from_service_ready(wmi_handle, - event, &num_mem_reqs); + mem_reqs = wmi_extract_host_mem_req_from_service_ready( + wmi_handle, event, &num_mem_reqs); if (!num_mem_reqs) return QDF_STATUS_SUCCESS; @@ -425,7 +425,7 @@ void init_deinit_prepare_send_init_cmd( { struct wmi_init_cmd_param init_param = {0}; struct tgt_info *info; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; QDF_STATUS ret_val; if (!tgt_hdl) { diff --git a/target_if/init_deinit/src/init_deinit_ucfg.c b/target_if/init_deinit/src/init_deinit_ucfg.c index 24cd1e1617ec..b7f32ff763f7 100644 --- a/target_if/init_deinit/src/init_deinit_ucfg.c +++ b/target_if/init_deinit/src/init_deinit_ucfg.c @@ -243,7 +243,7 @@ bool ucfg_is_target_ar900b(struct wlan_objmgr_psoc *psoc) } qdf_export_symbol(ucfg_is_target_ar900b); -void *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc) +struct common_wmi_handle *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc) { struct target_psoc_info *tgt_hdl; @@ -262,7 +262,13 @@ void *ucfg_get_wmi_hdl(struct wlan_objmgr_psoc *psoc) } qdf_export_symbol(ucfg_get_wmi_hdl); -void *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc) +wmi_unified_t ucfg_get_wmi_unified_hdl(struct wlan_objmgr_psoc *psoc) +{ + return (wmi_unified_t)ucfg_get_wmi_hdl(psoc); +} +qdf_export_symbol(ucfg_get_wmi_unified_hdl); + +struct common_htc_handle *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc) { struct target_psoc_info *tgt_hdl; @@ -281,7 +287,8 @@ void *ucfg_get_htc_hdl(struct wlan_objmgr_psoc *psoc) } qdf_export_symbol(ucfg_get_htc_hdl); -void ucfg_set_htc_hdl(struct wlan_objmgr_psoc *psoc, void *htc_hdl) +void ucfg_set_htc_hdl(struct wlan_objmgr_psoc *psoc, + struct common_htc_handle *htc_hdl) { struct target_psoc_info *tgt_hdl; @@ -298,7 +305,7 @@ void ucfg_set_htc_hdl(struct wlan_objmgr_psoc *psoc, void *htc_hdl) target_psoc_set_htc_hdl(tgt_hdl, htc_hdl); } -void *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc) +struct common_hif_handle *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc) { struct target_psoc_info *tgt_hdl; @@ -317,7 +324,14 @@ void *ucfg_get_hif_hdl(struct wlan_objmgr_psoc *psoc) } qdf_export_symbol(ucfg_get_hif_hdl); -void *ucfg_get_pdev_wmi_handle(struct wlan_objmgr_pdev *pdev) +struct hif_opaque_softc *ucfg_get_ol_hif_hdl(struct wlan_objmgr_psoc *psoc) +{ + return (struct hif_opaque_softc *)ucfg_get_hif_hdl(psoc); +} +qdf_export_symbol(ucfg_get_ol_hif_hdl); + +struct common_wmi_handle *ucfg_get_pdev_wmi_handle( + struct wlan_objmgr_pdev *pdev) { struct target_pdev_info *tgt_hdl; @@ -336,6 +350,12 @@ void *ucfg_get_pdev_wmi_handle(struct wlan_objmgr_pdev *pdev) } qdf_export_symbol(ucfg_get_pdev_wmi_handle); +wmi_unified_t +ucfg_get_pdev_wmi_unified_handle(struct wlan_objmgr_pdev *pdev) +{ + return (wmi_unified_t)ucfg_get_pdev_wmi_handle(pdev); +} + uint32_t ucfg_get_num_radios(struct wlan_objmgr_psoc *psoc) { struct target_psoc_info *tgt_hdl; diff --git a/target_if/init_deinit/src/init_event_handler.c b/target_if/init_deinit/src/init_event_handler.c index d98bdd57118d..cb70641cc6b8 100644 --- a/target_if/init_deinit/src/init_event_handler.c +++ b/target_if/init_deinit/src/init_event_handler.c @@ -41,7 +41,7 @@ static int init_deinit_service_ready_event_handler(ol_scn_t scn_handle, struct wlan_objmgr_psoc *psoc; struct target_psoc_info *tgt_hdl; wmi_legacy_service_ready_callback legacy_callback; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; QDF_STATUS ret_val; if (!scn_handle) { @@ -173,7 +173,7 @@ static int init_deinit_service_ext_ready_event_handler(ol_scn_t scn_handle, int err_code; struct wlan_objmgr_psoc *psoc; struct target_psoc_info *tgt_hdl; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; struct tgt_info *info; wmi_legacy_service_ready_callback legacy_callback; @@ -262,7 +262,7 @@ static int init_deinit_service_available_handler(ol_scn_t scn_handle, { struct wlan_objmgr_psoc *psoc; struct target_psoc_info *tgt_hdl; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; if (!scn_handle) { target_if_err("scn handle NULL"); @@ -303,7 +303,7 @@ static int init_deinit_ready_event_handler(ol_scn_t scn_handle, struct wlan_objmgr_psoc *psoc; struct wlan_objmgr_pdev *pdev; struct target_psoc_info *tgt_hdl; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; struct wmi_host_fw_abi_ver fw_ver; uint8_t myaddr[QDF_MAC_ADDR_SIZE]; struct tgt_info *info; @@ -450,7 +450,7 @@ QDF_STATUS init_deinit_register_tgt_psoc_ev_handlers( struct wlan_objmgr_psoc *psoc) { struct target_psoc_info *tgt_hdl; - void *wmi_handle; + wmi_unified_t wmi_handle; QDF_STATUS retval = QDF_STATUS_SUCCESS; if (!psoc) { @@ -465,7 +465,7 @@ QDF_STATUS init_deinit_register_tgt_psoc_ev_handlers( return QDF_STATUS_E_FAILURE; } - wmi_handle = target_psoc_get_wmi_hdl(tgt_hdl); + wmi_handle = (wmi_unified_t)target_psoc_get_wmi_hdl(tgt_hdl); retval = wmi_unified_register_event_handler(wmi_handle, wmi_service_ready_event_id, diff --git a/target_if/init_deinit/src/service_ready_util.c b/target_if/init_deinit/src/service_ready_util.c index d9bbbc53acd2..09f411368a77 100644 --- a/target_if/init_deinit/src/service_ready_util.c +++ b/target_if/init_deinit/src/service_ready_util.c @@ -389,7 +389,7 @@ QDF_STATUS init_deinit_validate_160_80p80_fw_caps( bool vhtcap_160mhz_sgi = false; bool valid = false; struct wlan_psoc_host_hal_reg_capabilities_ext *reg_cap; - void *wmi_handle; + struct common_wmi_handle *wmi_handle; if (!tgt_hdl) { target_if_err( @@ -503,7 +503,7 @@ QDF_STATUS init_deinit_is_service_ext_msg( struct wlan_objmgr_psoc *psoc, struct target_psoc_info *tgt_hdl) { - void *wmi_handle; + struct common_wmi_handle *wmi_handle; if (!tgt_hdl) { target_if_err( diff --git a/target_if/nan/src/target_if_nan.c b/target_if/nan/src/target_if_nan.c index 1470c756b695..570c5dffdf9a 100644 --- a/target_if/nan/src/target_if_nan.c +++ b/target_if/nan/src/target_if_nan.c @@ -146,7 +146,7 @@ static QDF_STATUS target_if_nan_ndp_initiator_req( return QDF_STATUS_E_INVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null."); return QDF_STATUS_E_INVAL; @@ -189,7 +189,7 @@ static int target_if_ndp_initiator_rsp_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null"); return -EINVAL; @@ -238,7 +238,7 @@ static int target_if_ndp_ind_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null"); return -EINVAL; @@ -287,7 +287,7 @@ static int target_if_ndp_confirm_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null"); return -EINVAL; @@ -342,7 +342,7 @@ static QDF_STATUS target_if_nan_ndp_responder_req( return QDF_STATUS_E_NULL_VALUE; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null."); return QDF_STATUS_E_NULL_VALUE; @@ -385,7 +385,7 @@ static int target_if_ndp_responder_rsp_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null."); return -EINVAL; @@ -439,7 +439,7 @@ static QDF_STATUS target_if_nan_ndp_end_req(struct nan_datapath_end_req *req) return QDF_STATUS_E_NULL_VALUE; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null."); return QDF_STATUS_E_NULL_VALUE; @@ -483,7 +483,7 @@ static int target_if_ndp_end_rsp_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null."); return -EINVAL; @@ -532,7 +532,7 @@ static int target_if_ndp_end_ind_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("wmi_handle is null."); return -EINVAL; @@ -614,7 +614,7 @@ inline struct wlan_lmac_if_nan_rx_ops *target_if_nan_get_rx_ops( QDF_STATUS target_if_nan_register_events(struct wlan_objmgr_psoc *psoc) { int ret; - wmi_unified_t handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t handle = get_wmi_unified_hdl_from_psoc(psoc); ret = wmi_unified_register_event_handler(handle, wmi_ndp_initiator_rsp_event_id, @@ -681,7 +681,7 @@ QDF_STATUS target_if_nan_register_events(struct wlan_objmgr_psoc *psoc) QDF_STATUS target_if_nan_deregister_events(struct wlan_objmgr_psoc *psoc) { int ret, status = 0; - wmi_unified_t handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t handle = get_wmi_unified_hdl_from_psoc(psoc); ret = wmi_unified_unregister_event_handler(handle, wmi_ndp_end_rsp_event_id); diff --git a/target_if/p2p/src/target_if_p2p.c b/target_if/p2p/src/target_if_p2p.c index 6f6b306e5e6b..03741472dd45 100644 --- a/target_if/p2p/src/target_if_p2p.c +++ b/target_if/p2p/src/target_if_p2p.c @@ -66,7 +66,7 @@ static int target_p2p_lo_event_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("null wmi handle"); return -EINVAL; @@ -132,7 +132,7 @@ static int target_p2p_noa_event_handler(ol_scn_t scn, uint8_t *data, return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_handle) { target_if_err("null wmi handle"); return -EINVAL; @@ -168,7 +168,7 @@ QDF_STATUS target_if_p2p_register_lo_event_handler( struct wlan_objmgr_psoc *psoc, void *arg) { int status; - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); target_if_debug("psoc:%pK, arg:%pK", psoc, arg); @@ -191,7 +191,7 @@ QDF_STATUS target_if_p2p_register_noa_event_handler( struct wlan_objmgr_psoc *psoc, void *arg) { int status; - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); target_if_debug("psoc:%pK, arg:%pK", psoc, arg); @@ -214,7 +214,7 @@ QDF_STATUS target_if_p2p_unregister_lo_event_handler( struct wlan_objmgr_psoc *psoc, void *arg) { int status; - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); target_if_debug("psoc:%pK, arg:%pK", psoc, arg); @@ -236,7 +236,7 @@ QDF_STATUS target_if_p2p_unregister_noa_event_handler( struct wlan_objmgr_psoc *psoc, void *arg) { int status; - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); target_if_debug("psoc:%pK, arg:%pK", psoc, arg); @@ -259,7 +259,7 @@ QDF_STATUS target_if_p2p_set_ps(struct wlan_objmgr_psoc *psoc, { struct p2p_ps_params cmd; QDF_STATUS status; - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); if (!wmi_handle) { target_if_err("Invalid wmi handle"); @@ -300,7 +300,7 @@ QDF_STATUS target_if_p2p_set_ps(struct wlan_objmgr_psoc *psoc, QDF_STATUS target_if_p2p_lo_start(struct wlan_objmgr_psoc *psoc, struct p2p_lo_start *lo_start) { - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); if (!wmi_handle) { target_if_err("Invalid wmi handle"); @@ -319,7 +319,7 @@ QDF_STATUS target_if_p2p_lo_start(struct wlan_objmgr_psoc *psoc, QDF_STATUS target_if_p2p_lo_stop(struct wlan_objmgr_psoc *psoc, uint32_t vdev_id) { - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); target_if_debug("psoc:%pK, vdev_id:%d", psoc, vdev_id); @@ -336,7 +336,7 @@ QDF_STATUS target_if_p2p_set_noa(struct wlan_objmgr_psoc *psoc, uint32_t vdev_id, bool disable_noa) { struct vdev_set_params param; - wmi_unified_t wmi_handle = ucfg_get_wmi_hdl(psoc); + wmi_unified_t wmi_handle = ucfg_get_wmi_unified_hdl(psoc); if (!wmi_handle) { target_if_err("Invalid wmi handle"); diff --git a/target_if/regulatory/src/target_if_reg.c b/target_if/regulatory/src/target_if_reg.c index f05ec16e6d63..ec50a3aa61bd 100644 --- a/target_if/regulatory/src/target_if_reg.c +++ b/target_if/regulatory/src/target_if_reg.c @@ -38,7 +38,7 @@ static inline uint32_t get_chan_list_cc_event_id(void) static bool tgt_if_regulatory_is_11d_offloaded(struct wlan_objmgr_psoc *psoc) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_service_enabled(wmi_handle, wmi_service_11d_offload); @@ -47,7 +47,7 @@ static bool tgt_if_regulatory_is_11d_offloaded(struct wlan_objmgr_psoc static bool tgt_if_regulatory_is_regdb_offloaded(struct wlan_objmgr_psoc *psoc) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_service_enabled(wmi_handle, wmi_service_regulatory_db); @@ -56,7 +56,7 @@ static bool tgt_if_regulatory_is_regdb_offloaded(struct wlan_objmgr_psoc static bool tgt_if_regulatory_is_there_serv_ready_extn(struct wlan_objmgr_psoc *psoc) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_service_enabled(wmi_handle, wmi_service_ext_msg); @@ -236,7 +236,7 @@ static int tgt_reg_ch_avoid_event_handler(ol_scn_t handle, static QDF_STATUS tgt_if_regulatory_register_master_list_handler( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_register_event_handler(wmi_handle, wmi_reg_chan_list_cc_event_id, @@ -248,7 +248,7 @@ static QDF_STATUS tgt_if_regulatory_register_master_list_handler( static QDF_STATUS tgt_if_regulatory_unregister_master_list_handler( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_unregister_event_handler(wmi_handle, wmi_reg_chan_list_cc_event_id); @@ -257,7 +257,7 @@ static QDF_STATUS tgt_if_regulatory_unregister_master_list_handler( static QDF_STATUS tgt_if_regulatory_set_country_code( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_set_country_cmd_send(wmi_handle, arg); @@ -266,7 +266,7 @@ static QDF_STATUS tgt_if_regulatory_set_country_code( static QDF_STATUS tgt_if_regulatory_set_user_country_code( struct wlan_objmgr_psoc *psoc, uint8_t pdev_id, struct cc_regdmn_s *rd) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (wmi_unified_set_user_country_code_cmd_send(wmi_handle, pdev_id, rd) != QDF_STATUS_SUCCESS) { @@ -280,7 +280,7 @@ static QDF_STATUS tgt_if_regulatory_set_user_country_code( static QDF_STATUS tgt_if_regulatory_register_11d_new_cc_handler( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_register_event(wmi_handle, wmi_11d_new_country_event_id, @@ -290,7 +290,7 @@ static QDF_STATUS tgt_if_regulatory_register_11d_new_cc_handler( static QDF_STATUS tgt_if_regulatory_unregister_11d_new_cc_handler( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_unregister_event(wmi_handle, wmi_11d_new_country_event_id); @@ -299,7 +299,7 @@ static QDF_STATUS tgt_if_regulatory_unregister_11d_new_cc_handler( static QDF_STATUS tgt_if_regulatory_register_ch_avoid_event_handler( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_register_event(wmi_handle, wmi_wlan_freq_avoid_event_id, @@ -309,7 +309,7 @@ static QDF_STATUS tgt_if_regulatory_register_ch_avoid_event_handler( static QDF_STATUS tgt_if_regulatory_unregister_ch_avoid_event_handler( struct wlan_objmgr_psoc *psoc, void *arg) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_unregister_event(wmi_handle, wmi_wlan_freq_avoid_event_id); @@ -318,7 +318,7 @@ static QDF_STATUS tgt_if_regulatory_start_11d_scan( struct wlan_objmgr_psoc *psoc, struct reg_start_11d_scan_req *reg_start_11d_scan_req) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_send_start_11d_scan_cmd(wmi_handle, reg_start_11d_scan_req); @@ -328,7 +328,7 @@ static QDF_STATUS tgt_if_regulatory_stop_11d_scan( struct wlan_objmgr_psoc *psoc, struct reg_stop_11d_scan_req *reg_stop_11d_scan_req) { - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); return wmi_unified_send_stop_11d_scan_cmd(wmi_handle, reg_stop_11d_scan_req); diff --git a/target_if/scan/src/target_if_scan.c b/target_if/scan/src/target_if_scan.c index dc9dda0699d2..0974f9971ac1 100644 --- a/target_if/scan/src/target_if_scan.c +++ b/target_if/scan/src/target_if_scan.c @@ -54,7 +54,7 @@ target_if_scan_event_handler(ol_scn_t scn, uint8_t *data, uint32_t datalen) target_if_err("null psoc\n"); return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); event_info = qdf_mem_malloc(sizeof(*event_info)); @@ -193,7 +193,8 @@ target_if_scan_register_pno_event_handler(struct wlan_objmgr_psoc *psoc, { QDF_STATUS status; - status = wmi_unified_register_event(GET_WMI_HDL_FROM_PSOC(psoc), + status = wmi_unified_register_event( + get_wmi_unified_hdl_from_psoc(psoc), wmi_nlo_match_event_id, target_if_nlo_match_event_handler); if (status) { @@ -201,7 +202,8 @@ target_if_scan_register_pno_event_handler(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_E_FAILURE; } - status = wmi_unified_register_event(GET_WMI_HDL_FROM_PSOC(psoc), + status = wmi_unified_register_event( + get_wmi_unified_hdl_from_psoc(psoc), wmi_nlo_scan_complete_event_id, target_if_nlo_complete_handler); if (status) { @@ -218,14 +220,16 @@ target_if_scan_unregister_pno_event_handler(struct wlan_objmgr_psoc *psoc, { QDF_STATUS status; - status = wmi_unified_unregister_event(GET_WMI_HDL_FROM_PSOC(psoc), + status = wmi_unified_unregister_event( + get_wmi_unified_hdl_from_psoc(psoc), wmi_nlo_match_event_id); if (status) { target_if_err("Failed to unregister nlo match event cb"); return QDF_STATUS_E_FAILURE; } - status = wmi_unified_unregister_event(GET_WMI_HDL_FROM_PSOC(psoc), + status = wmi_unified_unregister_event( + get_wmi_unified_hdl_from_psoc(psoc), wmi_nlo_scan_complete_event_id); if (status) { target_if_err("Failed to unregister nlo scan comp event cb"); @@ -296,8 +300,10 @@ target_if_scan_register_event_handler(struct wlan_objmgr_psoc *psoc, void *arg) { QDF_STATUS status; - status = wmi_unified_register_event(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_scan_event_id, target_if_scan_event_handler); + status = wmi_unified_register_event( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_scan_event_id, + target_if_scan_event_handler); if (status) { target_if_err("Failed to register Scan match event cb"); return QDF_STATUS_E_FAILURE; @@ -314,8 +320,9 @@ target_if_scan_unregister_event_handler(struct wlan_objmgr_psoc *psoc, { QDF_STATUS status; - status = wmi_unified_unregister_event(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_scan_event_id); + status = wmi_unified_unregister_event( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_scan_event_id); if (status) { target_if_err("Failed to unregister Scan match event cb"); return QDF_STATUS_E_FAILURE; diff --git a/target_if/tdls/src/target_if_tdls.c b/target_if/tdls/src/target_if_tdls.c index e0a0ef23f916..bbb3c32cf096 100644 --- a/target_if/tdls/src/target_if_tdls.c +++ b/target_if/tdls/src/target_if_tdls.c @@ -57,7 +57,7 @@ target_if_tdls_event_handler(ol_scn_t scn, uint8_t *data, uint32_t datalen) target_if_err("null psoc"); return -EINVAL; } - wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (wmi_extract_vdev_tdls_ev_param(wmi_handle, data, &info)) { target_if_err("Failed to extract wmi tdls event"); @@ -122,7 +122,7 @@ target_if_tdls_set_uapsd(struct wlan_objmgr_psoc *psoc, struct sta_uapsd_trig_params *params) { QDF_STATUS ret; - wmi_unified_t wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc); + wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc); if (!wmi_service_enabled(wmi_handle, wmi_sta_uapsd_basic_auto_trig) || @@ -145,17 +145,19 @@ QDF_STATUS target_if_tdls_register_event_handler(struct wlan_objmgr_psoc *psoc, void *arg) { - return wmi_unified_register_event(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_tdls_peer_event_id, - target_if_tdls_event_handler); + return wmi_unified_register_event( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_tdls_peer_event_id, + target_if_tdls_event_handler); } QDF_STATUS target_if_tdls_unregister_event_handler(struct wlan_objmgr_psoc *psoc, void *arg) { - return wmi_unified_unregister_event(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_tdls_peer_event_id); + return wmi_unified_unregister_event( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_tdls_peer_event_id); } QDF_STATUS diff --git a/target_if/wifi_pos/src/target_if_wifi_pos.c b/target_if/wifi_pos/src/target_if_wifi_pos.c index 9b4504619c84..63625bbd939e 100644 --- a/target_if/wifi_pos/src/target_if_wifi_pos.c +++ b/target_if/wifi_pos/src/target_if_wifi_pos.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2018 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -346,37 +346,41 @@ QDF_STATUS target_if_wifi_pos_register_events(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_INVAL; } - ret = wmi_unified_register_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_response_event_id, - target_if_wifi_pos_oem_rsp_ev_handler, - WMI_RX_WORK_CTX); + ret = wmi_unified_register_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_response_event_id, + target_if_wifi_pos_oem_rsp_ev_handler, + WMI_RX_WORK_CTX); if (ret) { target_if_err("register_event_handler failed: err %d", ret); return QDF_STATUS_E_INVAL; } - ret = wmi_unified_register_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_cap_event_id, - wifi_pos_oem_cap_ev_handler, - WMI_RX_WORK_CTX); + ret = wmi_unified_register_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_cap_event_id, + wifi_pos_oem_cap_ev_handler, + WMI_RX_WORK_CTX); if (ret) { target_if_err("register_event_handler failed: err %d", ret); return QDF_STATUS_E_INVAL; } - ret = wmi_unified_register_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_meas_report_event_id, - wifi_pos_oem_meas_rpt_ev_handler, - WMI_RX_WORK_CTX); + ret = wmi_unified_register_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_meas_report_event_id, + wifi_pos_oem_meas_rpt_ev_handler, + WMI_RX_WORK_CTX); if (ret) { target_if_err("register_event_handler failed: err %d", ret); return QDF_STATUS_E_INVAL; } - ret = wmi_unified_register_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_report_event_id, - wifi_pos_oem_err_rpt_ev_handler, - WMI_RX_WORK_CTX); + ret = wmi_unified_register_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_report_event_id, + wifi_pos_oem_err_rpt_ev_handler, + WMI_RX_WORK_CTX); if (ret) { target_if_err("register_event_handler failed: err %d", ret); return QDF_STATUS_E_INVAL; @@ -392,14 +396,18 @@ QDF_STATUS target_if_wifi_pos_deregister_events(struct wlan_objmgr_psoc *psoc) return QDF_STATUS_E_INVAL; } - wmi_unified_unregister_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_response_event_id); - wmi_unified_unregister_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_cap_event_id); - wmi_unified_unregister_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_meas_report_event_id); - wmi_unified_unregister_event_handler(GET_WMI_HDL_FROM_PSOC(psoc), - wmi_oem_report_event_id); + wmi_unified_unregister_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_response_event_id); + wmi_unified_unregister_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_cap_event_id); + wmi_unified_unregister_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_meas_report_event_id); + wmi_unified_unregister_event_handler( + get_wmi_unified_hdl_from_psoc(psoc), + wmi_oem_report_event_id); return QDF_STATUS_SUCCESS; }