Search Linux Wireless

Classification of BSS with different frequencies in KHz

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"freq_offset" also needs to be compared on S1G Band.
If freq_offset comparison is omitted in cmp_bss, other bss cannot be distinguished in units of khz.
>From 39e6b6b9ecf0b301223dd9e34715e9d103573ff7 Mon Sep 17 00:00:00 2001
From: JUN-KYU SHIN <jk.shin@xxxxxxxxxxxx>
Date: Wed, 9 Nov 2022 14:35:49 +0900
Subject: [PATCH] Classification of BSS with different frequencies in KHz.

"freq_offset" also needs to be compared on S1G Band.
If freq_offset comparison is omitted in cmp_bss,
other bss cannot be distinguished in units of khz.

Signed-off-by: JUN-KYU SHIN <jk.shin@xxxxxxxxxxxx>
---
 net/wireless/scan.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index 806a5f1330ff..3cfc668c4189 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -1289,7 +1289,8 @@ static int cmp_bss(struct cfg80211_bss *a,
 	int i, r;
 
 	if (a->channel != b->channel)
-		return b->channel->center_freq - a->channel->center_freq;
+		return ((b->channel->center_freq + b->channel->freq_offset) -
+					(a->channel->center_freq + a->channel->freq_offset));
 
 	a_ies = rcu_access_pointer(a->ies);
 	if (!a_ies)
-- 
2.25.1


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux