Handling AKM based checks in connect path

Cleanup AKM based checks, in connect path, which are restricted to legacy AKMs
and extend these checks to newer AKMs (SAE-EXT-KEY/SAE-EXT-FT-KEY)

Bug: 289991109

Test: Tested connection to WPA2 AP and confirmed from logs that that two AKMs are
     sent to driver in connect command.
Test: EVT platform.

Change-Id: I0910a4fbb0cd39eef174d38e27301ef16a43b74a
Signed-off-by: Mir Ali <mir-khizer.ali@broadcom.corp-partner.google.com>
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 5f39e80..1acc43b 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -6982,13 +6982,8 @@
 	    nl80211_put_fils_connect_params(drv, params, msg) != 0)
 		return -1;
 
-#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
-	if (((params->key_mgmt_suite & WPA_KEY_MGMT_SAE) ||
-	     (params->key_mgmt_suite == WPA_KEY_MGMT_FT_SAE)) &&
-#else
 	if ((wpa_key_mgmt_sae(params->key_mgmt_suite) ||
 	     wpa_key_mgmt_sae(params->allowed_key_mgmts)) &&
-#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
 	    (!(drv->capa.flags & WPA_DRIVER_FLAGS_SME)) &&
 	    nla_put_flag(msg, NL80211_ATTR_EXTERNAL_AUTH_SUPPORT))
 		return -1;
@@ -7041,13 +7036,8 @@
 		goto fail;
 
 #ifdef CONFIG_SAE
-#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
-	if (((params->key_mgmt_suite & WPA_KEY_MGMT_SAE) ||
-	     (params->key_mgmt_suite == WPA_KEY_MGMT_FT_SAE)) &&
-#else
 	if ((wpa_key_mgmt_sae(params->key_mgmt_suite) ||
 	     wpa_key_mgmt_sae(params->allowed_key_mgmts)) &&
-#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
 	    nl80211_put_sae_pwe(msg, params->sae_pwe) < 0)
 		goto fail;
 #endif /* CONFIG_SAE */
@@ -7155,13 +7145,8 @@
 
 		if (wpa_driver_nl80211_set_mode(priv, nlmode) < 0)
 			return -1;
-#if defined(CONFIG_DRIVER_NL80211_BRCM) || defined(CONFIG_DRIVER_NL80211_SYNA)
-		if ((params->key_mgmt_suite & WPA_KEY_MGMT_SAE) ||
-		    (params->key_mgmt_suite == WPA_KEY_MGMT_FT_SAE))
-#else
 		if (wpa_key_mgmt_sae(params->key_mgmt_suite) ||
 		    wpa_key_mgmt_sae(params->allowed_key_mgmts))
-#endif /* CONFIG_DRIVER_NL80211_BRCM || CONFIG_DRIVER_NL80211_SYNA */
 			bss->use_nl_connect = 1;
 		else
 			bss->use_nl_connect = 0;