Skip to content

Commit eda4116

Browse files
krish2718jukkar
authored andcommitted
[fromlist] wpa_supplicant: Add an option to disable SNR capping
When selecting a network the default behaviour of WPA supplicant is to prefer higher throughput, it does this by capping the SNR. But in certain environments, reliability is important over throughput and choosing a lower SNR (thought it is greater than "Great SNR") might be sub-optimal. Introduce a configuration option to choose the two options (throughput or reliability). Upstream PR: http://lists.infradead.org/pipermail/hostap/2024-March/042483.html Signed-off-by: Chaitanya Tata <[email protected]>
1 parent 6c2f3b6 commit eda4116

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

wpa_supplicant/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1886,6 +1886,10 @@ ifdef CONFIG_NO_TKIP
18861886
CFLAGS += -DCONFIG_NO_TKIP
18871887
endif
18881888

1889+
ifdef CONFIG_NW_SEL_RELIABILITY
1890+
CFLAGS += -DCONFIG_NW_SEL_RELIABILITY
1891+
endif
1892+
18891893
dynamic_eap_methods: $(EAPDYN)
18901894

18911895
_OBJS_VAR := OBJS_priv

wpa_supplicant/defconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,3 +633,14 @@ CONFIG_DPP2=y
633633
# design is still subject to change. As such, this should not yet be enabled in
634634
# production use.
635635
#CONFIG_PASN=y
636+
637+
# When selecting a network, prefer networks with a better signal strength
638+
# without any cap a.k.a "Great SNR".
639+
#
640+
# If this is enabled then higher SNR is preferred without any cap over higher band
641+
# (higher throughput) to achieve better reliability.
642+
#
643+
# If this is disabled then for networks with capped SNR, the preference is given
644+
# to the network with higher band (5GHz or 6GHz) and then to the network with
645+
# higher SNR.
646+
#CONFIG_NW_SEL_RELIABILITY=y

wpa_supplicant/scan.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,15 @@
1818
#define DEFAULT_NOISE_FLOOR_5GHZ (-92)
1919
#define DEFAULT_NOISE_FLOOR_6GHZ (-92)
2020

21+
#ifdef CONFIG_NW_SEL_RELIABILITY
22+
/*
23+
* This basically disables capping the SNR when choosing the best BSS. This
24+
* means that the BSS with the highest SNR will be chosen, independent of the
25+
* band. This is useful for scenarios where reliability is more important than
26+
* throughput.
27+
*/
28+
#define GREAT_SNR 999
29+
#else
2130
/*
2231
* Channels with a great SNR can operate at full rate. What is a great SNR?
2332
* This doc https://supportforums.cisco.com/docs/DOC-12954 says, "the general
@@ -29,6 +38,7 @@
2938
* somewhat conservative value here.
3039
*/
3140
#define GREAT_SNR 25
41+
#endif /* CONFIG_NW_SEL_RELIABILITY */
3242

3343
#define IS_2P4GHZ(n) (n >= 2412 && n <= 2484)
3444
#define IS_5GHZ(n) (n > 4000 && n < 5895)

0 commit comments

Comments
 (0)