qcacld-3.0: Make sure to initialize global target_if before soc create
Make sure to initialize global target_if before soc create as part of this psoc notifications are registered. Change-Id: Id5491a2aac49450774532fe69ee24e18c9a7c594 CRs-Fixed: 2351426
This commit is contained in:
@@ -13021,10 +13021,14 @@ static QDF_STATUS hdd_component_init(void)
|
|||||||
QDF_STATUS status;
|
QDF_STATUS status;
|
||||||
|
|
||||||
/* initialize converged components */
|
/* initialize converged components */
|
||||||
status = dispatcher_init();
|
status = target_if_init(wma_get_psoc_from_scn_handle);
|
||||||
if (QDF_IS_STATUS_ERROR(status))
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
|
status = dispatcher_init();
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
goto target_if_deinit;
|
||||||
|
|
||||||
/* initialize non-converged components */
|
/* initialize non-converged components */
|
||||||
status = ucfg_mlme_init();
|
status = ucfg_mlme_init();
|
||||||
if (QDF_IS_STATUS_ERROR(status))
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
@@ -13094,6 +13098,8 @@ mlme_deinit:
|
|||||||
ucfg_mlme_deinit();
|
ucfg_mlme_deinit();
|
||||||
dispatcher_deinit:
|
dispatcher_deinit:
|
||||||
dispatcher_deinit();
|
dispatcher_deinit();
|
||||||
|
target_if_deinit:
|
||||||
|
target_if_deinit();
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
@@ -13120,6 +13126,7 @@ static void hdd_component_deinit(void)
|
|||||||
|
|
||||||
/* deinitialize converged components */
|
/* deinitialize converged components */
|
||||||
dispatcher_deinit();
|
dispatcher_deinit();
|
||||||
|
target_if_deinit();
|
||||||
}
|
}
|
||||||
|
|
||||||
QDF_STATUS hdd_component_psoc_open(struct wlan_objmgr_psoc *psoc)
|
QDF_STATUS hdd_component_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||||
|
@@ -2590,4 +2590,14 @@ void wma_check_and_set_wake_timer(uint32_t time);
|
|||||||
*/
|
*/
|
||||||
uint8_t wma_rx_invalid_peer_ind(uint8_t vdev_id, void *wh);
|
uint8_t wma_rx_invalid_peer_ind(uint8_t vdev_id, void *wh);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wma_get_psoc_from_scn_handle() - API to get psoc from scn handle
|
||||||
|
* @scn_handle: opaque wma handle
|
||||||
|
*
|
||||||
|
* API to get psoc from scn handle
|
||||||
|
*
|
||||||
|
* Return: psoc context or null in case of failure
|
||||||
|
*/
|
||||||
|
struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -2289,27 +2289,6 @@ static void wma_target_if_close(tp_wma_handle wma_handle)
|
|||||||
wlan_global_lmac_if_close(psoc);
|
wlan_global_lmac_if_close(psoc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* wma_get_psoc_from_scn_handle() - API to get psoc from scn handle
|
|
||||||
* @scn_handle: opaque wma handle
|
|
||||||
*
|
|
||||||
* API to get psoc from scn handle
|
|
||||||
*
|
|
||||||
* Return: None
|
|
||||||
*/
|
|
||||||
static struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle)
|
|
||||||
{
|
|
||||||
tp_wma_handle wma_handle;
|
|
||||||
|
|
||||||
if (!scn_handle) {
|
|
||||||
WMA_LOGE("invalid scn handle");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
wma_handle = (tp_wma_handle)scn_handle;
|
|
||||||
|
|
||||||
return wma_handle->psoc;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wma_get_pdev_from_scn_handle() - API to get pdev from scn handle
|
* wma_get_pdev_from_scn_handle() - API to get pdev from scn handle
|
||||||
* @scn_handle: opaque wma handle
|
* @scn_handle: opaque wma handle
|
||||||
@@ -3094,6 +3073,19 @@ static void wma_register_apf_events(tp_wma_handle wma_handle)
|
|||||||
}
|
}
|
||||||
#endif /* FEATURE_WLAN_APF */
|
#endif /* FEATURE_WLAN_APF */
|
||||||
|
|
||||||
|
struct wlan_objmgr_psoc *wma_get_psoc_from_scn_handle(void *scn_handle)
|
||||||
|
{
|
||||||
|
tp_wma_handle wma_handle;
|
||||||
|
|
||||||
|
if (!scn_handle) {
|
||||||
|
WMA_LOGE("invalid scn handle");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
wma_handle = (tp_wma_handle)scn_handle;
|
||||||
|
|
||||||
|
return wma_handle->psoc;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* wma_get_phy_mode_cb() - Callback to get current PHY Mode.
|
* wma_get_phy_mode_cb() - Callback to get current PHY Mode.
|
||||||
* @chan: channel number
|
* @chan: channel number
|
||||||
@@ -3217,9 +3209,7 @@ QDF_STATUS wma_open(struct wlan_objmgr_psoc *psoc,
|
|||||||
}
|
}
|
||||||
wma_handle->psoc = psoc;
|
wma_handle->psoc = psoc;
|
||||||
|
|
||||||
/* Open target_if layer and register wma callback */
|
|
||||||
wma_target_if_open(wma_handle);
|
wma_target_if_open(wma_handle);
|
||||||
target_if_open(wma_get_psoc_from_scn_handle);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate locally used params with its rx_ops member,
|
* Allocate locally used params with its rx_ops member,
|
||||||
@@ -3691,7 +3681,6 @@ err_scn_context:
|
|||||||
OS_FREE(wmi_handle);
|
OS_FREE(wmi_handle);
|
||||||
|
|
||||||
err_wma_handle:
|
err_wma_handle:
|
||||||
target_if_close();
|
|
||||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_LEGACY_WMA_ID);
|
wlan_objmgr_psoc_release_ref(psoc, WLAN_LEGACY_WMA_ID);
|
||||||
err_get_psoc_ref:
|
err_get_psoc_ref:
|
||||||
target_if_free_psoc_tgt_info(psoc);
|
target_if_free_psoc_tgt_info(psoc);
|
||||||
@@ -4800,7 +4789,6 @@ QDF_STATUS wma_close(void)
|
|||||||
|
|
||||||
wlan_objmgr_psoc_release_ref(wma_handle->psoc, WLAN_LEGACY_WMA_ID);
|
wlan_objmgr_psoc_release_ref(wma_handle->psoc, WLAN_LEGACY_WMA_ID);
|
||||||
wma_handle->psoc = NULL;
|
wma_handle->psoc = NULL;
|
||||||
target_if_close();
|
|
||||||
wma_target_if_close(wma_handle);
|
wma_target_if_close(wma_handle);
|
||||||
|
|
||||||
WMA_LOGD("%s: Exit", __func__);
|
WMA_LOGD("%s: Exit", __func__);
|
||||||
|
Reference in New Issue
Block a user