lib: add IWINFO_80211_COUNT and IWINFO_80211_NAMES

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>
This commit is contained in:
Andre Heider 2022-11-21 17:26:19 +01:00 committed by Jo-Philipp Wich
parent 1d30df1929
commit 02f433e305
2 changed files with 12 additions and 0 deletions

View file

@ -30,6 +30,7 @@
#define IWINFO_80211_AC (1 << 4) #define IWINFO_80211_AC (1 << 4)
#define IWINFO_80211_AD (1 << 5) #define IWINFO_80211_AD (1 << 5)
#define IWINFO_80211_AX (1 << 6) #define IWINFO_80211_AX (1 << 6)
#define IWINFO_80211_COUNT 7
#define IWINFO_BAND_24 (1 << 0) #define IWINFO_BAND_24 (1 << 0)
#define IWINFO_BAND_5 (1 << 1) #define IWINFO_BAND_5 (1 << 1)
@ -69,6 +70,7 @@
#define IWINFO_FREQ_NO_160MHZ (1 << 5) #define IWINFO_FREQ_NO_160MHZ (1 << 5)
#define IWINFO_FREQ_NO_HE (1 << 6) #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_BAND_NAMES[IWINFO_BAND_COUNT];
extern const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_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_KMGMT_NAMES[IWINFO_KMGMT_COUNT];

View file

@ -22,6 +22,16 @@
/* /*
* name constants * 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] = { const char * const IWINFO_BAND_NAMES[IWINFO_BAND_COUNT] = {
"2.4 GHz", "2.4 GHz",
"5 GHz", "5 GHz",