summaryrefslogtreecommitdiff
path: root/iwinfo_utils.c
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-01-05 14:21:14 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-01-05 22:19:43 +0000
commit8bfd8d88001e0d239d741c954c2421052b858fc1 (patch)
tree02dee1e9f9ddfc625e8e6b57c7cf8c73118371b6 /iwinfo_utils.c
parent74d13fb98730a7a8af6e6662d0f4281b6655ddd0 (diff)
downloadiwinfo-8bfd8d88001e0d239d741c954c2421052b858fc1.tar.gz
iwinfo: add support for GCMP cipher
Extend support for WPA ciphers by GCMP which is required for 802.11ad. Breaks ABI as ciphers now needs to be a field of 16 bits instead of 8. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'iwinfo_utils.c')
-rw-r--r--iwinfo_utils.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/iwinfo_utils.c b/iwinfo_utils.c
index b4f98a9..d071997 100644
--- a/iwinfo_utils.c
+++ b/iwinfo_utils.c
@@ -285,7 +285,7 @@ int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id *id)
return (id->vendor_id && id->device_id) ? 0 : -1;
}
-static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t *ciphers)
+static void iwinfo_parse_rsn_cipher(uint8_t idx, uint16_t *ciphers)
{
switch (idx)
{
@@ -312,9 +312,12 @@ static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t *ciphers)
*ciphers |= IWINFO_CIPHER_WEP104;
break;
+ case 8:
+ *ciphers |= IWINFO_CIPHER_GCMP;
+ break;
+
case 6: /* AES-128-CMAC */
case 7: /* No group addressed */
- case 8: /* GCMP */
case 9: /* GCMP-256 */
case 10: /* CCMP-256 */
case 11: /* BIP-GMAC-128 */
@@ -325,7 +328,7 @@ static void iwinfo_parse_rsn_cipher(uint8_t idx, uint8_t *ciphers)
}
void iwinfo_parse_rsn(struct iwinfo_crypto_entry *c, uint8_t *data, uint8_t len,
- uint8_t defcipher, uint8_t defauth)
+ uint16_t defcipher, uint8_t defauth)
{
uint16_t i, count;
uint8_t wpa_version = 0;