]> git.ipfire.org Git - thirdparty/hostap.git/commit
Improve BSS selection with default noise floor values
authorMukesh Agrawal <quiche@chromium.org>
Wed, 9 Apr 2014 00:54:49 +0000 (17:54 -0700)
committerJouni Malinen <j@w1.fi>
Sun, 1 Feb 2015 20:01:18 +0000 (22:01 +0200)
commitf0d0a5d23bd406a60358add9fa101b49dc9f9039
tree02bccd34f5f622c21c174ffb0a26cbd7187446d8
parent7f7bfba919a76bb03a7f762eab0ac00d4f5c3184
Improve BSS selection with default noise floor values

When noise floor measurements are not available, compute SNR
using default values for the noise floor. This helps steer us
towards 5 GHz BSSes in high signal strength environments.

In more detail...

Existing code prefers a 5 GHz BSS when the 5 GHz BSS's signal
strength is "close" to that of the 2.4 GHz BSS, or when both SNRs
are large. However, the mwifiex driver does not provide noise
floor measurements, so we can't compute SNRs.

Because mwifiex doesn't provide NF measurements, the "large SNR"
code wasn't effective. By using default values for the noise floor,
we can again compute SNRs, and decide that the SNR is high enough
that we shouldn't worry about the exact difference in SNR.

The default noise floor values (one for 2.4 GHz, and one for 5 GHz)
were chosen by measurement in a noisy environment, so they should be
conservative.

Note that while this patch is motivated by mwifiex, it affects
ath9k as well. Although ath9k provides noise floor measurements
in general, it will sometimes fail to provide a measurement for
one or more specific channels.

As a result of this patch, we'll always compare BSSes based on SNR
(either measured or estimated), rather than sometimes comparing
based on signal strength. ("Always" assumes that the
WPA_SCAN_LEVEL_DBM flag is set. It is for mwifiex and ath9k.)

While there:
- fix a whitespace issue (spaces -> tab)
- clean up existing comments
- update dump_scan_res to indicate whether the noise floor is
  measured, or default

Signed-hostap: mukesh agrawal <quiche@chromium.org>
wpa_supplicant/scan.c