Add support for CCMP-256 and GCMP-256 ciphers
[project/iwinfo.git] / iwinfo_cli.c
index 82b409c0fcf699e7bd0107f59ff849c26d8081b4..dca86cf6c48ca8f01ea955d60d485a8c75e76b71 100644 (file)
@@ -158,9 +158,15 @@ static char * format_enc_ciphers(int ciphers)
        if (ciphers & IWINFO_CIPHER_CCMP)
                pos += sprintf(pos, "CCMP, ");
 
+       if (ciphers & IWINFO_CIPHER_CCMP256)
+               pos += sprintf(pos, "CCMP-256, ");
+
        if (ciphers & IWINFO_CIPHER_GCMP)
                pos += sprintf(pos, "GCMP, ");
 
+       if (ciphers & IWINFO_CIPHER_GCMP256)
+               pos += sprintf(pos, "GCMP-256, ");
+
        if (ciphers & IWINFO_CIPHER_WRAP)
                pos += sprintf(pos, "WRAP, ");
 
@@ -322,6 +328,20 @@ static char * format_assocrate(struct iwinfo_rate_entry *r)
                                l = sizeof(buf) - (p - buf);
                        }
                }
+               else if (r->is_he)
+               {
+                       p += snprintf(p, l, ", HE-MCS %d, %dMHz", r->mcs, r->mhz);
+                       l = sizeof(buf) - (p - buf);
+
+                       p += snprintf(p, l, ", HE-NSS %d", r->nss);
+                       l = sizeof(buf) - (p - buf);
+
+                       p += snprintf(p, l, ", HE-GI %d", r->he_gi);
+                       l = sizeof(buf) - (p - buf);
+
+                       p += snprintf(p, l, ", HE-DCM %d", r->he_dcm);
+                       l = sizeof(buf) - (p - buf);
+               }
        }
 
        return buf;
@@ -861,6 +881,16 @@ static void lookup_phy(const struct iwinfo_ops *iw, const char *section)
 }
 
 
+static void lookup_path(const struct iwinfo_ops *iw, const char *phy)
+{
+       const char *path;
+
+       if (!iw->phy_path || iw->phy_path(phy, &path) || !path)
+               return;
+
+       printf("%s\n", path);
+}
+
 int main(int argc, char **argv)
 {
        int i, rv = 0;
@@ -920,6 +950,10 @@ int main(int argc, char **argv)
                }
                else
                {
+                       if (!strcmp(argv[2], "path")) {
+                               lookup_path(iw, argv[3]);
+                               return 0;
+                       }
                        switch (argv[2][0])
                        {
                        case 'p':