Prefer 5 GHz channels more aggressively?

Lukas Ribisch l.ribisch
Wed Jun 4 06:52:52 PDT 2014


I'm using wpa_supplicant to connect to my university's campus network.
Our access points use BSSIDs on both 2,4 GHz and 5 GHz; obviously, the 5
GHz APs are far less crowded and susceptible to interference than the
2,4 GHz ones. Additionally, we are now deploying 802.11ac, but only on 5

Unfortunately, it seems that wpa_supplicant's heuristic to select the
best BSSID almost exclusively prefers the access points on 2,4 GHz,
because their RSSI is almost always a bit better than the 5 GHz one.
I've compared this to other operating systems (on the same as well as on
different machines); the other drivers seem to prefer 5 GHz APs in a lot
more cases than wpa_supplicant.

I've located the code responsible for selecting the best AP, and
modified the maximum difference in RSSI for a 5 GHz AP to still be
preferred over a 2,4 GHz one from 5 dBm to 30 dBm, but only if the RSSI
is not lower than -85 dBm. (By the way: Should that actually be -85 in
the code in order to do what I want?) I've attached the patch; it has
worked very well for me in the past few days, and my laptop now
consistenly attaches to the 5 GHz APs, which increases the quality and
the data rate of the connection, for the new 802.11ac APs as well as for
the old a/g devices.

Of course, the threshold of -85 dBm is quite arbitrary (it is the level
at which my specific 802.11 device starts becoming unreliable), but I
suspect that a larger allowable difference in RSSI between 2,4 GHz and 5
GHz would allow many more clients to use the better 5 GHz network.

What are your opinions on changing the hardcoded limit from 5 dBm to
something like 20-30 dBm, possibly capped at some conservative value
like -50 to -60 dBm? Or is this something that should be configurable?

Lukas Ribisch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-5ghz.patch
Type: text/x-diff
Size: 984 bytes
Desc: not available
URL: <>

More information about the Hostap mailing list