From 14204148781cf8e64827eae12dffacc869586073 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 16 Feb 2017 11:07:12 +0200 Subject: [PATCH] Drop GREAT_SNR definition from 30 to 25 dB This allows throughput estimates and 5 GHz preference over 2.4 GHz band to be used in more cases. The previously used value of 30 was significantly more conservative than the SNR limits used for the highest rate in scan_est_throughput() and this resulted in cases where 5 GHz AP was ignored while SNR with it would have been close to reaching the maximum TX rate. Signed-off-by: Jouni Malinen --- wpa_supplicant/scan.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index 6099a36c5..7345c9b0b 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -1788,10 +1788,12 @@ struct wpabuf * wpa_scan_get_vendor_ie_multi(const struct wpa_scan_res *res, * This doc https://supportforums.cisco.com/docs/DOC-12954 says, "the general * rule of thumb is that any SNR above 20 is good." This one * http://www.cisco.com/en/US/tech/tk722/tk809/technologies_q_and_a_item09186a00805e9a96.shtml#qa23 - * recommends 25 as a minimum SNR for 54 Mbps data rate. 30 is chosen here as a - * conservative value. + * recommends 25 as a minimum SNR for 54 Mbps data rate. The estimates used in + * scan_est_throughput() allow even smaller SNR values for the maximum rates + * (21 for 54 Mbps, 22 for VHT80 MCS9, 24 for HT40 and HT20 MCS7). Use 25 as a + * somewhat conservative value here. */ -#define GREAT_SNR 30 +#define GREAT_SNR 25 #define IS_5GHZ(n) (n > 4000)