diff mbox series

[12/12] scan: increase max data rate, now for HE

Message ID 20220719185544.456727-12-prestwoj@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [01/12] scan: add colocated scan flag | expand

Checks

Context Check Description
prestwoj/iwd-ci-gitlint success GitLint

Commit Message

James Prestwood July 19, 2022, 6:55 p.m. UTC
This increases the maximum data rate which now is possible with HE.
A few comments were also updated, one to include 6G when adjusting
the rank for >4000mhz, and the other fixing a typo.
---
 src/scan.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/scan.c b/src/scan.c
index e1c89fb2..7fc60e32 100644
--- a/src/scan.c
+++ b/src/scan.c
@@ -1628,17 +1628,17 @@  static void scan_bss_compute_rank(struct scan_bss *bss)
 	double rank;
 	uint32_t irank;
 	/*
-	 * Maximum rate is 2340Mbps (VHT)
+	 * Maximum rate is 9607.8Mbps (HE)
 	 */
-	double max_rate = 2340000000;
+	double max_rate = 9607800000;
 
 	rank = (double)bss->data_rate / max_rate * USHRT_MAX;
 
-	/* Prefer 5G networks over 2.4G */
+	/* Prefer 5G/6G networks over 2.4G */
 	if (bss->frequency > 4000)
 		rank *= RANK_5G_FACTOR;
 
-	/* Rank loaded APs lower and lighly loaded APs higher */
+	/* Rank loaded APs lower and lightly loaded APs higher */
 	if (bss->utilization >= 192)
 		rank *= RANK_HIGH_UTILIZATION_FACTOR;
 	else if (bss->utilization <= 63)