This patch adds support for WPA3, meaning SAE and OWE are now properly identified.
This fixes iwinfo and LuCi showing WPA2 NONE for WPA3 SAE and OWE.
Signed-off-by: Robert Marko <robimarko@gmail.com>
#define IWINFO_KMGMT_NONE (1 << 0)
#define IWINFO_KMGMT_8021x (1 << 1)
#define IWINFO_KMGMT_PSK (1 << 2)
-#define IWINFO_KMGMT_COUNT 3
+#define IWINFO_KMGMT_SAE (1 << 3)
+#define IWINFO_KMGMT_OWE (1 << 4)
+#define IWINFO_KMGMT_COUNT 5
#define IWINFO_AUTH_OPEN (1 << 0)
#define IWINFO_AUTH_SHARED (1 << 1)
if (suites & IWINFO_KMGMT_8021x)
pos += sprintf(pos, "802.1X/");
+ if (suites & IWINFO_KMGMT_SAE)
+ pos += sprintf(pos, "SAE/");
+
+ if (suites & IWINFO_KMGMT_OWE)
+ pos += sprintf(pos, "OWE/");
+
if (!suites || (suites & IWINFO_KMGMT_NONE))
pos += sprintf(pos, "NONE/");
else if (c->wpa_version)
{
switch (c->wpa_version) {
+ case 4:
+ snprintf(buf, sizeof(buf), "WPA3 %s (%s)",
+ format_enc_suites(c->auth_suites),
+ format_enc_ciphers(c->pair_ciphers | c->group_ciphers));
+ break;
+
case 3:
snprintf(buf, sizeof(buf), "mixed WPA/WPA2 %s (%s)",
format_enc_suites(c->auth_suites),
if (suites & IWINFO_KMGMT_8021x)
pos += sprintf(pos, "802.1X/");
+ if (suites & IWINFO_KMGMT_SAE)
+ pos += sprintf(pos, "SAE/");
+
+ if (suites & IWINFO_KMGMT_OWE)
+ pos += sprintf(pos, "OWE/");
+
if (!suites || (suites & IWINFO_KMGMT_NONE))
pos += sprintf(pos, "NONE/");
else if (c->wpa_version)
{
switch (c->wpa_version) {
+ case 4:
+ sprintf(desc, "WPA3 %s (%s)",
+ iwinfo_crypto_print_suites(c->auth_suites),
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers | c->group_ciphers));
+ break;
+
case 3:
sprintf(desc, "mixed WPA/WPA2 %s (%s)",
iwinfo_crypto_print_suites(c->auth_suites),
if (strstr(wpa_key_mgmt, "EAP"))
c->auth_suites |= IWINFO_KMGMT_8021x;
+ if (strstr(wpa_key_mgmt, "SAE")){
+ c->auth_suites |= IWINFO_KMGMT_SAE;
+ c->wpa_version = 4;
+ }
+
+ if (strstr(wpa_key_mgmt, "OWE")){
+ c->auth_suites |= IWINFO_KMGMT_OWE;
+ c->wpa_version = 4;
+ }
+
if (strstr(wpa_key_mgmt, "NONE"))
c->auth_suites |= IWINFO_KMGMT_NONE;
}