lib: add IWINFO_80211_COUNT and IWINFO_80211_NAMES
authorAndre Heider <a.heider@gmail.com>
Mon, 21 Nov 2022 16:26:19 +0000 (17:26 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 15 Dec 2022 23:09:07 +0000 (00:09 +0100)
The same as with the other defines/enums which allow consumers to
iterate over all known ones.

Signed-off-by: Andre Heider <a.heider@gmail.com>
include/iwinfo.h
iwinfo_lib.c

index fee665cc5266baf273c08c6332a9baaae3052621..e87ad1877c7d882a1aa34b0a7df2c0ea3eec0760 100644 (file)
@@ -30,6 +30,7 @@
 #define IWINFO_80211_AC      (1 << 4)
 #define IWINFO_80211_AD      (1 << 5)
 #define IWINFO_80211_AX      (1 << 6)
+#define IWINFO_80211_COUNT   7
 
 #define IWINFO_BAND_24       (1 << 0)
 #define IWINFO_BAND_5        (1 << 1)
@@ -69,6 +70,7 @@
 #define IWINFO_FREQ_NO_160MHZ          (1 << 5)
 #define IWINFO_FREQ_NO_HE              (1 << 6)
 
+extern const char * const IWINFO_80211_NAMES[IWINFO_80211_COUNT];
 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];
index 22c4ef6137cdaf55b1a0068adce93e085eebcc3e..9f787ac1d6adf97b815637a2907228a336b991c0 100644 (file)
 /*
  * name constants
  */
+const char * const IWINFO_80211_NAMES[IWINFO_80211_COUNT] = {
+       "a",
+       "b",
+       "g",
+       "n",
+       "ac",
+       "ad",
+       "ax",
+};
+
 const char * const IWINFO_BAND_NAMES[IWINFO_BAND_COUNT] = {
        "2.4 GHz",
        "5 GHz",