mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-26 18:59:22 +01:00
network: Add network_disconnected
Let network handle anything that needs to be done on a disconnection, this way keep the settings opening and closing logic in network.c.
This commit is contained in:
parent
b3abd2f7ca
commit
3fa9a21a39
@ -182,6 +182,11 @@ fail:
|
||||
return false;
|
||||
}
|
||||
|
||||
void network_disconnected(struct network *network)
|
||||
{
|
||||
network_settings_close(network);
|
||||
}
|
||||
|
||||
/* First 64 entries calculated by 1 / pow(n, 0.3) for n >= 1 */
|
||||
static const double rankmod_table[] = {
|
||||
1.0000000000, 0.8122523964, 0.7192230933, 0.6597539554,
|
||||
|
@ -27,6 +27,7 @@ struct network;
|
||||
|
||||
bool network_seen(struct network *network);
|
||||
bool network_connected(struct network *network);
|
||||
void network_disconnected(struct network *network);
|
||||
double network_rankmod(uint32_t type, const char *ssid);
|
||||
|
||||
struct network *network_create(struct device *device,
|
||||
|
@ -218,7 +218,7 @@ static void device_disassociated(struct device *device)
|
||||
struct network *network = device->connected_network;
|
||||
struct l_dbus *dbus = dbus_get_bus();
|
||||
|
||||
network_settings_close(network);
|
||||
network_disconnected(network);
|
||||
|
||||
device->connected_bss = NULL;
|
||||
device->connected_network = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user