From: James Prestwood <prestwoj@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, iwd@lists.linux.dev
Subject: Re: [PATCH 7/7] netdev: Simplify FILS handling in netdev_connect_common
Date: Mon, 5 Aug 2024 07:21:01 -0700 [thread overview]
Message-ID: <4bb34106-49e9-45f1-a3d2-cab6329f2029@gmail.com> (raw)
In-Reply-To: <20240805140721.57518-7-denkenz@gmail.com>
Hi Denis,
On 8/5/24 7:07 AM, Denis Kenzior wrote:
> ---
> src/netdev.c | 18 +++++++++---------
> 1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/src/netdev.c b/src/netdev.c
> index fb095fdca561..494e46a59de2 100644
> --- a/src/netdev.c
> +++ b/src/netdev.c
> @@ -3833,6 +3833,14 @@ static void netdev_connect_common(struct netdev *netdev,
> goto build_cmd_connect;
> }
>
> + if (IE_AKM_IS_FILS(hs->akm_suite)) {
> + netdev->ap = fils_sm_new(hs, netdev_fils_tx_authenticate,
> + netdev_fils_tx_associate,
> + netdev_get_oci,
> + netdev);
> + goto done;
> + }
> +
> if (nhs->type != CONNECTION_TYPE_SOFTMAC)
> goto build_cmd_connect;
>
> @@ -3855,15 +3863,6 @@ static void netdev_connect_common(struct netdev *netdev,
> }
>
> break;
> - case IE_RSN_AKM_SUITE_FILS_SHA256:
> - case IE_RSN_AKM_SUITE_FILS_SHA384:
> - case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
> - case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
> - netdev->ap = fils_sm_new(hs, netdev_fils_tx_authenticate,
> - netdev_fils_tx_associate,
> - netdev_get_oci,
> - netdev);
> - break;
> default:
> build_cmd_connect:
> cmd_connect = netdev_build_cmd_connect(netdev, hs, prev_bssid);
> @@ -3876,6 +3875,7 @@ build_cmd_connect:
> }
> }
>
> +done:
> netdev->connect_cmd = cmd_connect;
> netdev->event_filter = event_filter;
> netdev->connect_cb = cb;
Mostly just an observation, but the switch block is pretty much just
checks for SAE now, and the default build_cmd_connect case. It may look
nicer to just have if/else if's for:
IE_AKM_IS_FILS()
IE_AKM_IS_OWE()
IE_AKM_IS_SAE()
But I'm also fine leaving it how you have it.
next prev parent reply other threads:[~2024-08-05 14:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 14:07 [PATCH 1/7] monitor: Decode RMNet Mux Identifier Denis Kenzior
2024-08-05 14:07 ` [PATCH 2/7] monitor: Mask flags from attribute identifier Denis Kenzior
2024-08-05 14:07 ` [PATCH 3/7] wiphy: Fix use of wiphy_has_feature Denis Kenzior
2024-08-05 14:07 ` [PATCH 4/7] ie: Add IE_AKM_IS_OWE Denis Kenzior
2024-08-05 14:07 ` [PATCH 5/7] netdev: Create owe_sm for fullmac connections Denis Kenzior
2024-08-05 14:07 ` [PATCH 6/7] fils: Ensure capability checks are consistent Denis Kenzior
2024-08-05 14:07 ` [PATCH 7/7] netdev: Simplify FILS handling in netdev_connect_common Denis Kenzior
2024-08-05 14:21 ` James Prestwood [this message]
2024-08-05 14:34 ` Denis Kenzior
2024-08-05 14:21 ` [PATCH 1/7] monitor: Decode RMNet Mux Identifier James Prestwood
2024-08-06 14:33 ` 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=4bb34106-49e9-45f1-a3d2-cab6329f2029@gmail.com \
--to=prestwoj@gmail.com \
--cc=denkenz@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