All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] station: factor out logic for choosing FT
@ 2021-05-12 19:21 James Prestwood
  2021-05-12 19:21 ` [PATCH 2/7] station: remove ap_directed_roam check for over-DS James Prestwood
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: James Prestwood @ 2021-05-12 19:21 UTC (permalink / raw)
  To: iwd

[-- Attachment #1: Type: text/plain, Size: 1778 bytes --]

---
 src/station.c | 25 +++++++++++++++++++------
 1 file changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/station.c b/src/station.c
index 479f81f5..bdb8859a 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1823,13 +1823,30 @@ static void station_preauthenticate_cb(struct netdev *netdev,
 	station_transition_reassociate(station, bss, new_hs);
 }
 
+static bool station_can_fast_transition(struct handshake_state *hs,
+					struct scan_bss *bss)
+{
+	uint16_t mdid;
+
+	if (!hs->mde)
+		return false;
+
+	if (ie_parse_mobility_domain_from_data(hs->mde, hs->mde[1] + 2,
+						&mdid, NULL, NULL) < 0)
+		return false;
+
+	if (bss->mde_present && l_get_le16(bss->mde) == mdid)
+		return true;
+
+	return false;
+}
+
 static void station_transition_start(struct station *station,
 							struct scan_bss *bss)
 {
 	struct handshake_state *hs = netdev_get_handshake(station->netdev);
 	struct network *connected = station->connected_network;
 	enum security security = network_get_security(connected);
-	uint16_t mdid;
 	struct handshake_state *new_hs;
 	struct ie_rsn_info cur_rsne, target_rsne;
 
@@ -1839,12 +1856,8 @@ static void station_transition_start(struct station *station,
 	/* Reset AP roam flag, at this point the roaming behaves the same */
 	station->ap_directed_roaming = false;
 
-	if (hs->mde)
-		ie_parse_mobility_domain_from_data(hs->mde, hs->mde[1] + 2,
-							&mdid, NULL, NULL);
-
 	/* Can we use Fast Transition? */
-	if (hs->mde && bss->mde_present && l_get_le16(bss->mde) == mdid) {
+	if (station_can_fast_transition(hs, bss)) {
 		/* Rebuild handshake RSN for target AP */
 		if (station_build_handshake_rsn(hs, station->wiphy,
 				station->connected_network, bss) < 0) {
-- 
2.31.1

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-12 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-12 19:21 [PATCH 1/7] station: factor out logic for choosing FT James Prestwood
2021-05-12 19:21 ` [PATCH 2/7] station: remove ap_directed_roam check for over-DS James Prestwood
2021-05-12 19:21 ` [PATCH 3/7] ft: break up FT action parsing into two steps James Prestwood
2021-05-12 19:21 ` [PATCH 4/7] netdev: handle multiple concurrent FT-over-DS action frames James Prestwood
2021-05-12 19:21 ` [PATCH 5/7] station: send FT-over-DS actions upon connection James Prestwood
2021-05-12 19:21 ` [PATCH 6/7] netdev: remove callback/userdata/timeout from FT-over-DS action James Prestwood
2021-05-12 19:21 ` [PATCH 7/7] auto-t: update FT-over-DS test for new behavior James Prestwood

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.