qcacmn: restructure function in target_if_free_psoc_tgt_info
Restructure memory free function so both win&mcl can call it. to avoid memory free mismatch. Change-Id: I31634f94421f30d74d2eaad44e5df089d489d67f CRs-Fixed: 3572976
This commit is contained in:

committad av
Rahul Choudhary

förälder
2e35a8785e
incheckning
6b70bdc5b0
@@ -519,6 +519,18 @@ QDF_STATUS target_if_free_pdev_tgt_info(struct wlan_objmgr_pdev *pdev);
|
||||
*/
|
||||
QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc);
|
||||
|
||||
/**
|
||||
* target_if_psoc_tgt_info_mem_free() - free memory which attached in
|
||||
* psoc tgt info
|
||||
* @tgt_psoc_info: target psoc info object
|
||||
*
|
||||
* API to free allocated memory for target_psoc_info
|
||||
*
|
||||
* Return: SUCCESS on successful memory deallocation or Failure
|
||||
*/
|
||||
QDF_STATUS target_if_psoc_tgt_info_mem_free(
|
||||
struct target_psoc_info *tgt_psoc_info);
|
||||
|
||||
/**
|
||||
* target_if_free_psoc_tgt_info() - free psoc tgt info
|
||||
* @psoc: pointer to psoc
|
||||
|
@@ -774,10 +774,33 @@ QDF_STATUS target_if_alloc_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS target_if_psoc_tgt_info_mem_free(
|
||||
struct target_psoc_info *tgt_psoc_info)
|
||||
{
|
||||
struct wlan_psoc_host_service_ext_param *ext_param;
|
||||
|
||||
if (!tgt_psoc_info) {
|
||||
target_if_err("tgt_psoc_info is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
/* reminder to move this into init_deinit_chainmask_table_free */
|
||||
ext_param = target_psoc_get_service_ext_param(tgt_psoc_info);
|
||||
if (ext_param)
|
||||
init_deinit_chainmask_table_free(ext_param);
|
||||
|
||||
init_deinit_dbr_ring_cap_free(tgt_psoc_info);
|
||||
init_deinit_spectral_scaling_params_free(tgt_psoc_info);
|
||||
init_deinit_scan_radio_cap_free(tgt_psoc_info);
|
||||
init_deinit_msdu_idx_qtype_map_free(tgt_psoc_info);
|
||||
init_deinit_aux_dev_cap_free(tgt_psoc_info);
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS target_if_free_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct target_psoc_info *tgt_psoc_info;
|
||||
struct wlan_psoc_host_service_ext_param *ext_param;
|
||||
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
@@ -786,18 +809,7 @@ QDF_STATUS target_if_free_psoc_tgt_info(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
tgt_psoc_info = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
ext_param = target_psoc_get_service_ext_param(tgt_psoc_info);
|
||||
if (!ext_param) {
|
||||
target_if_err("tgt_psoc_info is NULL");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
init_deinit_chainmask_table_free(ext_param);
|
||||
init_deinit_dbr_ring_cap_free(tgt_psoc_info);
|
||||
init_deinit_spectral_scaling_params_free(tgt_psoc_info);
|
||||
init_deinit_scan_radio_cap_free(tgt_psoc_info);
|
||||
init_deinit_msdu_idx_qtype_map_free(tgt_psoc_info);
|
||||
init_deinit_aux_dev_cap_free(tgt_psoc_info);
|
||||
|
||||
target_if_psoc_tgt_info_mem_free(tgt_psoc_info);
|
||||
qdf_event_destroy(&tgt_psoc_info->info.event);
|
||||
|
||||
wlan_psoc_set_tgt_if_handle(psoc, NULL);
|
||||
|
Referens i nytt ärende
Block a user