mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-21 03:32:42 +01:00
wiphy: Move NULL check to device_disassociated
Do nothing in device_disassociated if device->connected_network indicates we are not associated. This may happen if the device was connected since before iwd was started, this should possibly be fixed separately by querying device state when device is detected.
This commit is contained in:
parent
3fa9a21a39
commit
e07b24e5d8
@ -218,6 +218,9 @@ static void device_disassociated(struct device *device)
|
||||
struct network *network = device->connected_network;
|
||||
struct l_dbus *dbus = dbus_get_bus();
|
||||
|
||||
if (!network)
|
||||
return;
|
||||
|
||||
network_disconnected(network);
|
||||
|
||||
device->connected_bss = NULL;
|
||||
@ -237,8 +240,7 @@ static void device_lost_beacon(struct device *device)
|
||||
dbus_pending_reply(&device->connect_pending,
|
||||
dbus_error_failed(device->connect_pending));
|
||||
|
||||
if (device->connected_network)
|
||||
device_disassociated(device);
|
||||
device_disassociated(device);
|
||||
}
|
||||
|
||||
static void genl_connect_cb(struct l_genl_msg *msg, void *user_data)
|
||||
|
Loading…
Reference in New Issue
Block a user