eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 4c8b39da3b0cb24f811b647afde22901d4235081
parent d8617a50002d199f9b805d58b39eff21cc0a5359
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Tue,  4 Sep 2018 21:32:19 -0500

station: Move device_disconnect_event to station

Diffstat:
Msrc/device.c | 20+-------------------
Msrc/station.c | 16++++++++++++++++
Msrc/station.h | 1+
3 files changed, 18 insertions(+), 19 deletions(-)

diff --git a/src/device.c b/src/device.c @@ -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); diff --git a/src/station.c b/src/station.c @@ -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) diff --git a/src/station.h b/src/station.h @@ -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,