iwd: Init AutoConnect of know networks
When creating a new know network object, check if we have already a
registered network object with the autoconnect flag. If we find one,
update the value of the known network object.
During the initial D-Bus API discovering, ConnMan will create the
network objects first. This means the core will see the new network
and will try to use iwd's auto connect mode. Also ConnMan will set the
AutoConnect flag for the (ConnMan's) known networks. At this point
though, the plugin has not yet discovered the known networks object
from the D-Bus API. Thus, the initial AutoConnect value could be lost.
In theory this is not necessary but it is possible that ConnMan's
state and iwd state do not match, e.g. the user has disabled the
autoconnect via iwdctl.
This can lead to the situation where ConnMan thinks the AutoConnect
flag has been set but it is not and hence iwd's auto connect is not
enabled and hence no auto connect.
1 file changed