Use 6 GHz default noise when estimating 6 GHz SNR
wpa_supplicant underestimates 6 GHz SNR as it assumes 2 GHz default noise in the estimation. Use 6 GHz default noise when estimating 6 GHz SNR. Signed-off-by: Kaidong Wang <kaidong@chromium.org>
This commit is contained in:
parent
7a73399321
commit
2563edb8c5
1 changed files with 9 additions and 3 deletions
|
@ -1963,9 +1963,15 @@ static void wpa_supplicant_rsn_preauth_scan_results(
|
|||
|
||||
static int wpas_get_snr_signal_info(u32 frequency, int avg_signal, int noise)
|
||||
{
|
||||
if (noise == WPA_INVALID_NOISE)
|
||||
noise = IS_5GHZ(frequency) ? DEFAULT_NOISE_FLOOR_5GHZ :
|
||||
DEFAULT_NOISE_FLOOR_2GHZ;
|
||||
if (noise == WPA_INVALID_NOISE) {
|
||||
if (IS_5GHZ(frequency)) {
|
||||
noise = DEFAULT_NOISE_FLOOR_5GHZ;
|
||||
} else if (is_6ghz_freq(frequency)) {
|
||||
noise = DEFAULT_NOISE_FLOOR_6GHZ;
|
||||
} else {
|
||||
noise = DEFAULT_NOISE_FLOOR_2GHZ;
|
||||
}
|
||||
}
|
||||
return avg_signal - noise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue