summaryrefslogtreecommitdiff
path: root/debian/patches/wpasupplicant_band_selection_aa517ae2.patch
blob: ebe878e136d4e79524b012d7339711585da33e91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
commit aa517ae22784aff08d3d9e38ad101b4b5c9828fb
Author: Hahn, Maital <maitalm@ti.com>
Date:   Wed Jul 8 13:13:11 2015 +0000

    wpa_supplicant: Fix a typo in wpa_scan_result_compar()
    
    A typo in wpa_scan_result_compar() caused wrong scan results sorting
    (and wrong roaming decision). This fixes a copy-paste regression
    introduced by commit a1b790eb9d7514d1a6e0582a07f695a1564caa59 ('Select
    AP based on estimated maximum throughput').
    
    Signed-off-by: Maital Hahn <maitalm@ti.com>

--- a/wpa_supplicant/scan.c
+++ b/wpa_supplicant/scan.c
@@ -1580,7 +1580,7 @@ static int wpa_scan_result_compar(const
 		snr_a_full = wa->snr;
 		snr_a = MIN(wa->snr, GREAT_SNR);
 		snr_b_full = wb->snr;
-		snr_b = MIN(wa->snr, GREAT_SNR);
+		snr_b = MIN(wb->snr, GREAT_SNR);
 	} else {
 		/* Level is not in dBm, so we can't calculate
 		 * SNR. Just use raw level (units unknown). */