lib: add IWINFO_BAND_COUNT and IWINFO_BAND_NAMES
authorAndre Heider <a.heider@gmail.com>
Mon, 21 Nov 2022 12:50:16 +0000 (13:50 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 15 Dec 2022 23:09:07 +0000 (00:09 +0100)
Signed-off-by: Andre Heider <a.heider@gmail.com>
include/iwinfo.h
iwinfo_lib.c

index 71fadabb077b296647a95eab772c8fb50b171bf8..fee665cc5266baf273c08c6332a9baaae3052621 100644 (file)
@@ -35,6 +35,7 @@
 #define IWINFO_BAND_5        (1 << 1)
 #define IWINFO_BAND_6        (1 << 2)
 #define IWINFO_BAND_60       (1 << 3)
+#define IWINFO_BAND_COUNT    4
 
 #define IWINFO_CIPHER_NONE    (1 << 0)
 #define IWINFO_CIPHER_WEP40   (1 << 1)
@@ -68,6 +69,7 @@
 #define IWINFO_FREQ_NO_160MHZ          (1 << 5)
 #define IWINFO_FREQ_NO_HE              (1 << 6)
 
+extern const char * const IWINFO_BAND_NAMES[IWINFO_BAND_COUNT];
 extern const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT];
 extern const char * const IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT];
 extern const char * const IWINFO_AUTH_NAMES[IWINFO_AUTH_COUNT];
index 7fbf8112d88dec50132bb9fb2aa27bc1ce2c44c0..22c4ef6137cdaf55b1a0068adce93e085eebcc3e 100644 (file)
 /*
  * name constants
  */
+const char * const IWINFO_BAND_NAMES[IWINFO_BAND_COUNT] = {
+       "2.4 GHz",
+       "5 GHz",
+       "6 GHz",
+       "60 GHz",
+};
+
 const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT] = {
        "NONE",
        "WEP-40",