eiwd

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

commit 187ea7f5d12eb8f4b22d0b9cd41acc44a5ef7a99
parent f996bea880475847a73d3ddffafc34fbbe817fee
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Tue,  4 Sep 2018 16:26:33 -0500

device/network: Use station_is_busy

Diffstat:
Msrc/device.c | 11++---------
Msrc/device.h | 2--
Msrc/network.c | 2+-
3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/device.c b/src/device.c @@ -115,19 +115,12 @@ static bool new_scan_results(uint32_t wiphy_id, uint32_t ifindex, int err, } /* TODO: Remove when Station/Device is split */ -bool device_is_busy(struct device *device) +static bool device_is_busy(struct device *device) { - enum station_state state; - if (!device->powered || !device->station) return false; - state = station_get_state(device->station); - if (state != STATION_STATE_DISCONNECTED && - state != STATION_STATE_AUTOCONNECT) - return true; - - return false; + return station_is_busy(device->station); } static void periodic_scan_trigger(int err, void *user_data) diff --git a/src/device.h b/src/device.h @@ -28,8 +28,6 @@ struct netdev; struct network; struct device; -bool device_is_busy(struct device *device); - void device_disassociated(struct device *device); void device_transition_start(struct device *device, struct scan_bss *bss); void device_set_scan_results(struct device *device, struct l_queue *bss_list, diff --git a/src/network.c b/src/network.c @@ -1008,7 +1008,7 @@ static struct l_dbus_message *network_connect(struct l_dbus *dbus, l_debug(""); - if (device_is_busy(device)) + if (station_is_busy(station)) return dbus_error_busy(message); /*