eiwd

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

commit 05b803cb7674aee9eb68bada5be4e149689c3fe8
parent faa31802c57b50a269458142a81adee2450f73c4
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Tue, 30 Jun 2020 10:35:47 -0500

station: reflow station_roam_failed

If the roam failed and we are no longer connected, station_disassociated
is called which ends up calling station_roam_state_clear.  Thus
resetting the variables is not needed.  Reflow the logic to make this a
bit more explicit.

Diffstat:
Msrc/station.c | 22+++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/src/station.c b/src/station.c @@ -1364,22 +1364,26 @@ static void station_roamed(struct station *station) static void station_roam_failed(struct station *station) { + l_debug("%u", netdev_get_ifindex(station->netdev)); + + /* + * If we attempted a reassociation or a fast transition, and ended up + * here then we are now disconnected. + */ + if (station->state == STATION_STATE_ROAMING) { + station_disassociated(station); + return; + } + /* * If we're still connected to the old BSS, only clear preparing_roam * and reattempt in 60 seconds if signal level is still low at that - * time. Otherwise (we'd already started negotiating with the - * transition target, preparing_roam is false, state is roaming) we - * are now disconnected. + * time. */ - - l_debug("%u", netdev_get_ifindex(station->netdev)); - station->preparing_roam = false; station->ap_directed_roaming = false; - if (station->state == STATION_STATE_ROAMING) - station_disassociated(station); - else if (station->signal_low) + if (station->signal_low) station_roam_timeout_rearm(station, 60); }