diff mbox series

[20/26] wiphy: Support GCMP|CCMP-256 cipher suites

Message ID 20221021191307.31492-20-denkenz@gmail.com (mailing list archive)
State New
Headers show
Series [01/26] eapol: More strictly validate key_descriptor_version | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

Denis Kenzior Oct. 21, 2022, 7:13 p.m. UTC
---
 src/wiphy.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff mbox series

Patch

diff --git a/src/wiphy.c b/src/wiphy.c
index f0451b60416e..76f1ba7cfc04 100644
--- a/src/wiphy.c
+++ b/src/wiphy.c
@@ -150,6 +150,12 @@  enum ie_rsn_cipher_suite wiphy_select_cipher(struct wiphy *wiphy, uint16_t mask)
 
 	mask &= wiphy->supported_ciphers;
 
+	if (mask & IE_RSN_CIPHER_SUITE_GCMP_256)
+		return IE_RSN_CIPHER_SUITE_GCMP_256;
+
+	if (mask & IE_RSN_CIPHER_SUITE_CCMP_256)
+		return IE_RSN_CIPHER_SUITE_CCMP_256;
+
 	if (mask & IE_RSN_CIPHER_SUITE_GCMP)
 		return IE_RSN_CIPHER_SUITE_GCMP;
 
@@ -1239,6 +1245,14 @@  static void parse_supported_ciphers(struct wiphy *wiphy, const void *data,
 		case CRYPTO_CIPHER_GCMP:
 			wiphy->supported_ciphers |= IE_RSN_CIPHER_SUITE_GCMP;
 			break;
+		case CRYPTO_CIPHER_GCMP_256:
+			wiphy->supported_ciphers |=
+				IE_RSN_CIPHER_SUITE_GCMP_256;
+			break;
+		case CRYPTO_CIPHER_CCMP_256:
+			wiphy->supported_ciphers |=
+				IE_RSN_CIPHER_SUITE_CCMP_256;
+			break;
 		default:	/* TODO: Support other ciphers */
 			break;
 		}