lib: constify and fixup the string array definitions
Match their declarations as per the header. Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
parent
fddc015704
commit
9f29e79eea
2 changed files with 11 additions and 11 deletions
|
@ -68,9 +68,9 @@
|
||||||
#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 *IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT];
|
extern const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT];
|
||||||
extern const char *IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT];
|
extern const char * const IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT];
|
||||||
extern const char *IWINFO_AUTH_NAMES[IWINFO_AUTH_COUNT];
|
extern const char * const IWINFO_AUTH_NAMES[IWINFO_AUTH_COUNT];
|
||||||
|
|
||||||
|
|
||||||
enum iwinfo_opmode {
|
enum iwinfo_opmode {
|
||||||
|
@ -86,7 +86,7 @@ enum iwinfo_opmode {
|
||||||
IWINFO_OPMODE_P2P_GO = 9,
|
IWINFO_OPMODE_P2P_GO = 9,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const char *IWINFO_OPMODE_NAMES[];
|
extern const char * const IWINFO_OPMODE_NAMES[];
|
||||||
|
|
||||||
|
|
||||||
enum iwinfo_htmode {
|
enum iwinfo_htmode {
|
||||||
|
@ -107,7 +107,7 @@ enum iwinfo_htmode {
|
||||||
IWINFO_HTMODE_COUNT = 13
|
IWINFO_HTMODE_COUNT = 13
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const char *IWINFO_HTMODE_NAMES[IWINFO_HTMODE_COUNT];
|
extern const char * const IWINFO_HTMODE_NAMES[IWINFO_HTMODE_COUNT];
|
||||||
|
|
||||||
|
|
||||||
struct iwinfo_rate_entry {
|
struct iwinfo_rate_entry {
|
||||||
|
@ -229,7 +229,7 @@ struct iwinfo_country_entry {
|
||||||
|
|
||||||
struct iwinfo_iso3166_label {
|
struct iwinfo_iso3166_label {
|
||||||
uint16_t iso3166;
|
uint16_t iso3166;
|
||||||
char name[28];
|
const char name[28];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct iwinfo_hardware_id {
|
struct iwinfo_hardware_id {
|
||||||
|
|
10
iwinfo_lib.c
10
iwinfo_lib.c
|
@ -22,7 +22,7 @@
|
||||||
/*
|
/*
|
||||||
* name constants
|
* name constants
|
||||||
*/
|
*/
|
||||||
const char *IWINFO_CIPHER_NAMES[] = {
|
const char * const IWINFO_CIPHER_NAMES[IWINFO_CIPHER_COUNT] = {
|
||||||
"NONE",
|
"NONE",
|
||||||
"WEP40",
|
"WEP40",
|
||||||
"TKIP",
|
"TKIP",
|
||||||
|
@ -36,7 +36,7 @@ const char *IWINFO_CIPHER_NAMES[] = {
|
||||||
"GCMP-256",
|
"GCMP-256",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *IWINFO_KMGMT_NAMES[] = {
|
const char * const IWINFO_KMGMT_NAMES[IWINFO_KMGMT_COUNT] = {
|
||||||
"NONE",
|
"NONE",
|
||||||
"802.1X",
|
"802.1X",
|
||||||
"PSK",
|
"PSK",
|
||||||
|
@ -44,12 +44,12 @@ const char *IWINFO_KMGMT_NAMES[] = {
|
||||||
"OWE",
|
"OWE",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *IWINFO_AUTH_NAMES[] = {
|
const char * const IWINFO_AUTH_NAMES[IWINFO_AUTH_COUNT] = {
|
||||||
"OPEN",
|
"OPEN",
|
||||||
"SHARED",
|
"SHARED",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *IWINFO_OPMODE_NAMES[] = {
|
const char * const IWINFO_OPMODE_NAMES[] = {
|
||||||
"Unknown",
|
"Unknown",
|
||||||
"Master",
|
"Master",
|
||||||
"Ad-Hoc",
|
"Ad-Hoc",
|
||||||
|
@ -62,7 +62,7 @@ const char *IWINFO_OPMODE_NAMES[] = {
|
||||||
"P2P Go",
|
"P2P Go",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *IWINFO_HTMODE_NAMES[] = {
|
const char * const IWINFO_HTMODE_NAMES[IWINFO_HTMODE_COUNT] = {
|
||||||
"HT20",
|
"HT20",
|
||||||
"HT40",
|
"HT40",
|
||||||
"VHT20",
|
"VHT20",
|
||||||
|
|
Loading…
Reference in a new issue