mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
qcacmn: Ignore destroy callback if creating fail
objmgr should not call destroy callbacks for components that have not successfully completed the creating callback. Or the function wlan_objmgr_xxx_obj_destroy returns with QDF_STATUS_E_FAILURE and doesn't call wlan_objmgr_xxx_obj_free to free the psoc/pdev/vdev/peer. Change-Id: I1ba5a6afd98254cbed4571d5fb1cd24543e1db54 CRs-Fixed: 2318184
This commit is contained in:
parent
ba7946a147
commit
da522d8f7c
4 changed files with 12 additions and 4 deletions
|
|
@ -207,7 +207,9 @@ static QDF_STATUS wlan_objmgr_pdev_obj_destroy(struct wlan_objmgr_pdev *pdev)
|
|||
for (id = 0; id < WLAN_UMAC_MAX_COMPONENTS; id++) {
|
||||
handler = g_umac_glb_obj->pdev_destroy_handler[id];
|
||||
arg = g_umac_glb_obj->pdev_destroy_handler_arg[id];
|
||||
if (handler != NULL)
|
||||
if (handler &&
|
||||
(pdev->obj_status[id] == QDF_STATUS_SUCCESS ||
|
||||
pdev->obj_status[id] == QDF_STATUS_COMP_ASYNC))
|
||||
pdev->obj_status[id] = handler(pdev, arg);
|
||||
else
|
||||
pdev->obj_status[id] = QDF_STATUS_COMP_DISABLED;
|
||||
|
|
|
|||
|
|
@ -303,7 +303,9 @@ static QDF_STATUS wlan_objmgr_peer_obj_destroy(struct wlan_objmgr_peer *peer)
|
|||
for (id = 0; id < WLAN_UMAC_MAX_COMPONENTS; id++) {
|
||||
handler = g_umac_glb_obj->peer_destroy_handler[id];
|
||||
arg = g_umac_glb_obj->peer_destroy_handler_arg[id];
|
||||
if (handler != NULL)
|
||||
if (handler &&
|
||||
(peer->obj_status[id] == QDF_STATUS_SUCCESS ||
|
||||
peer->obj_status[id] == QDF_STATUS_COMP_ASYNC))
|
||||
peer->obj_status[id] = handler(peer, arg);
|
||||
else
|
||||
peer->obj_status[id] = QDF_STATUS_COMP_DISABLED;
|
||||
|
|
|
|||
|
|
@ -215,7 +215,9 @@ static QDF_STATUS wlan_objmgr_psoc_obj_destroy(struct wlan_objmgr_psoc *psoc)
|
|||
for (id = 0; id < WLAN_UMAC_MAX_COMPONENTS; id++) {
|
||||
handler = g_umac_glb_obj->psoc_destroy_handler[id];
|
||||
arg = g_umac_glb_obj->psoc_destroy_handler_arg[id];
|
||||
if (handler != NULL)
|
||||
if (handler &&
|
||||
(psoc->obj_status[id] == QDF_STATUS_SUCCESS ||
|
||||
psoc->obj_status[id] == QDF_STATUS_COMP_ASYNC))
|
||||
psoc->obj_status[id] = handler(psoc, arg);
|
||||
else
|
||||
psoc->obj_status[id] = QDF_STATUS_COMP_DISABLED;
|
||||
|
|
|
|||
|
|
@ -293,7 +293,9 @@ static QDF_STATUS wlan_objmgr_vdev_obj_destroy(struct wlan_objmgr_vdev *vdev)
|
|||
for (id = 0; id < WLAN_UMAC_MAX_COMPONENTS; id++) {
|
||||
handler = g_umac_glb_obj->vdev_destroy_handler[id];
|
||||
arg = g_umac_glb_obj->vdev_destroy_handler_arg[id];
|
||||
if (handler != NULL)
|
||||
if (handler &&
|
||||
(vdev->obj_status[id] == QDF_STATUS_SUCCESS ||
|
||||
vdev->obj_status[id] == QDF_STATUS_COMP_ASYNC))
|
||||
vdev->obj_status[id] = handler(vdev, arg);
|
||||
else
|
||||
vdev->obj_status[id] = QDF_STATUS_COMP_DISABLED;
|
||||
|
|
|
|||
Loading…
Reference in a new issue