From: Hahn, Maital Date: Wed, 8 Jul 2015 13:13:11 +0000 (+0000) Subject: wpa_supplicant: Fix a typo in wpa_scan_result_compar() X-Git-Tag: hostap_2_5~438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa517ae22784aff08d3d9e38ad101b4b5c9828fb;p=thirdparty%2Fhostap.git 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 --- diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index e81465c5b..70cfa36cc 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1679,7 +1679,7 @@ static int wpa_scan_result_compar(const void *a, const void *b) 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). */