Re: [PATCH 4/5] wpa_supplicant: fix the constant roaming problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 06, 2019 at 02:27:47PM -0800, Matthew Wang wrote:
> We saw that on certain platforms in certain places we keep
> switching between two APs and eventually get the same RSSI.
> Debugging showed that we have a very big difference between
> the two antennas.
> 
> Ant A can hear AP A very well (-60) but AP B very bad (-80)
> Ant B can hear AP B very well (-60) but AP A very bad (-80)
> 
> When the device associates to AP A, it'll learn to use Ant A.
> If the device uses one single antenna to receive the scan
> results, it may hear the AP it is currently associated to
> on the second antenna and get bad results. Because of that,
> the wpa_supplicant will roam to the other AP and the same
> scenario will repeat itself:
> 
> Association to AP A (Ant A reports -60).
> Scan on Ant A: AP A: -60, AP B: -80
> Scan on Ant B: AP A: -80, AP A: -60 ==> ROAM.
> 
> Association to AP B (Ant B reports -60)
> Scan on Ant A: AP A: -60, AP B: -80 ==> ROAM
> 
> Etc...
> 
> Fix this by querying the signal of the current AP using
> drv_signal_poll() instead of relying on the signal that
> we get from the scan results.

Thanks, applied with some cleanup.

> diff --git a/wpa_supplicant/events.c b/wpa_supplicant/events.c
> +static int wpas_get_snr_signal_info(const struct wpa_signal_info *si)
> +{
> +	int noise = IS_5GHZ(si->frequency) ?
> +		DEFAULT_NOISE_FLOOR_5GHZ :
> +		DEFAULT_NOISE_FLOOR_2GHZ;
> +
> +	/*
> +	 * Since we take the average beacon signal, we can't use
> +	 * the current noise measurement (average vs. snapshot),
> +	 * so use the default values instead.
> +	 */
> +	return si->avg_beacon_signal - noise;
> +}

This use of hardcoded default values resulted in significant increase in
undesired roaming in my test setup since the driver-reported noise floor
was about 5 dB lower than the hardcoded values and that resulted in the
current BSS being seen as significantly worse than another BSS that had
the same signal level. That comment does not sound correct either since
the noise floor from the driver is likely to be from some kind of
calibration operation and not an instant snapshot.  As such, I applied
another change to use the noise floor value from the driver, if
available, and use those default values only if the driver does not
report a noise floor value.

-- 
Jouni Malinen                                            PGP id EFC895FA

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux