qcacld-3.0: Remove ML BSS peer before join request

The reference taken for objmgr peer during ML peer
context creation is not released if any validation
has failed in pe_session initialization. The call
to directly remove objmgr is initiated without a
call to detach ML peer. This leads to reference
leak for the peer.

If lim_fill_session_params() API returns error,
wma_remove_bss_peer_before_join() API is called
to cleanup the peer objmgr. Call API corresponding
to MLO peer detach in this function to release
the MLO_MGR reference.

Change-Id: I010150b4aefe9f076455cd5aafb1c3b55155458b
CRs-Fixed: 3405762
This commit is contained in:
Vinod Kumar Pirla
2023-02-16 03:01:30 -08:00
committed by Madan Koyyalamudi
parent c076193299
commit ee1d5461d9
3 changed files with 22 additions and 7 deletions

View File

@@ -2546,6 +2546,25 @@ QDF_STATUS wma_post_chan_switch_setup(uint8_t vdev_id);
*/
QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart);
#ifdef WLAN_FEATURE_11BE_MLO
/**
* wma_delete_peer_mlo() - Remove the MLO peer and detach link peer
* @psoc: PSOC objmgr pointer
* @macaddr: MAC address of objmgr peer
*
* The API will remove the ML peer with objmgr peer fetched from
* psoc peer list using the @macaddr.
*
* Return: void
*/
void wma_delete_peer_mlo(struct wlan_objmgr_psoc *psoc, uint8_t *macaddr);
#else
static inline
void wma_delete_peer_mlo(struct wlan_objmgr_psoc *psoc, uint8_t *macaddr)
{
}
#endif
/**
* wma_remove_bss_peer_on_failure() - remove the bss peers in case of
* failure

View File

@@ -2505,8 +2505,7 @@ static void wma_send_vdev_down_req(tp_wma_handle wma,
}
#ifdef WLAN_FEATURE_11BE_MLO
static void wma_delete_peer_mlo(struct wlan_objmgr_psoc *psoc,
uint8_t *macaddr)
void wma_delete_peer_mlo(struct wlan_objmgr_psoc *psoc, uint8_t *macaddr)
{
struct wlan_objmgr_peer *peer = NULL;
@@ -2516,11 +2515,6 @@ static void wma_delete_peer_mlo(struct wlan_objmgr_psoc *psoc,
wlan_objmgr_peer_release_ref(peer, WLAN_LEGACY_WMA_ID);
}
}
#else /* WLAN_FEATURE_11BE_MLO */
static inline void wma_delete_peer_mlo(struct wlan_objmgr_psoc *psoc,
uint8_t *macaddr)
{
}
#endif /* WLAN_FEATURE_11BE_MLO */
static QDF_STATUS

View File

@@ -4432,6 +4432,8 @@ QDF_STATUS wma_remove_bss_peer_before_join(
}
mac_addr = bssid.bytes;
wma_delete_peer_mlo(wma->psoc, mac_addr);
qdf_status = wma_remove_peer(wma, mac_addr, vdev_id, false);
if (QDF_IS_STATUS_ERROR(qdf_status)) {