gsupplicant: Propagate only property changes of the connected BSS

A ConnMan service is a WiFi network identified by the SSID, security (none, wep,
psk and ieee8021x) and mode (managed, adhoc, ap). This WiFi network could be
composed by multiple BSSs but it is shown as a single service by ConnMan. The
properties of that network correspond to the best BSS (Currently, only the
signal strength). The best BSS is the one with the highest signal strength. Now,
the issue is that ConnMan is selecting the best BSS by itself and it could cause
a misalignment with wpa_s; in particular when roaming. For instance, if ConnMan
updates the best BSS because there is a BSS with higher signal strength than the
current one but wpa_s takes too much time to roaming or even worse it never does
the roaming because such feature is not enabled in wpa_s; on both cases, ConnMan
will incorrectly start propagating the signal strength of the its best BSS but
actually we are associated to another one. Therefore, in these cases, the signal
strength the user will see for that network comes from the BSS with the highest
signal not from the one he are actually associated.

This patch makes ConnMan memorize the WiFi network it gets associated
(current_network). Then, from this point forward, the best BSS of that network
will only be updated if wpa_s signals a disassociation or we got associated with
another BSS (roaming).

With this patch, ConnMan is now able to distinguish at gsupplicant level which
is the BSS it is actually associated to because it will be always the best BSS
of the associated network. This is useful for future developments.
1 file changed