fix -Wduplicate-decl-specifier warnings

include/iwinfo.h:209:19: warning: duplicate 'const' declaration specifier [-Wduplicate-decl-specifier]
  209 | static const char const *ht_secondary_offset[4] = {
      |                   ^~~~~

Constify and move the offenders out of the header.

Signed-off-by: Andre Heider <a.heider@gmail.com>
This commit is contained in:
Andre Heider 2022-11-23 14:11:58 +01:00 committed by Jo-Philipp Wich
parent ccaabb4ea4
commit 462b679716
2 changed files with 27 additions and 19 deletions

View file

@ -199,25 +199,15 @@ struct iwinfo_scanlist_vht_chan_entry {
uint8_t center_chan_2; uint8_t center_chan_2;
}; };
static const char *ht_secondary_offset[4] = { extern const char * const ht_secondary_offset[4];
"no secondary", /* 0 = 20 MHz
"above", 1 = 40 MHz or higher (refer to vht if supported) */
"[reserved!]", extern const uint16_t ht_chan_width[2];
"below", /* 0 = 40 MHz or lower (refer to ht to a more precise width)
}; 1 = 80 MHz
2 = 160 MHz
3 = 80+80 MHz */
static uint16_t ht_chan_width[2] = { extern const uint16_t vht_chan_width[4];
20, /* 20 MHz */
2040, /* 40 MHz or higher (refer to vht if supported) */
};
static uint16_t vht_chan_width[] = {
[0] = 40, /* 40 MHz or lower (refer to ht to a more precise width) */
[1] = 80, /* 80 MHz */
[3] = 8080, /* 80+80 MHz */
[2] = 160, /* 160 MHz */
};
struct iwinfo_scanlist_entry { struct iwinfo_scanlist_entry {
uint8_t mac[6]; uint8_t mac[6];

View file

@ -78,6 +78,24 @@ const char *IWINFO_HTMODE_NAMES[] = {
"HE160" "HE160"
}; };
const char * const ht_secondary_offset[4] = {
"no secondary",
"above",
"[reserved!]",
"below",
};
const uint16_t ht_chan_width[2] = {
20,
2040,
};
const uint16_t vht_chan_width[4] = {
40, /* 40 MHz or lower (refer to ht to a more precise width) */
80, /* 80 MHz */
160, /* 160 MHz */
8080, /* 80+80 MHz */
};
/* /*
* ISO3166 country labels * ISO3166 country labels