From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 7/8] station: specially handle FT-over-DS failure
Date: Thu, 15 Apr 2021 15:45:07 -0700 [thread overview]
Message-ID: <20210415224508.1823614-7-prestwoj@gmail.com> (raw)
In-Reply-To: <20210415224508.1823614-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]
Depending on the netdev result, FT-over-DS failure may not need to
be fatal. If the result is an Authentication failure this just means
that FT-over-DS did not successfully send or receive the initial
action frames. This means we cannot roam, but it does not mean the
connection needs to be fully terminated. A new flag was added to
signal FT-over-DS, and the failure code treats an authentication
failure specially if this flag is set.
---
src/station.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/station.c b/src/station.c
index 064872c6..80609607 100644
--- a/src/station.c
+++ b/src/station.c
@@ -112,6 +112,7 @@ struct station {
bool ap_directed_roaming : 1;
bool scanning : 1;
bool autoconnect : 1;
+ bool ft_over_ds : 1;
};
struct anqp_entry {
@@ -1625,10 +1626,17 @@ 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 we attempted a reassociation or a fast transition (except DS),
+ * and ended up here then we are now disconnected. In the case of
+ * FT over DS we can remain connected to the AP even if the transition
+ * fails.
*/
if (station->state == STATION_STATE_ROAMING) {
+ if (station->ft_over_ds) {
+ station_enter_state(station, STATION_STATE_CONNECTED);
+ goto delayed_retry;
+ }
+
station_disassociated(station);
return;
}
@@ -1657,6 +1665,7 @@ delayed_retry:
station->preparing_roam = false;
station->roam_scan_full = false;
station->ap_directed_roaming = false;
+ station->ft_over_ds = false;
if (station->signal_low)
station_roam_timeout_rearm(station, roam_retry_interval);
@@ -1708,6 +1717,16 @@ static void station_fast_transition_cb(struct netdev *netdev,
if (station->state != STATION_STATE_ROAMING)
return;
+ /*
+ * Auth failures are handled special here for FT-over-DS since this only
+ * means we cannot roam to that AP. Any other failure cannot be
+ * salvaged. In this case unset the flag so station_roam_failed can
+ * properly clean up.
+ */
+ if (result != NETDEV_RESULT_AUTHENTICATION_FAILED &&
+ station->ft_over_ds)
+ station->ft_over_ds = false;
+
if (result == NETDEV_RESULT_OK)
station_roamed(station);
else
@@ -1839,6 +1858,8 @@ static void station_transition_start(struct station *station,
/* FT-over-DS can be better suited for these situations */
if ((hs->mde[4] & 1) && (station->ap_directed_roaming ||
station->signal_low)) {
+ station->ft_over_ds = true;
+
if (netdev_fast_transition_over_ds(station->netdev, bss,
station_fast_transition_cb) < 0) {
station_roam_failed(station);
--
2.26.2
next prev parent reply other threads:[~2021-04-15 22:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 22:45 [PATCH 1/8] ft: separate ft_sm from ft_process_ies James Prestwood
2021-04-15 22:45 ` [PATCH 2/8] ft: expose ft_build_authenticate_ies James Prestwood
2021-04-16 16:32 ` Denis Kenzior
2021-04-15 22:45 ` [PATCH 3/8] ft: add ft_over_ds_handshake_new James Prestwood
2021-04-15 22:45 ` [PATCH 4/8] ft: add ft_parse_action_response James Prestwood
2021-04-15 22:45 ` [PATCH 5/8] netdev: factor out FT handshake preparation James Prestwood
2021-04-16 16:33 ` Denis Kenzior
2021-04-15 22:45 ` [PATCH 6/8] ft: netdev: refactor FT-over-DS to properly handle Auth failures James Prestwood
2021-04-16 17:37 ` Denis Kenzior
2021-04-15 22:45 ` James Prestwood [this message]
2021-04-15 22:45 ` [PATCH 8/8] ft: netdev: add return value to tx_associate James Prestwood
2021-04-16 16:31 ` [PATCH 1/8] ft: separate ft_sm from ft_process_ies Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210415224508.1823614-7-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox