Procházet zdrojové kódy

qcacld-3.0: Do not allow 6 GHz SAP in non-WPA3

Reject the SAP if the frequency is 6 GHz and
the security is non-WPA3 AKM suite.

Also, use the ini "check_6ghz_security" to
allow the 6 GHz SAP to be operational on an
open security mode for test purposes.

Change-Id: Ifc57656a556ef5b6829ed56bb1ec360b5b84379e
CRs-Fixed: 3176629
Surya Prakash Sivaraj před 2 roky
rodič
revize
3c1e1b799d
2 změnil soubory, kde provedl 15 přidání a 5 odebrání
  1. 12 5
      core/hdd/src/wlan_hdd_hostapd.c
  2. 3 0
      core/sap/src/sap_fsm.c

+ 12 - 5
core/hdd/src/wlan_hdd_hostapd.c

@@ -3815,11 +3815,18 @@ uint32_t hdd_get_ap_6ghz_capable(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 		return 0;
 	}
 
-	if (!keymgmt || (keymgmt & (1 << WLAN_CRYPTO_KEY_MGMT_NONE |
-		       1 << WLAN_CRYPTO_KEY_MGMT_SAE |
-		       1 << WLAN_CRYPTO_KEY_MGMT_IEEE8021X_SUITE_B |
-		       1 << WLAN_CRYPTO_KEY_MGMT_IEEE8021X_SUITE_B_192 |
-		       1 << WLAN_CRYPTO_KEY_MGMT_OWE))) {
+	/*
+	 * 6 GHz SAP is allowed in open mode only if the
+	 * check_6ghz_security ini is disabled.
+	 */
+	if (!cfg_get(psoc, CFG_CHECK_6GHZ_SECURITY) &&
+	    (!keymgmt || (keymgmt & (1 << WLAN_CRYPTO_KEY_MGMT_NONE))))
+		capable |= CONN_6GHZ_FLAG_SECURITY_ALLOWED;
+
+	if ((keymgmt & (1 << WLAN_CRYPTO_KEY_MGMT_SAE |
+			1 << WLAN_CRYPTO_KEY_MGMT_IEEE8021X_SUITE_B |
+			1 << WLAN_CRYPTO_KEY_MGMT_IEEE8021X_SUITE_B_192 |
+			1 << WLAN_CRYPTO_KEY_MGMT_OWE))) {
 		capable |= CONN_6GHZ_FLAG_SECURITY_ALLOWED;
 	}
 	capable |= CONN_6GHZ_FLAG_VALID;

+ 3 - 0
core/sap/src/sap_fsm.c

@@ -2971,6 +2971,9 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
 		qdf_status = sap_validate_dfs_nol(sap_ctx, mac_ctx);
 		if (!QDF_IS_STATUS_SUCCESS(qdf_status))
 			return qdf_status;
+	} else if (!policy_mgr_get_ap_6ghz_capable(mac_ctx->psoc,
+						   sap_ctx->sessionId, NULL)) {
+		return QDF_STATUS_E_FAILURE;
 	}
 
 	/*