public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 2/2] station: check if authentication is supported via CMD_FRAME
Date: Fri, 11 Oct 2024 07:55:03 -0700	[thread overview]
Message-ID: <20241011145503.51330-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20241011145503.51330-1-prestwoj@gmail.com>

If the driver does not support this don't allow FT-over-Air as
CMD_FRAME will fail. This will downgrade the roam to reassociation.
In the future IWD could instead use CMD_AUTHENTICATE, but thats a
larger change. This will at least get these drivers functioning
better.
---
 src/station.c | 31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)

diff --git a/src/station.c b/src/station.c
index 9ebed8e2..b7905c4f 100644
--- a/src/station.c
+++ b/src/station.c
@@ -2162,14 +2162,29 @@ static bool station_can_fast_transition(struct station *station,
 			return false;
 	}
 
-	/*
-	 * FT-over-Air in its current form relies on CMD_REMAIN_ON_CHANNEL. Some
-	 * drivers do not support this so only allow over-DS if this is the case
-	 */
-	if (!(hs->mde[4] & 1) &&
-			!wiphy_supports_cmd_offchannel(station->wiphy)) {
-		l_debug("FT-over-Air needs offchannel, using reassociation");
-		return false;
+	if (!(hs->mde[4] & 1)) {
+		/*
+		 * FT-over-Air in its current form relies on
+		 * CMD_REMAIN_ON_CHANNEL. Some drivers do not support this so
+		 * only allow over-DS if this is the case
+		 */
+		if (!wiphy_supports_cmd_offchannel(station->wiphy)) {
+			l_debug("FT-over-Air needs offchannel, using "
+				"reassociation");
+			return false;
+		}
+
+		/*
+		 * TODO: if drivers don't support TX/RX of auth frames via
+		 *       CMD_FRAME IWD could choose to use CMD_AUTHENTICATE
+		 *       instead. For now just avoid FT roaming and let these
+		 *       drivers roam via reassociation.
+		 */
+		if (!wiphy_supports_auth_frame(station->wiphy)) {
+			l_debug("FT-over-Air needs CMD_FRAME auth, using "
+				"reassociation");
+			return false;
+		}
 	}
 
 	return true;
-- 
2.34.1


  reply	other threads:[~2024-10-11 14:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-11 14:55 [PATCH 1/2] wiphy: parse TX/RX frame types, and API to check auth frame support James Prestwood
2024-10-11 14:55 ` James Prestwood [this message]
2024-10-21 17:55 ` James Prestwood

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=20241011145503.51330-2-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@lists.linux.dev \
    /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