[th/wifi-scan-for-seen-bssids] wifi: fix eager background Wi-Fi scanning with seen-bssids

Thomas Haller requested to merge th/wifi-scan-for-seen-bssids into main

"wifi.seen-bssids" looks like a regular property, but it is not. Unlike almost all other properties, it does not contain user configuration, rather it gets filled by the daemon.

The values are stored in "/var/lib/NetworkManager/seen-bssids" file, and in the daemon they are maintained separately from the profile. Only before exporting the profile on D-Bus, the value gets merged (see NM_SETTINGS_CONNECTION_GET_PRIVATE(self)->>getsettings_cached and nm_connection_to_dbus_full().

Hence, looking at nm_setting_wireless_get_num_seen_bssids() is not working. Fix that.

#1253 (closed)

Fixes: 0f320333 ('wifi: roam aggressively if we on a multi-AP network')

Merge request reports