iwd: Avoid ConnectHiddenNetwork() if network is visible

If the target hidden network is already recorded by IWD with its SSID
during a previous active scan, use the Network.Connect() API instead of
Station.ConnectHiddenNetwork() which would fail in IWD version up to
1.9.  This is a rare corner case scenario though.

Also drop the !nm_wifi_ap_get_supplicant_path(ap) check, I'm not
sure when if ever that condition can be true, more so now that we're
checking nm_wifi_ap_get_fake(ap) before that.
21 jobs for iwd-hidden-networks-cleanup in 39 minutes and 7 seconds (queued for 7 seconds)
latest
Status Job ID Name Coverage
  Test
failed #5000298
allowed to fail
checkpatch

00:02:08

manual #5000306
allowed to fail manual
t_centos:7.5.1804
manual #5000307
allowed to fail manual
t_centos:7.6.1810
manual #5000308
allowed to fail manual
t_centos:7.7.1908
manual #5000309
allowed to fail manual
t_centos:7.8.2003
manual #5000310
allowed to fail manual
t_centos:8.1.1911
manual #5000316
allowed to fail manual
t_debian:10
manual #5000315
allowed to fail manual
t_debian:9
manual #5000318
allowed to fail manual
t_debian:sid
manual #5000317
allowed to fail manual
t_debian:testing
manual #5000299
allowed to fail manual
t_fedora:28
manual #5000300
allowed to fail manual
t_fedora:29
manual #5000301
allowed to fail manual
t_fedora:30
manual #5000302
allowed to fail manual
t_fedora:31
passed #5000303
t_fedora:32

00:39:07

manual #5000304
allowed to fail manual
t_fedora:33
manual #5000305
allowed to fail manual
t_fedora:rawhide
manual #5000311
allowed to fail manual
t_ubuntu:16.04
manual #5000312
allowed to fail manual
t_ubuntu:18.04
manual #5000314
allowed to fail manual
t_ubuntu:devel
manual #5000313
allowed to fail manual
t_ubuntu:rolling
 
Name Stage Failure
failed
checkpatch Test
 {
NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE(self);
- NMWifiAP * ap = NULL;
+ NMWifiAP * ap = NULL;
NMWifiAP * tmp;
bool recheck;
nm_auto_ref_string NMRefString *bss_path = NULL;
Error: nm-device-iwd.c code-style is wrong, fix it by running 'contrib/scripts/nm-code-format.sh -i src/devices/wifi/nm-device-iwd.c)
ERROR: Job failed: exit code 1