Parcourir la source

qcacld-3.0: Reject bssid in deny or reject list for roam invoke

Allow roam invoke on bssid in monitor list but reject bssid in
deny or reject list.

Change-Id: I639f30e194fdb3f5521e0483a7b8151d48134450
CRs-Fixed: 3359171
Liangwei Dong il y a 2 ans
Parent
commit
59418f4b1f
1 fichiers modifiés avec 30 ajouts et 3 suppressions
  1. 30 3
      components/denylist_mgr/core/src/wlan_dlm_core.c

+ 30 - 3
components/denylist_mgr/core/src/wlan_dlm_core.c

@@ -795,6 +795,7 @@ bool dlm_is_bssid_in_reject_list(struct wlan_objmgr_pdev *pdev,
 				 struct qdf_mac_addr *bssid)
 {
 	struct dlm_pdev_priv_obj *dlm_ctx;
+	struct dlm_psoc_priv_obj *dlm_psoc_obj;
 	struct dlm_reject_ap *dlm_entry = NULL;
 	qdf_list_node_t *cur_node = NULL, *next_node = NULL;
 	QDF_STATUS status;
@@ -804,6 +805,11 @@ bool dlm_is_bssid_in_reject_list(struct wlan_objmgr_pdev *pdev,
 		dlm_err("dlm_ctx is NULL");
 		return false;
 	}
+	dlm_psoc_obj = dlm_get_psoc_obj(wlan_pdev_get_psoc(pdev));
+	if (!dlm_psoc_obj) {
+		dlm_err("dlm_ctx or dlm_psoc_obj is NULL");
+		return false;
+	}
 
 	status = qdf_mutex_acquire(&dlm_ctx->reject_ap_list_lock);
 	if (QDF_IS_STATUS_ERROR(status)) {
@@ -817,10 +823,31 @@ bool dlm_is_bssid_in_reject_list(struct wlan_objmgr_pdev *pdev,
 				   &next_node);
 		dlm_entry =
 			qdf_container_of(cur_node, struct dlm_reject_ap, node);
+		/* Update the AP info to the latest list first */
+		dlm_update_ap_info(dlm_entry, &dlm_psoc_obj->dlm_cfg, NULL);
+		if (!dlm_entry->reject_ap_type) {
+			dlm_debug(QDF_MAC_ADDR_FMT " cleared from list",
+				  QDF_MAC_ADDR_REF(dlm_entry->bssid.bytes));
+			qdf_list_remove_node(&dlm_ctx->reject_ap_list,
+					     &dlm_entry->node);
+			qdf_mem_free(dlm_entry);
+			cur_node = next_node;
+			next_node = NULL;
+			continue;
+		}
+
 		if (qdf_is_macaddr_equal(&dlm_entry->bssid, bssid)) {
-			dlm_debug("BSSID is present in reject_ap_list");
-			qdf_mutex_release(&dlm_ctx->reject_ap_list_lock);
-			return true;
+			dlm_debug("BSSID reject_ap_type 0x%x",
+				  dlm_entry->reject_ap_type);
+			if (DLM_IS_AP_IN_DENYLIST(dlm_entry)) {
+				dlm_debug("BSSID is present in deny list");
+				qdf_mutex_release(
+					&dlm_ctx->reject_ap_list_lock);
+				return true;
+			}
+			qdf_mutex_release(
+				&dlm_ctx->reject_ap_list_lock);
+			return false;
 		}
 		cur_node = next_node;
 		next_node = NULL;