iwinfo: export ht and vht operation in scan results
[project/iwinfo.git] / include / iwinfo.h
index 5e64294392901308dcfa344197e67129fd326ef6..676db91b4968cf360cca154fc3315479b132e6e5 100644 (file)
@@ -170,6 +170,38 @@ struct iwinfo_crypto_entry {
        uint8_t auth_algs;
 };
 
+struct iwinfo_scanlist_ht_chan_entry {
+       uint8_t primary_chan;
+       uint8_t secondary_chan_off;
+       uint8_t chan_width;
+};
+
+struct iwinfo_scanlist_vht_chan_entry {
+       uint8_t chan_width;
+       uint8_t center_chan_1;
+       uint8_t center_chan_2;
+};
+
+static const char *ht_secondary_offset[4] = {
+       "no secondary",
+       "above",
+       "[reserved!]",
+       "below",
+};
+
+
+static uint16_t ht_chan_width[2] = {
+       20, /* 20 MHz */
+       2040, /* 40 MHz or higher (refer to vht if supported) */
+};
+
+static uint16_t vht_chan_width[] = {
+       [0] = 40, /* 40 MHz or lower (refer to ht to a more precise width) */
+       [1] = 80, /* 80 MHz */
+       [3] = 8080, /* 80+80 MHz */
+       [2] = 160, /* 160 MHz */
+};
+
 struct iwinfo_scanlist_entry {
        uint8_t mac[6];
        char ssid[IWINFO_ESSID_MAX_SIZE+1];
@@ -179,6 +211,8 @@ struct iwinfo_scanlist_entry {
        uint8_t quality;
        uint8_t quality_max;
        struct iwinfo_crypto_entry crypto;
+       struct iwinfo_scanlist_ht_chan_entry ht_chan_info;
+       struct iwinfo_scanlist_vht_chan_entry vht_chan_info;
 };
 
 struct iwinfo_country_entry {