summaryrefslogtreecommitdiff
path: root/include/iwinfo.h
diff options
context:
space:
mode:
authorAnsuel Smith <ansuelsmth@gmail.com>2020-12-06 02:11:15 +0100
committerDaniel Golle <daniel@makrotopia.org>2021-01-05 22:19:42 +0000
commitea28dfb5f9578294919ca4087f281cbdd45f68a9 (patch)
treec07718e2d1ed5775d263b3cc5c90eae0a6193ea2 /include/iwinfo.h
parenta17f5613c3622c85a7c8ab7db0e16be504cfff2a (diff)
downloadiwinfo-ea28dfb5f9578294919ca4087f281cbdd45f68a9.tar.gz
iwinfo: export ht and vht operation in scan results
Export ht and vht operation data in scan results. These additional data can be usefull to check wifi channel utilizzation by neraby stations. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Diffstat (limited to 'include/iwinfo.h')
-rw-r--r--include/iwinfo.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/iwinfo.h b/include/iwinfo.h
index 5e64294..676db91 100644
--- a/include/iwinfo.h
+++ b/include/iwinfo.h
@@ -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 {