lib: add IWINFO_OPMODE_COUNT and use it for IWINFO_OPMODE_NAMES

Match the other string arrays, which allows us to consistently loop over them.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2022-11-21 10:11:13 +01:00 committed by Jo-Philipp Wich
parent 9f29e79eea
commit a5b30de2b8
2 changed files with 4 additions and 2 deletions

View file

@ -84,9 +84,11 @@ enum iwinfo_opmode {
IWINFO_OPMODE_MESHPOINT = 7,
IWINFO_OPMODE_P2P_CLIENT = 8,
IWINFO_OPMODE_P2P_GO = 9,
IWINFO_OPMODE_COUNT = 10,
};
extern const char * const IWINFO_OPMODE_NAMES[];
extern const char * const IWINFO_OPMODE_NAMES[IWINFO_OPMODE_COUNT];
enum iwinfo_htmode {

View file

@ -49,7 +49,7 @@ const char * const IWINFO_AUTH_NAMES[IWINFO_AUTH_COUNT] = {
"SHARED",
};
const char * const IWINFO_OPMODE_NAMES[] = {
const char * const IWINFO_OPMODE_NAMES[IWINFO_OPMODE_COUNT] = {
"Unknown",
"Master",
"Ad-Hoc",