Pārlūkot izejas kodu

qcacld-3.0: Allow to connect AP in denylist if no other candidate

If there is only 1 AP candidate, and it has been added to denylist by F/W,
it is not allowed to connect, it's bad user experience to end users.

To fix it, if there is only 1 AP candidate, and it has been added to
denylist by F/W, but deny reason is neither critical nor certificate
required, such as REASON_STA_KICKOUT, need allow user to connect it if no
other candidates.

Change-Id: I2ae66ceba943dcfbc927568684218b7120c1e490
CRs-Fixed: 3785252
Jianmin Zhu 1 gadu atpakaļ
vecāks
revīzija
3f6e8cf491
1 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 10 2
      components/denylist_mgr/core/src/wlan_dlm_core.c

+ 10 - 2
components/denylist_mgr/core/src/wlan_dlm_core.c

@@ -27,6 +27,7 @@
 #include <wlan_scan_utils_api.h>
 #include "wlan_dlm_tgt_api.h"
 #include <wlan_cm_bss_score_param.h>
+#include <wlan_dlm_public_struct.h>
 
 #define SECONDS_TO_MS(params)       ((params) * 1000)
 #define MINUTES_TO_MS(params)       (SECONDS_TO_MS(params) * 60)
@@ -197,8 +198,15 @@ dlm_prune_old_entries_and_get_action(struct dlm_reject_ap *dlm_entry,
 			  dlm_entry->reject_ap_type);
 
 		if (DLM_IS_AP_DENYLISTED_BY_USERSPACE(dlm_entry) ||
-		    DLM_IS_AP_IN_RSSI_REJECT_LIST(dlm_entry))
-			return CM_DLM_FORCE_REMOVE;
+		    DLM_IS_AP_IN_RSSI_REJECT_LIST(dlm_entry)) {
+			if (dlm_entry->reject_ap_reason == REASON_UNKNOWN ||
+			    dlm_entry->reject_ap_reason == REASON_NUD_FAILURE ||
+			    dlm_entry->reject_ap_reason == REASON_STA_KICKOUT ||
+			    dlm_entry->reject_ap_reason == REASON_ROAM_HO_FAILURE)
+				return CM_DLM_REMOVE;
+			else
+				return CM_DLM_FORCE_REMOVE;
+		}
 
 		return CM_DLM_REMOVE;
 	}