scan: Add support for separate 6Ghz band modifier
PATCH 1/1 scan: Add support for separate 6Ghz band modifier
--- src/iwd.config.rst | 7 +++++++ src/scan.c | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-)
src/iwd.config.rst +7 -0
@@ -310,6 +310,13 @@ autoconnect purposes. networks are highly RSSI sensitive, so it is still possible for IWD to prefer 2.4Ghz APs in certain circumstances. + * - BandModifier6Ghz + - Values: floating point value (default: **1.0**) + + Increase or decrease the preference for 6GHz access points by increasing + or decreasing the value of this modifier. Since 6GHz networks are highly + RSSI sensitive, this gives an option to prefer 6GHz APs over 5GHz APs. + Scan ----
src/scan.c +11 -2
@@ -54,6 +54,7 @@/* User configurable options */ static double RANK_5G_FACTOR ; +static double RANK_6G_FACTOR ;static uint32_t SCAN_MAX_INTERVAL ;static uint32_t SCAN_INIT_INTERVAL ;
@@ -1645,10 +1646,14 @@ static void scan_bss_compute_rank(struct scan_bss *bss) rank = (double )bss->data_rate / max_rate *USHRT_MAX ; -/* Prefer 5G/6G networks over 2.4G */ -if (bss->frequency >4000 ) +/* Prefer 5G networks over 2.4G and 6G */ +if (bss->frequency >=4900 && bss->frequency <5900 ) rank *=RANK_5G_FACTOR ; +/* Prefer 6G networks over 2.4G and 5G */ +if (bss->frequency >=5900 && bss->frequency <7200 ) + rank *=RANK_6G_FACTOR ; +/* Rank loaded APs lower and lightly loaded APs higher */ if (bss->utilization >=192 ) rank *=RANK_HIGH_UTILIZATION_FACTOR ;
@@ -2343,6 +2348,10 @@ static int scan_init(void) &RANK_5G_FACTOR))RANK_5G_FACTOR =1.0 ; +if (!l_settings_get_double (config,"Rank" ,"BandModifier6Ghz" , + &RANK_6G_FACTOR )) +RANK_6G_FACTOR =1.0 ; +if (!l_settings_get_uint (config,"Scan" ,"InitialPeriodicScanInterval" , &SCAN_INIT_INTERVAL ))SCAN_INIT_INTERVAL =10 ;
Signature · 1 line
2.38.1
Denis Kenzior
AppliedHi Marcel,
Quoted 5 lines · Marcel Holtmann
--- src/iwd.config.rst | 7 +++++++ src/scan.c | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-)
Applied, thanks.
Regards,
-Denis