summaryrefslogtreecommitdiff
path: root/core/sme/src/csr/csr_api_roam.c
diff options
context:
space:
mode:
authorPadma, Santhosh Kumar <skpadma@codeaurora.org>2018-02-14 17:15:19 +0530
committerSunil Ravi <sunilravi@google.com>2018-12-21 23:52:00 +0000
commit44b7c9162b32f3a73de1ec94f207a7a3bc226287 (patch)
treef601850f8f9dbc2998b31552237f7b7455afe36d /core/sme/src/csr/csr_api_roam.c
parentd31c055f0dc15b261c4e82c4276089258c7a01c1 (diff)
downloadqcacld-44b7c9162b32f3a73de1ec94f207a7a3bc226287.tar.gz
qcacld-3.0: Add support for GMAC cipher suite
Add changes to support GMAC group management cipher suite Change-Id: Ic4855b77268464a1ed61efcf213f76a2d99ff0c4 CRs-Fixed: 2164828
Diffstat (limited to 'core/sme/src/csr/csr_api_roam.c')
-rw-r--r--core/sme/src/csr/csr_api_roam.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 68c408443a..9d32e35f3e 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -10679,6 +10679,34 @@ csr_update_key_cmd(tpAniSirGlobal mac_ctx, tCsrRoamSession *session,
CSR_AES_KEY_LEN);
*enqueue_cmd = true;
break;
+
+#ifdef WLAN_FEATURE_GMAC
+ case eCSR_ENCRYPT_TYPE_AES_GMAC_128:
+ if (set_key->keyLength < CSR_AES_GMAC_128_KEY_LEN) {
+ sme_warn("Invalid AES GMAC 128 keylength [= %d]",
+ set_key->keyLength);
+ *enqueue_cmd = false;
+ return QDF_STATUS_E_INVAL;
+ }
+ set_key_cmd->u.setKeyCmd.keyLength = CSR_AES_GMAC_128_KEY_LEN;
+ qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+ CSR_AES_GMAC_128_KEY_LEN);
+ *enqueue_cmd = true;
+ break;
+
+ case eCSR_ENCRYPT_TYPE_AES_GMAC_256:
+ if (set_key->keyLength < CSR_AES_GMAC_256_KEY_LEN) {
+ sme_warn("Invalid AES GMAC 256 keylength [= %d]",
+ set_key->keyLength);
+ *enqueue_cmd = false;
+ return QDF_STATUS_E_INVAL;
+ }
+ set_key_cmd->u.setKeyCmd.keyLength = CSR_AES_GMAC_256_KEY_LEN;
+ qdf_mem_copy(set_key_cmd->u.setKeyCmd.Key, set_key->Key,
+ CSR_AES_GMAC_256_KEY_LEN);
+ *enqueue_cmd = true;
+ break;
+#endif
#endif /* WLAN_FEATURE_11W */
default:
/* for open security also we want to enqueue command */
@@ -14934,8 +14962,13 @@ bool csr_is_mfpc_capable(struct sDot11fIERSN *rsn)
static void csr_set_mgmt_enc_type(tCsrRoamProfile *profile,
tDot11fBeaconIEs *ies, tSirSmeJoinReq *csr_join_req)
{
+ sme_debug("mgmt encryption type %d MFPe %d MFPr %d",
+ profile->mgmt_encryption_type,
+ profile->MFPEnabled, profile->MFPRequired);
+
if (profile->MFPEnabled)
- csr_join_req->MgmtEncryptionType = eSIR_ED_AES_128_CMAC;
+ csr_join_req->MgmtEncryptionType =
+ profile->mgmt_encryption_type;
else
csr_join_req->MgmtEncryptionType = eSIR_ED_NONE;
if (profile->MFPEnabled &&