From b93dab5a6cc4bd2b88e7a032464e69b6cb1e17f2 Mon Sep 17 00:00:00 2001 From: Jianmin Zhu Date: Mon, 27 Dec 2021 14:16:57 +0800 Subject: [PATCH] qcacld-3.0: Fix assert for connect and roaming concurrency In dual sta case, while vdev0 roaming, vdev1 tried to connect and stop vdev0 roam. in lim_process_assoc_rsp_frame, lim_is_roam_synch_in_progress return false, hdr is parsed as invalid addr, assert when access hdr->sa. Change-Id: I917dc064dbca5600fe3586ec08103fa62a1348ee CRs-Fixed: 3100427 --- components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c | 3 +++ core/mac/src/pe/lim/lim_assoc_utils.h | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c b/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c index b3cb8e1889..890102c67e 100644 --- a/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c +++ b/components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -32,6 +33,7 @@ #include "wlan_vdev_mgr_utils_api.h" #include "wni_api.h" #include "wlan_mlme_vdev_mgr_interface.h" +#include "wlan_cm_api.h" static void if_mgr_enable_roaming_on_vdev(struct wlan_objmgr_pdev *pdev, void *object, void *arg) @@ -86,6 +88,7 @@ static void if_mgr_disable_roaming_on_vdev(struct wlan_objmgr_pdev *pdev, if (curr_vdev_id != vdev_id && wlan_vdev_mlme_get_opmode(vdev) == QDF_STA_MODE && + !wlan_cm_is_vdev_roam_sync_inprogress(vdev) && vdev->vdev_mlme.mlme_state == WLAN_VDEV_S_UP) { /* IFMGR Verification: Temporary call to sme_stop_roaming api, * will be replaced by converged roaming api diff --git a/core/mac/src/pe/lim/lim_assoc_utils.h b/core/mac/src/pe/lim/lim_assoc_utils.h index 0a70f83fc2..42461c2822 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.h +++ b/core/mac/src/pe/lim/lim_assoc_utils.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2011-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -34,6 +35,7 @@ #include "sir_debug.h" #include "lim_types.h" +#include "wlan_cm_api.h" #define SIZE_OF_NOA_DESCRIPTOR 13 #define MAX_NOA_PERIOD_IN_MICROSECS 3000000 @@ -200,7 +202,7 @@ static inline QDF_STATUS lim_add_ft_sta_self(struct mac_context *mac, static inline bool lim_is_roam_synch_in_progress(struct wlan_objmgr_psoc *psoc, struct pe_session *pe_session) { - return MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, pe_session->vdev_id); + return wlan_cm_is_vdev_roam_sync_inprogress(pe_session->vdev); } #else static inline bool lim_is_roam_synch_in_progress(struct wlan_objmgr_psoc *psoc,