3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

station: disable autoconnect when in developer mode

Most autotests do not want autoconnect behavior so it is being
turned off by default. There are a few tests where it is needed
and in these few cases the test can enable autoconnect through
the new station debug property.
This commit is contained in:
James Prestwood 2021-08-12 13:38:07 -07:00 committed by Denis Kenzior
parent 249a1ef1c0
commit f6f08f9b96

View File

@ -3507,6 +3507,7 @@ static struct station *station_create(struct netdev *netdev)
{
struct station *station;
struct l_dbus *dbus = dbus_get_bus();
bool autoconnect = true;
station = l_new(struct station, 1);
watchlist_init(&station->state_watches, NULL);
@ -3524,8 +3525,6 @@ static struct station *station_create(struct netdev *netdev)
l_queue_push_head(station_list, station);
station_set_autoconnect(station, true);
l_dbus_object_add_interface(dbus, netdev_get_path(netdev),
IWD_STATION_INTERFACE, station);
@ -3536,11 +3535,15 @@ static struct station *station_create(struct netdev *netdev)
station_fill_scan_freq_subsets(station);
if (iwd_is_developer_mode())
if (iwd_is_developer_mode()) {
l_dbus_object_add_interface(dbus,
netdev_get_path(station->netdev),
IWD_STATION_DEBUG_INTERFACE,
station);
autoconnect = false;
}
station_set_autoconnect(station, autoconnect);
return station;
}