qcacmn: Initialize teardown event only once
Initialize teardowen event only once, intializing events multiple times leads to assert. Change-Id: I93a72c787dffa7ab081df9cca8ba17cc065e207a CRs-Fixed: 3186523
This commit is contained in:

committed by
Madan Koyyalamudi

parent
1fe27938f7
commit
7521505f91
@@ -95,7 +95,7 @@ enum MLO_LINK_STATE {
|
||||
* @state[MAX_MLO_LINKS]: MLO link state
|
||||
* @valid_link_bitmap: valid MLO link bitmap
|
||||
* @state_lock: lock to protect access to link state
|
||||
* @qdf_event_t: event for tearodwn completion
|
||||
* @qdf_event_t: event for teardown completion
|
||||
*/
|
||||
#define MAX_MLO_LINKS 6
|
||||
#define MAX_MLO_CHIPS 5
|
||||
|
@@ -17,7 +17,23 @@
|
||||
* DOC: contains MLO manager public file containing setup/teardown functionality
|
||||
*/
|
||||
|
||||
#ifndef _WLAN_MLO_MGR_SETUP_H_
|
||||
#define _WLAN_MLO_MGR_SETUP_H_
|
||||
#ifdef WLAN_MLO_MULTI_CHIP
|
||||
/**
|
||||
* mlo_setup_init() - API to init setup info events
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void mlo_setup_init(void);
|
||||
|
||||
/**
|
||||
* mlo_setup_deinit() - API to deinit setup info events
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void mlo_setup_deinit(void);
|
||||
|
||||
/**
|
||||
* mlo_is_ml_soc() - API to check if psoc belongs to ML group
|
||||
* @psoc: Soc to be checked.
|
||||
@@ -123,4 +139,13 @@ QDF_STATUS mlo_link_teardown_link(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
bool mlo_vdevs_check_single_soc(struct wlan_objmgr_vdev **wlan_vdev_list,
|
||||
uint8_t vdev_count);
|
||||
#endif
|
||||
#else
|
||||
static inline void mlo_setup_init(void)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void mlo_setup_deinit(void)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_MLO_MULTI_CHIP */
|
||||
#endif /* _WLAN_MLO_MGR_SETUP_H_ */
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include "wlan_mlo_mgr_main.h"
|
||||
#include <wlan_mlo_mgr_ap.h>
|
||||
#include <wlan_mlo_mgr_peer.h>
|
||||
#include <wlan_mlo_mgr_setup.h>
|
||||
#include <wlan_cm_public_struct.h>
|
||||
#include "wlan_mlo_mgr_msgq.h"
|
||||
#include <target_if_mlo_mgr.h>
|
||||
@@ -39,6 +40,7 @@ static void mlo_global_ctx_deinit(void)
|
||||
if (qdf_list_empty(&mlo_mgr_ctx->ml_dev_list))
|
||||
mlo_err("ML dev list is not empty");
|
||||
|
||||
mlo_setup_deinit();
|
||||
mlo_msgq_free();
|
||||
ml_peerid_lock_destroy(mlo_mgr_ctx);
|
||||
ml_link_lock_destroy(mlo_mgr_ctx);
|
||||
@@ -74,6 +76,7 @@ static void mlo_global_ctx_init(void)
|
||||
ml_aid_lock_create(mlo_mgr_ctx);
|
||||
mlo_mgr_ctx->mlo_is_force_primary_umac = 0;
|
||||
mlo_msgq_init();
|
||||
mlo_setup_init();
|
||||
}
|
||||
|
||||
QDF_STATUS wlan_mlo_mgr_psoc_enable(struct wlan_objmgr_psoc *psoc)
|
||||
|
@@ -147,6 +147,33 @@ bool mlo_vdevs_check_single_soc(struct wlan_objmgr_vdev **wlan_vdev_list,
|
||||
|
||||
qdf_export_symbol(mlo_vdevs_check_single_soc);
|
||||
|
||||
void mlo_setup_init(void)
|
||||
{
|
||||
struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
|
||||
|
||||
if (!mlo_ctx)
|
||||
return;
|
||||
|
||||
if (qdf_event_create(&mlo_ctx->setup_info.event) !=
|
||||
QDF_STATUS_SUCCESS) {
|
||||
mlo_err("Unable to create teardown event");
|
||||
}
|
||||
}
|
||||
|
||||
qdf_export_symbol(mlo_setup_init);
|
||||
|
||||
void mlo_setup_deinit(void)
|
||||
{
|
||||
struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
|
||||
|
||||
if (!mlo_ctx)
|
||||
return;
|
||||
|
||||
qdf_event_destroy(&mlo_ctx->setup_info.event);
|
||||
}
|
||||
|
||||
qdf_export_symbol(mlo_setup_deinit);
|
||||
|
||||
void mlo_setup_update_num_links(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t num_links)
|
||||
{
|
||||
@@ -472,9 +499,6 @@ QDF_STATUS mlo_link_teardown_link(struct wlan_objmgr_psoc *psoc,
|
||||
if (!mlo_check_all_pdev_state(psoc, MLO_LINK_TEARDOWN))
|
||||
return QDF_STATUS_SUCCESS;
|
||||
|
||||
if (qdf_event_create(&mlo_ctx->setup_info.event) != QDF_STATUS_SUCCESS)
|
||||
return QDF_STATUS_E_FAULT;
|
||||
|
||||
tx_ops = wlan_psoc_get_lmac_if_txops(psoc);
|
||||
/* Trigger MLO teardown */
|
||||
if (tx_ops && tx_ops->mops.target_if_mlo_teardown_req) {
|
||||
@@ -484,15 +508,14 @@ QDF_STATUS mlo_link_teardown_link(struct wlan_objmgr_psoc *psoc,
|
||||
reason);
|
||||
}
|
||||
|
||||
status = qdf_wait_for_event_completion(&mlo_ctx->setup_info.event,
|
||||
MLO_MGR_TEARDOWN_TIMEOUT);
|
||||
status = qdf_wait_for_event_completion(
|
||||
&mlo_ctx->setup_info.event,
|
||||
MLO_MGR_TEARDOWN_TIMEOUT);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
qdf_info("Teardown timeout");
|
||||
mlo_force_teardown();
|
||||
}
|
||||
|
||||
qdf_event_destroy(&mlo_ctx->setup_info.event);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user