[qca-nss-clients] Crypto AES-CTR cipher AEAD mode support

Part of a set of changes made to support AES cipher
counter mode as per RFC3686 added to our crypto driver.

Change-Id: I63b655daafdafb48b7d2b57e327a0f4209d3e055
Signed-off-by: Vijay Vigneshan <vvignesh@codeaurora.org>
diff --git a/dtls/nss_connmgr_dtls.c b/dtls/nss_connmgr_dtls.c
index c4e3e6f..b343325 100644
--- a/dtls/nss_connmgr_dtls.c
+++ b/dtls/nss_connmgr_dtls.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -329,7 +329,8 @@
 static uint32_t nss_dtlsmgr_get_cipher_iv_len(uint32_t cipher_algo)
 {
 	switch (cipher_algo) {
-	case NSS_CRYPTO_CIPHER_AES:
+	case NSS_CRYPTO_CIPHER_AES_CBC:
+	case NSS_CRYPTO_CIPHER_AES_CTR:
 		return NSS_CRYPTO_MAX_IVLEN_AES;
 
 	case NSS_CRYPTO_CIPHER_DES:
diff --git a/netlink/nss_nlcrypto.c b/netlink/nss_nlcrypto.c
index 9161d6b..2ca288b 100644
--- a/netlink/nss_nlcrypto.c
+++ b/netlink/nss_nlcrypto.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -98,20 +98,21 @@
 	uint16_t max_key_len = 0;
 
 	switch (algo) {
-		case NSS_CRYPTO_CIPHER_AES:
-			max_key_len = NSS_CRYPTO_MAX_KEYLEN_AES;
-			break;
+	case NSS_CRYPTO_CIPHER_AES_CBC:
+	case NSS_CRYPTO_CIPHER_AES_CTR:
+		max_key_len = NSS_CRYPTO_MAX_KEYLEN_AES;
+		break;
 
-		case NSS_CRYPTO_CIPHER_DES:
-			max_key_len =  NSS_CRYPTO_MAX_KEYLEN_DES;
-			break;
+	case NSS_CRYPTO_CIPHER_DES:
+		max_key_len =  NSS_CRYPTO_MAX_KEYLEN_DES;
+		break;
 
-		case NSS_CRYPTO_CIPHER_NULL:
-			max_key_len = 0;
-			break;
+	case NSS_CRYPTO_CIPHER_NULL:
+		max_key_len = 0;
+		break;
 
-		default:
-			return false;
+	default:
+		return false;
 	}
 
 	/*