3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

band: add band_chandef_width_to_string

This commit is contained in:
James Prestwood 2022-12-20 13:43:14 -08:00 committed by Denis Kenzior
parent 9e01563e8c
commit 28f5297b78
2 changed files with 21 additions and 0 deletions

View File

@ -1422,3 +1422,23 @@ enum band_freq band_oper_class_to_band(const uint8_t *country,
else else
return 0; return 0;
} }
const char *band_chandef_width_to_string(enum band_chandef_width width)
{
switch (width) {
case BAND_CHANDEF_WIDTH_20NOHT:
return "20MHz (no-HT)";
case BAND_CHANDEF_WIDTH_20:
return "20MHz";
case BAND_CHANDEF_WIDTH_40:
return "40MHz";
case BAND_CHANDEF_WIDTH_80:
return "80MHz";
case BAND_CHANDEF_WIDTH_80P80:
return "80+80MHz";
case BAND_CHANDEF_WIDTH_160:
return "160MHz";
}
return NULL;
}

View File

@ -111,3 +111,4 @@ uint8_t band_freq_to_channel(uint32_t freq, enum band_freq *out_band);
uint32_t band_channel_to_freq(uint8_t channel, enum band_freq band); uint32_t band_channel_to_freq(uint8_t channel, enum band_freq band);
enum band_freq band_oper_class_to_band(const uint8_t *country, enum band_freq band_oper_class_to_band(const uint8_t *country,
uint8_t oper_class); uint8_t oper_class);
const char *band_chandef_width_to_string(enum band_chandef_width width);