mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +01: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:
parent
249a1ef1c0
commit
f6f08f9b96
@ -3507,6 +3507,7 @@ static struct station *station_create(struct netdev *netdev)
|
|||||||
{
|
{
|
||||||
struct station *station;
|
struct station *station;
|
||||||
struct l_dbus *dbus = dbus_get_bus();
|
struct l_dbus *dbus = dbus_get_bus();
|
||||||
|
bool autoconnect = true;
|
||||||
|
|
||||||
station = l_new(struct station, 1);
|
station = l_new(struct station, 1);
|
||||||
watchlist_init(&station->state_watches, NULL);
|
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);
|
l_queue_push_head(station_list, station);
|
||||||
|
|
||||||
station_set_autoconnect(station, true);
|
|
||||||
|
|
||||||
l_dbus_object_add_interface(dbus, netdev_get_path(netdev),
|
l_dbus_object_add_interface(dbus, netdev_get_path(netdev),
|
||||||
IWD_STATION_INTERFACE, station);
|
IWD_STATION_INTERFACE, station);
|
||||||
|
|
||||||
@ -3536,11 +3535,15 @@ static struct station *station_create(struct netdev *netdev)
|
|||||||
|
|
||||||
station_fill_scan_freq_subsets(station);
|
station_fill_scan_freq_subsets(station);
|
||||||
|
|
||||||
if (iwd_is_developer_mode())
|
if (iwd_is_developer_mode()) {
|
||||||
l_dbus_object_add_interface(dbus,
|
l_dbus_object_add_interface(dbus,
|
||||||
netdev_get_path(station->netdev),
|
netdev_get_path(station->netdev),
|
||||||
IWD_STATION_DEBUG_INTERFACE,
|
IWD_STATION_DEBUG_INTERFACE,
|
||||||
station);
|
station);
|
||||||
|
autoconnect = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
station_set_autoconnect(station, autoconnect);
|
||||||
|
|
||||||
return station;
|
return station;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user