if (ciphers & IWINFO_CIPHER_CCMP)
pos += sprintf(pos, "CCMP, ");
+ if (ciphers & IWINFO_CIPHER_GCMP)
+ pos += sprintf(pos, "GCMP, ");
+
if (ciphers & IWINFO_CIPHER_WRAP)
pos += sprintf(pos, "WRAP, ");
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/");
static char * iwinfo_crypto_desc(struct iwinfo_crypto_entry *c)
{
static char desc[512] = { 0 };
+ char *pos = desc;
+ int i, n;
if (c)
{
/* WPA */
else if (c->wpa_version)
{
- switch (c->wpa_version) {
- case 3:
- sprintf(desc, "mixed WPA/WPA2 %s (%s)",
- iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(
- c->pair_ciphers | c->group_ciphers));
- break;
-
- case 2:
- sprintf(desc, "WPA2 %s (%s)",
- iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(
- c->pair_ciphers | c->group_ciphers));
- break;
-
- case 1:
- sprintf(desc, "WPA %s (%s)",
- iwinfo_crypto_print_suites(c->auth_suites),
- iwinfo_crypto_print_ciphers(
- c->pair_ciphers | c->group_ciphers));
- break;
- }
+ for (i = 0, n = 0; i < 3; i++)
+ if (c->wpa_version & (1 << i))
+ n++;
+
+ if (n > 1)
+ pos += sprintf(pos, "mixed ");
+
+ for (i = 0; i < 3; i++)
+ if (c->wpa_version & (1 << i))
+ if (i)
+ pos += sprintf(pos, "WPA%d/", i + 1);
+ else
+ pos += sprintf(pos, "WPA/");
+
+ pos--;
+
+ sprintf(pos, " %s (%s)",
+ iwinfo_crypto_print_suites(c->auth_suites),
+ iwinfo_crypto_print_ciphers(
+ c->pair_ciphers | c->group_ciphers));
}
else
{
lua_pushboolean(L, r->is_vht);
lua_setfield(L, -2, rx ? "rx_vht" : "tx_vht");
+ lua_pushboolean(L, r->is_he);
+ lua_setfield(L, -2, rx ? "rx_he" : "tx_he");
+
lua_pushnumber(L, r->mhz);
lua_setfield(L, -2, rx ? "rx_mhz" : "tx_mhz");
lua_pushboolean(L, r->is_short_gi);
lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
}
- else if (r->is_vht)
+ else if (r->is_vht || r->is_he)
{
lua_pushnumber(L, r->mcs);
lua_setfield(L, -2, rx ? "rx_mcs" : "tx_mcs");
lua_pushnumber(L, r->nss);
lua_setfield(L, -2, rx ? "rx_nss" : "tx_nss");
- lua_pushboolean(L, r->is_short_gi);
- lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
+ if (r->is_he) {
+ lua_pushnumber(L, r->he_gi);
+ lua_setfield(L, -2, rx ? "rx_he_gi" : "tx_he_gi");
+
+ lua_pushnumber(L, r->he_dcm);
+ lua_setfield(L, -2, rx ? "rx_he_dcm" : "tx_he_dcm");
+ }
+
+ if (r->is_vht) {
+ lua_pushboolean(L, r->is_short_gi);
+ lua_setfield(L, -2, rx ? "rx_short_gi" : "tx_short_gi");
+ }
}
}
set_rateinfo(L, &e->rx_rate, true);
set_rateinfo(L, &e->tx_rate, false);
+ if (e->thr) {
+ lua_pushnumber(L, e->thr);
+ lua_setfield(L, -2, "expected_throughput");
+ }
+
lua_setfield(L, -2, macstr);
}
}
lua_pushboolean(L, hwmodes & IWINFO_80211_AC);
lua_setfield(L, -2, "ac");
+ lua_pushboolean(L, hwmodes & IWINFO_80211_AD);
+ lua_setfield(L, -2, "ad");
+
+ lua_pushboolean(L, hwmodes & IWINFO_80211_AX);
+ lua_setfield(L, -2, "ax");
+
return 1;
}