From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 3/7] netdev: reuse NETDEV_EVENT_{AUTHENTICATING,ASSOCIATING}
Date: Tue, 25 Jun 2024 06:06:20 -0700 [thread overview]
Message-ID: <20240625130624.385553-3-prestwoj@gmail.com> (raw)
In-Reply-To: <20240625130624.385553-1-prestwoj@gmail.com>
The authenticating event was not used anymore and the associating
event use was questionable (after the CMD_CONNECT callback).
No other modules actually utilize these events but they are useful
for autotests. Move these events around to map 1:1 when the kernel
sends the auth/assoc events.
---
src/netdev.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/netdev.c b/src/netdev.c
index bada1ab5..153001ab 100644
--- a/src/netdev.c
+++ b/src/netdev.c
@@ -2422,10 +2422,6 @@ static void netdev_driver_connected(struct netdev *netdev)
{
netdev->connected = true;
- if (netdev->event_filter)
- netdev->event_filter(netdev, NETDEV_EVENT_ASSOCIATING, NULL,
- netdev->user_data);
-
/*
* We register the eapol state machine here, in case the PAE
* socket receives EAPoL packets before the nl80211 socket
@@ -2919,6 +2915,10 @@ static void netdev_authenticate_event(struct l_genl_msg *msg,
return;
}
+ if (netdev->event_filter)
+ netdev->event_filter(netdev, NETDEV_EVENT_AUTHENTICATING,
+ NULL, netdev->user_data);
+
/*
* During Fast Transition we use the authenticate event to start the
* reassociation step because the FTE necessary before we can build
@@ -3040,6 +3040,10 @@ static void netdev_associate_event(struct l_genl_msg *msg,
if (!netdev->connected || netdev->aborting)
return;
+ if (netdev->event_filter)
+ netdev->event_filter(netdev, NETDEV_EVENT_ASSOCIATING,
+ NULL, netdev->user_data);
+
if (!netdev->ap && !netdev->in_ft) {
netdev->associated = true;
netdev->in_reassoc = false;
--
2.34.1
next prev parent reply other threads:[~2024-06-25 13:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-25 13:06 [PATCH 1/7] netdev: use nl80211_parse_attrs for deauth event James Prestwood
2024-06-25 13:06 ` [PATCH 2/7] nl80211util: use nl80211_parse_attrs/nested for get_key_seq James Prestwood
2024-06-25 13:06 ` James Prestwood [this message]
2024-06-26 14:43 ` [PATCH 3/7] netdev: reuse NETDEV_EVENT_{AUTHENTICATING,ASSOCIATING} Denis Kenzior
2024-06-25 13:06 ` [PATCH 4/7] station: add auth/assoc debug events James Prestwood
2024-06-25 13:06 ` [PATCH 5/7] auto-t: add test for deauth after authentication James Prestwood
2024-06-25 13:06 ` [PATCH 6/7] station: add debug event prior to sending an FT-auth frame James Prestwood
2024-06-25 13:06 ` [PATCH 7/7] auto-t: add test for a deauth coming in during an FT-roam 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=20240625130624.385553-3-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