diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h index 9229c6ac36..b4f9122b32 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_cmn.h @@ -97,10 +97,11 @@ typedef enum { /* Object type is assigned with value */ enum wlan_objmgr_obj_type { - WLAN_PSOC_OP = 0, - WLAN_PDEV_OP = 1, - WLAN_VDEV_OP = 2, - WLAN_PEER_OP = 3, + WLAN_PSOC_OP = 0, + WLAN_PDEV_OP = 1, + WLAN_VDEV_OP = 2, + WLAN_PEER_OP = 3, + WLAN_OBJ_TYPE_MAX = 4, }; /** diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_debug.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_debug.h new file mode 100644 index 0000000000..2df21f0d6d --- /dev/null +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_debug.h @@ -0,0 +1,96 @@ + /* + * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ + /** + * DOC: Public Data Structures to perform debug operations + * on object manager + */ + +#ifndef _WLAN_OBJMGR_DEBUG_H_ +#define _WLAN_OBJMGR_DEBUG_H_ + +#include + +#ifdef WLAN_OBJMGR_DEBUG + +/** + * wlan_objmgr_notify_log_delete()- insert + * logically deleted object into list + * @obj: object to be inserted + * @obj_type: type of object to be inserted + * + * Return: void + */ +void wlan_objmgr_notify_log_delete(void *obj, + enum wlan_objmgr_obj_type obj_type); + +/** + * wlan_objmgr_notify_destroy() - remove + * logically deleted object from list + * @obj: object to be removed + * @obj_type: type of object to be removed + * + * Return: void + */ +void wlan_objmgr_notify_destroy(void *obj, + enum wlan_objmgr_obj_type obj_type); + +/** + * wlan_objmgr_debug_info_init() - initialize + * the logically deleted list object + * Caller need to protect with global object lock + * + * Return: void + */ +void wlan_objmgr_debug_info_init(void); + +/** + * wlan_objmgr_debug_info_deinit() - deinitialize + * the logically deleted list object + * + * Return: void + */ +void wlan_objmgr_debug_info_deinit(void); + + +#else + +static inline void +wlan_objmgr_notify_log_delete(void *obj, + enum wlan_objmgr_obj_type obj_type) +{ +} + +static inline void +wlan_objmgr_notify_destroy(void *obj, + enum wlan_objmgr_obj_type obj_typ) +{ +} + +static inline void +wlan_objmgr_debug_info_init(void) +{ +} + +static inline void +wlan_objmgr_debug_info_deinit(void) +{ +} + +#endif /*WLAN_OBJMGR_DEBUG*/ + +#endif /*_WLAN_OBJMGR_DEBUG_H_*/ diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h index eb392e3355..6fa65357f9 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_peer_obj.h @@ -24,6 +24,7 @@ #include #include +#include "wlan_objmgr_vdev_obj.h" /* peer flags */ /* authorized for data */ @@ -848,4 +849,27 @@ static inline void *wlan_peer_get_dp_handle(struct wlan_objmgr_peer *peer) return peer->dp_handle; } +/** + * wlan_peer_get_psoc() - get psoc + * @peer: PEER object + * + * API to get peer's psoc + * + * Return: PSOC object or NULL if the psoc can not be found + */ +static inline struct wlan_objmgr_psoc *wlan_peer_get_psoc( + struct wlan_objmgr_peer *peer) +{ + struct wlan_objmgr_vdev *vdev; + struct wlan_objmgr_psoc *psoc; + + vdev = wlan_peer_get_vdev(peer); + if (!vdev) + return NULL; + + psoc = wlan_vdev_get_psoc(vdev); + + return psoc; +} + #endif /* _WLAN_OBJMGR_PEER_OBJ_H_*/ diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h index af142b0724..98cff79b53 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_psoc_obj.h @@ -23,6 +23,7 @@ #define _WLAN_OBJMGR_PSOC_OBJ_H_ #include "wlan_objmgr_cmn.h" +#include "wlan_objmgr_debug.h" #include "wlan_lmac_if_def.h" #define REG_DMN_CH144 0x0001 diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c new file mode 100644 index 0000000000..911b5b4aa0 --- /dev/null +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_debug.c @@ -0,0 +1,387 @@ +/* + * + * Copyright (c) 2018 The Linux Foundation. All rights reserved. + * + * Permission to use, copy, modify, and/or distribute this software for + * any purpose with or without fee is hereby granted, provided that the + * above copyright notice and this permission notice appear in all + * copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL + * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE + * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + */ +/* + * DOC: Public APIs to perform debug operations on object manager + */ + +#include +#include +#include +#include +#include "wlan_objmgr_global_obj_i.h" +#include + +#define LOG_DEL_OBJ_TIMEOUT_VALUE_MSEC 5000 +#define LOG_DEL_OBJ_DESTROY_DURATION_SEC 5 +#define LOG_DEL_OBJ_LIST_MAX_COUNT (3 + 5 + 48 + 4096) + +/** + * struct log_del_obj - Logically deleted Object + * @obj: Represents peer/vdev/pdev/psoc + * @node: List node from Logically deleted list + * @obj_type: Object type for peer/vdev/pdev/psoc + * @tstamp: Timestamp when node entered logically + * deleted state + */ +struct log_del_obj { + void *obj; + qdf_list_node_t node; + enum wlan_objmgr_obj_type obj_type; + qdf_time_t tstamp; +}; + +/** + * struct wlan_objmgr_debug_info - Objmgr debug info + * for Logically deleted object + * @obj_timer: Timer object + * @obj_list: list object having linking logically + * deleted nodes + * @list_lock: lock to protect list + */ +struct wlan_objmgr_debug_info { + qdf_timer_t obj_timer; + qdf_list_t obj_list; + qdf_spinlock_t list_lock; +}; + +static const char * +wlan_obj_type_get_obj_name(enum wlan_objmgr_obj_type obj_type) +{ + static const struct wlan_obj_type_to_name { + enum wlan_objmgr_obj_type obj_type; + const char *name; + } obj_type_name[WLAN_OBJ_TYPE_MAX] = { + {WLAN_PSOC_OP, "psoc"}, + {WLAN_PDEV_OP, "pdev"}, + {WLAN_VDEV_OP, "vdev"}, + {WLAN_PEER_OP, "peer"} + }; + uint8_t idx; + + for (idx = 0; idx < WLAN_OBJ_TYPE_MAX; idx++) { + if (obj_type == obj_type_name[idx].obj_type) + return obj_type_name[idx].name; + } + + return NULL; +} + +static uint8_t* +wlan_objmgr_debug_get_macaddr(void *obj, + enum wlan_objmgr_obj_type obj_type) +{ + switch (obj_type) { + case WLAN_PSOC_OP: + return wlan_psoc_get_hw_macaddr(obj); + case WLAN_PDEV_OP: + return wlan_pdev_get_hw_macaddr(obj); + case WLAN_VDEV_OP: + return wlan_vdev_mlme_get_macaddr(obj); + case WLAN_PEER_OP: + return wlan_peer_get_macaddr(obj); + default: + obj_mgr_err("invalid obj_type"); + return NULL; + } +} + +static void +wlan_objmgr_insert_ld_obj_to_list(struct wlan_objmgr_debug_info *debug_info, + qdf_list_node_t *node) +{ + /* Insert object to list with lock being held*/ + qdf_spin_lock_bh(&debug_info->list_lock); + + /* Start timer only when list is empty */ + if (qdf_list_empty(&debug_info->obj_list)) + qdf_timer_start(&debug_info->obj_timer, + LOG_DEL_OBJ_TIMEOUT_VALUE_MSEC); + + qdf_list_insert_back(&debug_info->obj_list, node); + qdf_spin_unlock_bh(&debug_info->list_lock); +} + +void wlan_objmgr_notify_log_delete(void *obj, + enum wlan_objmgr_obj_type obj_type) +{ + struct wlan_objmgr_debug_info *debug_info; + const char *obj_name; + uint8_t *macaddr; + qdf_time_t tstamp; + struct log_del_obj *node; + + if (!obj) { + obj_mgr_err("object is null"); + return; + } + + qdf_spin_lock_bh(&g_umac_glb_obj->global_lock); + debug_info = g_umac_glb_obj->debug_info; + qdf_spin_unlock_bh(&g_umac_glb_obj->global_lock); + + if (!debug_info) { + obj_mgr_err("debug_info is null"); + return; + } + + macaddr = wlan_objmgr_debug_get_macaddr(obj, obj_type); + if (!macaddr) { + obj_mgr_err("macaddr is null"); + return; + } + + obj_name = wlan_obj_type_get_obj_name(obj_type); + if (!obj_name) { + obj_mgr_err("obj_name is null"); + return; + } + + tstamp = qdf_system_ticks_to_msecs(qdf_system_ticks()) / 1000; + node = qdf_mem_malloc(sizeof(*node)); + if (!node) { + obj_mgr_err("Object node creation failed"); + return; + } + node->obj = obj; + node->obj_type = obj_type; + node->tstamp = tstamp; + obj_mgr_alert("#%s : mac_addr :" QDF_MAC_ADDR_STR" entered L-state", + obj_name, QDF_MAC_ADDR_ARRAY(macaddr)); + wlan_objmgr_insert_ld_obj_to_list(debug_info, &node->node); +} + +static void +wlan_objmgr_rem_ld_obj_from_list(void *obj, + struct wlan_objmgr_debug_info *debug_info, + enum wlan_objmgr_obj_type obj_type) +{ + qdf_list_node_t *node = NULL; + struct log_del_obj *obj_to_remove = NULL; + qdf_list_t *list; + QDF_STATUS status; + + list = &debug_info->obj_list; + qdf_spin_lock_bh(&debug_info->list_lock); + status = qdf_list_peek_front(list, &node); + + while (QDF_IS_STATUS_SUCCESS(status)) { + obj_to_remove = qdf_container_of(node, + struct log_del_obj, node); + if (obj_to_remove->obj == obj && + obj_to_remove->obj_type == obj_type) { + status = qdf_list_remove_node(list, + &obj_to_remove->node); + /* Stop timer if list is empty */ + if (QDF_IS_STATUS_SUCCESS(status)) { + if (qdf_list_empty(&debug_info->obj_list)) + qdf_timer_stop(&debug_info->obj_timer); + qdf_mem_free(obj_to_remove); + } + break; + } + status = qdf_list_peek_next(list, node, &node); + }; + qdf_spin_unlock_bh(&debug_info->list_lock); +} + +void wlan_objmgr_notify_destroy(void *obj, + enum wlan_objmgr_obj_type obj_type) +{ + struct wlan_objmgr_debug_info *debug_info; + uint8_t *macaddr; + const char *obj_name; + + qdf_spin_lock_bh(&g_umac_glb_obj->global_lock); + debug_info = g_umac_glb_obj->debug_info; + qdf_spin_unlock_bh(&g_umac_glb_obj->global_lock); + + if (!debug_info) { + obj_mgr_err("debug_info is null"); + return; + } + macaddr = wlan_objmgr_debug_get_macaddr(obj, obj_type); + if (!macaddr) { + obj_mgr_err("macaddr is null"); + return; + } + obj_name = wlan_obj_type_get_obj_name(obj_type); + if (!obj_name) { + obj_mgr_err("obj_name is null"); + return; + } + obj_mgr_alert("#%s, macaddr: " QDF_MAC_ADDR_STR" exited L-state", + obj_name, QDF_MAC_ADDR_ARRAY(macaddr)); + + wlan_objmgr_rem_ld_obj_from_list(obj, debug_info, obj_type); +} + +/* timeout handler for iterating logically deleted object */ + +static void wlan_objmgr_iterate_log_del_obj_handler(void *timer_arg) +{ + enum wlan_objmgr_obj_type obj_type; + uint8_t *macaddr; + const char *obj_name; + struct wlan_objmgr_debug_info *debug_info; + qdf_list_node_t *node; + qdf_list_t *log_del_obj_list = NULL; + struct log_del_obj *del_obj = NULL; + qdf_time_t cur_tstamp; + QDF_STATUS status; + + qdf_spin_lock_bh(&g_umac_glb_obj->global_lock); + debug_info = g_umac_glb_obj->debug_info; + qdf_spin_unlock_bh(&g_umac_glb_obj->global_lock); + + if (!debug_info) { + obj_mgr_err("debug_info is not initialized"); + return; + } + + log_del_obj_list = &debug_info->obj_list; + qdf_spin_lock_bh(&debug_info->list_lock); + + status = qdf_list_peek_front(log_del_obj_list, &node); + if (QDF_IS_STATUS_ERROR(status)) { + qdf_spin_unlock_bh(&debug_info->list_lock); + return; + } + + /* compute the current timestamp in seconds + * need to compare with destroy duration of object + */ + cur_tstamp = (qdf_system_ticks_to_msecs(qdf_system_ticks()) / 1000); + + do { + del_obj = qdf_container_of(node, struct log_del_obj, node); + obj_type = del_obj->obj_type; + macaddr = wlan_objmgr_debug_get_macaddr(del_obj->obj, obj_type); + obj_name = wlan_obj_type_get_obj_name(obj_type); + + /* If object is in logically deleted state for time more than + * destroy duration, print the object type and MAC + */ + if (cur_tstamp < (del_obj->tstamp + + LOG_DEL_OBJ_DESTROY_DURATION_SEC)) { + break; + } + if (!macaddr) { + obj_mgr_err("macaddr is null"); + return; + } + if (!obj_name) { + obj_mgr_err("obj_name is null"); + return; + } + + obj_mgr_alert("#%s in L-state,MAC: " QDF_MAC_ADDR_STR, + obj_name, QDF_MAC_ADDR_ARRAY(macaddr)); + + status = qdf_list_peek_next(log_del_obj_list, node, &node); + + } while (QDF_IS_STATUS_SUCCESS(status)); + + qdf_spin_unlock_bh(&debug_info->list_lock); + + /* modify timer timeout value */ + qdf_timer_mod(&debug_info->obj_timer, LOG_DEL_OBJ_TIMEOUT_VALUE_MSEC); +} + +void wlan_objmgr_debug_info_deinit(void) +{ + struct log_del_obj *obj_to_remove; + struct wlan_objmgr_debug_info *debug_info; + qdf_list_node_t *node = NULL; + qdf_list_t *list; + bool is_child_alive = false; + + qdf_spin_lock_bh(&g_umac_glb_obj->global_lock); + debug_info = g_umac_glb_obj->debug_info; + qdf_spin_unlock_bh(&g_umac_glb_obj->global_lock); + + if (!debug_info) { + obj_mgr_err("debug_info is not initialized"); + return; + } + list = &debug_info->obj_list; + + qdf_spin_lock_bh(&debug_info->list_lock); + + /* Check if any child of global object is in L-state and remove it, + * ideally it shouldn't be + */ + while (qdf_list_remove_front(list, &node) == QDF_STATUS_SUCCESS) { + is_child_alive = true; + obj_to_remove = qdf_container_of(node, + struct log_del_obj, node); + if (qdf_list_empty(&debug_info->obj_list)) + qdf_timer_stop(&debug_info->obj_timer); + /* free the object */ + qdf_mem_free(obj_to_remove); + } + qdf_spin_unlock_bh(&debug_info->list_lock); + + if (is_child_alive) { + obj_mgr_alert("This shouldn't happen!!, No child of global" + "object should be in L-state, as global obj" + "is going to destroy"); + QDF_BUG(0); + } + + /* free timer, destroy spinlock, list and debug_info object as + * global object is going to free + */ + qdf_list_destroy(list); + qdf_timer_free(&debug_info->obj_timer); + qdf_spinlock_destroy(&debug_info->list_lock); + qdf_mem_free(debug_info); + + qdf_spin_lock_bh(&g_umac_glb_obj->global_lock); + g_umac_glb_obj->debug_info = NULL; + qdf_spin_unlock_bh(&g_umac_glb_obj->global_lock); +} + +void wlan_objmgr_debug_info_init(void) +{ + struct wlan_objmgr_debug_info *debug_info; + + debug_info = qdf_mem_malloc(sizeof(*debug_info)); + if (!debug_info) { + obj_mgr_err("debug_info allocation failed"); + g_umac_glb_obj->debug_info = NULL; + return; + } + + /* Initialize timer with timeout handler */ + qdf_timer_init(NULL, &debug_info->obj_timer, + wlan_objmgr_iterate_log_del_obj_handler, + NULL, QDF_TIMER_TYPE_WAKE_APPS); + + /* Initialze the node_count to 0 and create list*/ + qdf_list_create(&debug_info->obj_list, + LOG_DEL_OBJ_LIST_MAX_COUNT); + + /* Initialize the spin_lock to protect list */ + qdf_spinlock_create(&debug_info->list_lock); + + /* attach debug_info object to global object */ + qdf_spin_lock_bh(&g_umac_glb_obj->global_lock); + g_umac_glb_obj->debug_info = debug_info; + qdf_spin_unlock_bh(&g_umac_glb_obj->global_lock); +} diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c index dd800f1835..143af75a0d 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c @@ -51,6 +51,7 @@ QDF_STATUS wlan_objmgr_global_obj_init(void) g_umac_glb_obj = umac_global_obj; /* Initialize spinlock */ qdf_spinlock_create(&g_umac_glb_obj->global_lock); + wlan_objmgr_debug_info_init(); return QDF_STATUS_SUCCESS; } @@ -64,6 +65,8 @@ QDF_STATUS wlan_objmgr_global_obj_deinit(void) return QDF_STATUS_E_FAILURE; } + wlan_objmgr_debug_info_deinit(); + if (QDF_STATUS_SUCCESS == wlan_objmgr_global_obj_can_destroyed()) { qdf_spinlock_destroy(&g_umac_glb_obj->global_lock); qdf_mem_free(g_umac_glb_obj); diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj_i.h b/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj_i.h index 2b852b4592..a45a6563d2 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj_i.h +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj_i.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -22,6 +22,8 @@ #define _WLAN_OBJMGR_GLOBAL_OBJ_I_H_ #include "wlan_objmgr_cmn.h" + +struct wlan_objmgr_debug_info; /** * struct wlan_objmgr_global - Global object definition * @psoc[]: Array of PSOCs to maintain PSOC's list, @@ -50,6 +52,7 @@ * @peer_destroy_handler_arg[]: PEER destroy handler args array * @peer_status_handler[]: PEER status handler array * @peer_status_handler_arg[]: PEER status handler args array + * @debug_info: Objmgr debug information * @global_lock: Global lock */ struct wlan_objmgr_global { @@ -90,6 +93,7 @@ struct wlan_objmgr_global { wlan_objmgr_peer_status_handler peer_status_handler[WLAN_UMAC_MAX_COMPONENTS]; void *peer_status_handler_arg[WLAN_UMAC_MAX_COMPONENTS]; + struct wlan_objmgr_debug_info *debug_info; qdf_spinlock_t global_lock; }; diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_pdev_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_pdev_obj.c index 16595e1028..e5857b7442 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_pdev_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_pdev_obj.c @@ -189,6 +189,7 @@ static QDF_STATUS wlan_objmgr_pdev_obj_destroy(struct wlan_objmgr_pdev *pdev) obj_mgr_err("pdev is NULL"); return QDF_STATUS_E_FAILURE; } + wlan_objmgr_notify_destroy(pdev, WLAN_PDEV_OP); pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev); @@ -255,6 +256,7 @@ QDF_STATUS wlan_objmgr_pdev_obj_delete(struct wlan_objmgr_pdev *pdev) wlan_pdev_obj_lock(pdev); pdev->obj_state = WLAN_OBJ_STATE_LOGICALLY_DELETED; wlan_pdev_obj_unlock(pdev); + wlan_objmgr_notify_log_delete(pdev, WLAN_PDEV_OP); wlan_objmgr_pdev_release_ref(pdev, WLAN_OBJMGR_ID); return QDF_STATUS_SUCCESS; diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_peer_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_peer_obj.c index e0d4959231..d75cc1ea83 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_peer_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_peer_obj.c @@ -268,6 +268,7 @@ static QDF_STATUS wlan_objmgr_peer_obj_destroy(struct wlan_objmgr_peer *peer) obj_mgr_err("PEER is NULL"); return QDF_STATUS_E_FAILURE; } + wlan_objmgr_notify_destroy(peer, WLAN_PEER_OP); macaddr = wlan_peer_get_macaddr(peer); @@ -338,6 +339,7 @@ QDF_STATUS wlan_objmgr_peer_obj_delete(struct wlan_objmgr_peer *peer) wlan_peer_obj_lock(peer); peer->obj_state = WLAN_OBJ_STATE_LOGICALLY_DELETED; wlan_peer_obj_unlock(peer); + wlan_objmgr_notify_log_delete(peer, WLAN_PEER_OP); wlan_objmgr_peer_release_ref(peer, WLAN_OBJMGR_ID); return QDF_STATUS_SUCCESS; diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c index b24964d921..3dc7abc0f0 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_psoc_obj.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "wlan_objmgr_global_obj_i.h" #include "wlan_objmgr_psoc_obj_i.h" #include "wlan_objmgr_pdev_obj_i.h" @@ -196,6 +197,7 @@ static QDF_STATUS wlan_objmgr_psoc_obj_destroy(struct wlan_objmgr_psoc *psoc) obj_mgr_err("psoc is NULL"); return QDF_STATUS_E_FAILURE; } + wlan_objmgr_notify_destroy(psoc, WLAN_PSOC_OP); obj_mgr_info("Physically deleting psoc %d", psoc->soc_objmgr.psoc_id); @@ -260,6 +262,7 @@ QDF_STATUS wlan_objmgr_psoc_obj_delete(struct wlan_objmgr_psoc *psoc) wlan_psoc_obj_lock(psoc); psoc->obj_state = WLAN_OBJ_STATE_LOGICALLY_DELETED; wlan_psoc_obj_unlock(psoc); + wlan_objmgr_notify_log_delete(psoc, WLAN_PSOC_OP); wlan_objmgr_psoc_release_ref(psoc, WLAN_OBJMGR_ID); return QDF_STATUS_SUCCESS; diff --git a/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c b/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c index 92cbe5ea88..bec96e6fda 100644 --- a/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c +++ b/umac/cmn_services/obj_mgr/src/wlan_objmgr_vdev_obj.c @@ -275,6 +275,7 @@ static QDF_STATUS wlan_objmgr_vdev_obj_destroy(struct wlan_objmgr_vdev *vdev) obj_mgr_err("vdev is NULL"); return QDF_STATUS_E_FAILURE; } + wlan_objmgr_notify_destroy(vdev, WLAN_VDEV_OP); vdev_id = wlan_vdev_get_id(vdev); @@ -341,6 +342,7 @@ QDF_STATUS wlan_objmgr_vdev_obj_delete(struct wlan_objmgr_vdev *vdev) wlan_vdev_obj_lock(vdev); vdev->obj_state = WLAN_OBJ_STATE_LOGICALLY_DELETED; wlan_vdev_obj_unlock(vdev); + wlan_objmgr_notify_log_delete(vdev, WLAN_VDEV_OP); wlan_objmgr_vdev_release_ref(vdev, WLAN_OBJMGR_ID); return QDF_STATUS_SUCCESS;