3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-16 17:09:24 +01:00

scan: remove legacy "Ghz" band modifier settings

This commit is contained in:
James Prestwood 2024-08-27 07:20:48 -07:00 committed by Denis Kenzior
parent 5c7777ff0f
commit 95a9e052de

View File

@ -2492,28 +2492,24 @@ double scan_get_band_rank_modifier(enum band_freq band)
{
const struct l_settings *config = iwd_get_config();
double modifier;
char *str, *str_legacy;
char *str;
switch (band) {
case BAND_FREQ_2_4_GHZ:
str = "BandModifier2_4GHz";
str_legacy = "BandModifier2_4Ghz";
break;
case BAND_FREQ_5_GHZ:
str = "BandModifier5GHz";
str_legacy = "BandModifier5Ghz";
break;
case BAND_FREQ_6_GHZ:
str = "BandModifier6GHz";
str_legacy = "BandModifier6Ghz";
break;
default:
l_warn("Unhandled band %u", band);
return 0.0;
}
if (!l_settings_get_double(config, "Rank", str, &modifier) &&
!l_settings_get_double(config, "Rank", str_legacy, &modifier))
if (!l_settings_get_double(config, "Rank", str, &modifier))
modifier = 1.0;
return modifier;