From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v2 2/6] ft: separate over-air from over-ds initializers
Date: Thu, 29 Apr 2021 12:40:59 -0700 [thread overview]
Message-ID: <20210429194103.207447-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20210429194103.207447-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1880 bytes --]
---
src/ft.c | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/ft.c b/src/ft.c
index 82c790de..ea6eba69 100644
--- a/src/ft.c
+++ b/src/ft.c
@@ -923,10 +923,9 @@ static bool ft_start(struct auth_proto *ap)
return true;
}
-static struct auth_proto *ft_sm_new(struct handshake_state *hs,
+struct auth_proto *ft_over_air_sm_new(struct handshake_state *hs,
ft_tx_authenticate_func_t tx_auth,
ft_tx_associate_func_t tx_assoc,
- bool over_air,
void *user_data)
{
struct ft_sm *ft = l_new(struct ft_sm, 1);
@@ -936,7 +935,7 @@ static struct auth_proto *ft_sm_new(struct handshake_state *hs,
ft->hs = hs;
ft->user_data = user_data;
- ft->ap.rx_authenticate = (over_air) ? ft_rx_authenticate : ft_rx_action;
+ ft->ap.rx_authenticate = ft_rx_authenticate;
ft->ap.rx_associate = ft_rx_associate;
ft->ap.start = ft_start;
ft->ap.free = ft_sm_free;
@@ -944,18 +943,22 @@ static struct auth_proto *ft_sm_new(struct handshake_state *hs,
return &ft->ap;
}
-struct auth_proto *ft_over_air_sm_new(struct handshake_state *hs,
- ft_tx_authenticate_func_t tx_auth,
- ft_tx_associate_func_t tx_assoc,
- void *user_data)
-{
- return ft_sm_new(hs, tx_auth, tx_assoc, true, user_data);
-}
-
struct auth_proto *ft_over_ds_sm_new(struct handshake_state *hs,
ft_tx_authenticate_func_t tx_auth,
ft_tx_associate_func_t tx_assoc,
void *user_data)
{
- return ft_sm_new(hs, tx_auth, tx_assoc, false, user_data);
+ struct ft_sm *ft = l_new(struct ft_sm, 1);
+
+ ft->tx_assoc = tx_assoc;
+ ft->tx_auth = tx_auth;
+ ft->hs = hs;
+ ft->user_data = user_data;
+
+ ft->ap.rx_authenticate = ft_rx_action;
+ ft->ap.rx_associate = ft_rx_associate;
+ ft->ap.start = ft_start;
+ ft->ap.free = ft_sm_free;
+
+ return &ft->ap;
}
--
2.26.2
next prev parent reply other threads:[~2021-04-29 19:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-29 19:40 [PATCH v2 1/6] ft: create class for FT-over-DS targets James Prestwood
2021-04-29 19:40 ` James Prestwood [this message]
2021-04-29 19:41 ` [PATCH v2 3/6] netdev: separate over-air and over-ds netdev APIs James Prestwood
2021-04-29 19:41 ` [PATCH v2 4/6] ft: netdev: refactor FT-over-DS into two stages James Prestwood
2021-04-29 20:33 ` Denis Kenzior
2021-04-29 19:41 ` [PATCH v2 5/6] station: separate FT-over-DS stages James Prestwood
2021-04-29 19:41 ` [PATCH v2 6/6] ft: netdev: add return value to tx_associate James Prestwood
2021-04-29 20:23 ` [PATCH v2 1/6] ft: create class for FT-over-DS targets 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=20210429194103.207447-2-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