Browse Source

qcacld-3.0: Fix allowlist roaming failure

For allowlist roaming, EAPOL isn't offloaded for PMK changed, then
RSO is stopped and allowlist ssid is cleared in F/W, but when RSO
is restarted after EAPOL finished, allowlist ssid isn't reset to F/W,
so allowlist roaming will fail after that.

To fix it, when roam start or update cmd is sent to F/W: update
allowlist ssid and denylist to F/W.

Change-Id: Ia8ddc251767dfc04d9a6cfd1e7c1074ab0e88e96
CRs-Fixed: 3081226
Jianmin Zhu 3 years ago
parent
commit
e327eadc63

+ 4 - 2
components/target_if/connection_mgr/src/target_if_cm_roam_offload.c

@@ -736,8 +736,10 @@ target_if_cm_roam_scan_filter(wmi_unified_t wmi_handle, uint8_t command,
 			}
 			break;
 		default:
-			target_if_debug("Roam Filter need not be sent");
-			return QDF_STATUS_SUCCESS;
+			if (command != ROAM_SCAN_OFFLOAD_START) {
+				target_if_debug("Roam Filter need not be sent");
+				return QDF_STATUS_SUCCESS;
+			}
 		}
 	}
 

+ 31 - 6
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -2006,21 +2006,31 @@ cm_roam_scan_filter(struct wlan_objmgr_psoc *psoc,
 	if (command != ROAM_SCAN_OFFLOAD_STOP) {
 		switch (reason) {
 		case REASON_ROAM_SET_BLACKLIST_BSSID:
-			op_bitmap |= 0x1;
+			op_bitmap |= ROAM_FILTER_OP_BITMAP_BLACK_LIST;
 			cm_add_blacklist_ap_list(pdev, params);
 			break;
 		case REASON_ROAM_SET_SSID_ALLOWED:
-			op_bitmap |= 0x2;
+			op_bitmap |= ROAM_FILTER_OP_BITMAP_WHITE_LIST;
 			num_ssid_white_list =
 				rso_usr_cfg->num_ssid_allowed_list;
 			break;
 		case REASON_ROAM_SET_FAVORED_BSSID:
-			op_bitmap |= 0x4;
+			op_bitmap |= ROAM_FILTER_OP_BITMAP_PREFER_BSSID;
 			num_bssid_preferred_list =
 				rso_usr_cfg->num_bssid_favored;
 			break;
 		case REASON_CTX_INIT:
 			if (command == ROAM_SCAN_OFFLOAD_START) {
+				num_ssid_white_list =
+					rso_usr_cfg->num_ssid_allowed_list;
+				if (num_ssid_white_list)
+					op_bitmap |=
+					ROAM_FILTER_OP_BITMAP_WHITE_LIST;
+				cm_add_blacklist_ap_list(pdev, params);
+				if (params->num_bssid_black_list)
+					op_bitmap |=
+					ROAM_FILTER_OP_BITMAP_BLACK_LIST;
+
 				params->lca_disallow_config_present = true;
 				/*
 				 * If rssi disallow bssid list have any member
@@ -2039,15 +2049,30 @@ cm_roam_scan_filter(struct wlan_objmgr_psoc *psoc,
 			}
 			break;
 		default:
-			mlme_debug("Roam Filter need not be sent, no need to fill parameters");
-			return;
+			if (command == ROAM_SCAN_OFFLOAD_START) {
+				num_ssid_white_list =
+					rso_usr_cfg->num_ssid_allowed_list;
+				if (num_ssid_white_list)
+					op_bitmap |=
+					ROAM_FILTER_OP_BITMAP_WHITE_LIST;
+				cm_add_blacklist_ap_list(pdev, params);
+				if (params->num_bssid_black_list)
+					op_bitmap |=
+					ROAM_FILTER_OP_BITMAP_BLACK_LIST;
+			}
+			if (!op_bitmap) {
+				mlme_debug("Roam Filter need not be sent, no need to fill parameters");
+				return;
+			}
+			break;
 		}
 	} else {
 		/* In case of STOP command, reset all the variables
 		 * except for blacklist BSSID which should be retained
 		 * across connections.
 		 */
-		op_bitmap = 0x2 | 0x4;
+		op_bitmap = ROAM_FILTER_OP_BITMAP_WHITE_LIST |
+			    ROAM_FILTER_OP_BITMAP_PREFER_BSSID;
 		if (reason == REASON_ROAM_SET_SSID_ALLOWED)
 			num_ssid_white_list =
 					rso_usr_cfg->num_ssid_allowed_list;