From 1d30df192986dc775750d09109eb386b9ff8e83e Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Mon, 21 Nov 2022 13:50:16 +0100 Subject: [PATCH] lib: add IWINFO_BAND_COUNT and IWINFO_BAND_NAMES Signed-off-by: Andre Heider --- include/iwinfo.h | 2 ++ iwinfo_lib.c | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/include/iwinfo.h b/include/iwinfo.h index 71fadab..fee665c 100644 --- a/include/iwinfo.h +++ b/include/iwinfo.h @@ -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]; diff --git a/iwinfo_lib.c b/iwinfo_lib.c index 7fbf811..22c4ef6 100644 --- a/iwinfo_lib.c +++ b/iwinfo_lib.c @@ -22,6 +22,13 @@ /* * 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", -- 2.30.2