qcacmn: Acquire mlo lock before dispatching sync_comp
In MLO scenario where start response for partner ML AP vdevs are processed simultaneously on different CPU cores, the order in which the vdev sm lock is acquired may lead to deadlock. To fix add change to dispatch the MLO_SYNC_COMPLETE under mlo_dev_ctx. Change-Id: I86ef51fcc8d51277163fcc5a6afdee6d873f2e63 CRs-Fixed: 3368033
Цей коміт міститься в:

зафіксовано
Madan Koyyalamudi

джерело
9164f76a01
коміт
0f5242e08a
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -517,6 +517,62 @@ void tsf_recalculation_lock_release(struct wlan_mlo_dev_context *mldev)
|
||||
{
|
||||
qdf_spin_unlock_bh(&mldev->tsf_recalculation_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* mlo_ap_lock_create - Create MLO AP mutex/spinlock
|
||||
* @ap_ctx: ML device AP context
|
||||
*
|
||||
* Creates mutex/spinlock
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline
|
||||
void mlo_ap_lock_create(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_spinlock_create(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* mlo_ap_lock_destroy - Destroy MLO AP mutex/spinlock
|
||||
* @ap_ctx: ML device AP context
|
||||
*
|
||||
* Destroy mutex/spinlock
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
static inline
|
||||
void mlo_ap_lock_destroy(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_spinlock_destroy(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* mlo_ap_lock_acquire - Acquire MLO AP mutex/spinlock
|
||||
* @ap_ctx: ML device AP context
|
||||
*
|
||||
* acquire mutex/spinlock
|
||||
*
|
||||
* return: void
|
||||
*/
|
||||
static inline
|
||||
void mlo_ap_lock_acquire(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_spin_lock_bh(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
|
||||
/**
|
||||
* mlo_ap_lock_release - Release MLO AP mutex/spinlock
|
||||
* @ap_ctx: ML device AP context
|
||||
*
|
||||
* release mutex/spinlock
|
||||
*
|
||||
* return: void
|
||||
*/
|
||||
static inline
|
||||
void mlo_ap_lock_release(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_spin_unlock_bh(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
#else /* WLAN_MLO_USE_SPINLOCK */
|
||||
static inline
|
||||
void ml_link_lock_create(struct mlo_mgr_context *mlo_ctx)
|
||||
@@ -739,6 +795,30 @@ void tsf_recalculation_lock_release(struct wlan_mlo_dev_context *mldev)
|
||||
{
|
||||
qdf_mutex_release(&mldev->tsf_recalculation_lock);
|
||||
}
|
||||
|
||||
static inline
|
||||
void mlo_ap_lock_create(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_mutex_create(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
|
||||
static inline
|
||||
void mlo_ap_lock_destroy(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_mutex_destroy(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
|
||||
static inline
|
||||
void mlo_ap_lock_acquire(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_mutex_acquire(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
|
||||
static inline
|
||||
void mlo_ap_lock_release(struct wlan_mlo_ap *ap_ctx)
|
||||
{
|
||||
qdf_mutex_release(&ap_ctx->mlo_ap_lock);
|
||||
}
|
||||
#endif /* WLAN_MLO_USE_SPINLOCK */
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -283,11 +283,17 @@ struct wlan_mlo_sta {
|
||||
* struct wlan_mlo_ap - MLO AP related info
|
||||
* @num_ml_vdevs: number of vdevs to form MLD
|
||||
* @ml_aid_mgr: ML AID mgr
|
||||
* @mlo_ap_lock: lock to sync VDEV SM event
|
||||
* @mlo_vdev_quiet_bmap: Bitmap of vdevs for which quiet ie needs to enabled
|
||||
*/
|
||||
struct wlan_mlo_ap {
|
||||
uint8_t num_ml_vdevs;
|
||||
struct wlan_ml_vdev_aid_mgr *ml_aid_mgr;
|
||||
#ifdef WLAN_MLO_USE_SPINLOCK
|
||||
qdf_spinlock_t mlo_ap_lock;
|
||||
#else
|
||||
qdf_mutex_t mlo_ap_lock;
|
||||
#endif
|
||||
qdf_bitmap(mlo_vdev_quiet_bmap, WLAN_UMAC_MLO_MAX_VDEVS);
|
||||
};
|
||||
|
||||
|
Посилання в новій задачі
Заблокувати користувача