All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 01/11] station: factor out logic for choosing FT
@ 2021-05-12 23:01 James Prestwood
  2021-05-12 23:01 ` [PATCH v3 02/11] station: remove ap_directed_roam check for over-DS James Prestwood
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: James Prestwood @ 2021-05-12 23:01 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] 12+ messages in thread

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 23:01 [PATCH v3 01/11] station: factor out logic for choosing FT James Prestwood
2021-05-12 23:01 ` [PATCH v3 02/11] station: remove ap_directed_roam check for over-DS James Prestwood
2021-05-12 23:01 ` [PATCH v3 03/11] ft: break up FT action parsing into two steps James Prestwood
2021-05-12 23:01 ` [PATCH v3 04/11] netdev: handle multiple concurrent FT-over-DS action frames James Prestwood
2021-05-12 23:01 ` [PATCH v3 05/11] network: add network_bss_list_get_entries James Prestwood
2021-05-12 23:01 ` [PATCH v3 06/11] station: send FT-over-DS actions upon connection James Prestwood
2021-05-12 23:01 ` [PATCH v3 07/11] netdev: remove callback/userdata/timeout from FT-over-DS action James Prestwood
2021-05-12 23:01 ` [PATCH v3 08/11] auto-t: update FT-over-DS test for new behavior James Prestwood
2021-05-12 23:01 ` [PATCH v3 09/11] ie: use bitwise compare for IE_AKM_IS_FT James Prestwood
2021-05-12 23:01 ` [PATCH v3 10/11] station: make station_can_fast_transition more robust James Prestwood
2021-05-12 23:01 ` [PATCH v3 11/11] station: use IE_AKM_IS_FT when possible James Prestwood
2021-05-12 23:07 ` [PATCH v3 01/11] station: factor out logic for choosing FT Denis Kenzior

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.