3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

station: Move device_disconnect_event to station

This commit is contained in:
Denis Kenzior 2018-09-04 21:32:19 -05:00
parent d8617a5000
commit 4c8b39da3b
3 changed files with 18 additions and 19 deletions

View File

@ -81,24 +81,6 @@ static bool device_is_busy(struct device *device)
return station_is_busy(device->station);
}
static void device_disconnect_event(struct device *device)
{
struct station *station = device->station;
l_debug("%d", device->index);
if (station->connect_pending) {
struct network *network = station->connected_network;
dbus_pending_reply(&station->connect_pending,
dbus_error_failed(station->connect_pending));
network_connect_failed(network);
}
station_disassociated(station);
}
static void device_reassociate_cb(struct netdev *netdev,
enum netdev_result result,
void *user_data)
@ -417,7 +399,7 @@ static void device_netdev_event(struct netdev *netdev, enum netdev_event event,
break;
case NETDEV_EVENT_DISCONNECT_BY_AP:
case NETDEV_EVENT_DISCONNECT_BY_SME:
device_disconnect_event(device);
station_disconnect_event(station);
break;
case NETDEV_EVENT_RSSI_THRESHOLD_LOW:
station_low_rssi(station);

View File

@ -717,6 +717,22 @@ void station_disassociated(struct station *station)
station_enter_state(station, STATION_STATE_AUTOCONNECT);
}
void station_disconnect_event(struct station *station)
{
l_debug("%u", netdev_get_ifindex(station->netdev));
if (station->connect_pending) {
struct network *network = station->connected_network;
dbus_pending_reply(&station->connect_pending,
dbus_error_failed(station->connect_pending));
network_connect_failed(network);
}
station_disassociated(station);
}
static void station_roam_timeout_rearm(struct station *station, int seconds);
void station_roamed(struct station *station)

View File

@ -109,6 +109,7 @@ void station_low_rssi(struct station *station);
void station_ok_rssi(struct station *station);
void station_disassociated(struct station *station);
void station_disconnect_event(struct station *station);
struct l_dbus_message *station_dbus_connect_hidden_network(
struct l_dbus *dbus,