Просмотр исходного кода

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
Jianmin Zhu 3 лет назад
Родитель
Сommit
b93dab5a6c

+ 3 - 0
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

+ 3 - 1
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,