The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-wireless@vger.kernel.org,  linux-kernel@vger.kernel.org,
	 Brian Norris <briannorris@chromium.org>,
	 Francesco Dolcini <francesco@dolcini.it>,
	 David Lin <yu-hao.lin@nxp.com>
Subject: Re: [PATCH] wifi: mwifiex: fix parsing of more than two AKM suites
Date: Sat, 25 May 2024 12:15:22 +0300	[thread overview]
Message-ID: <878qzyntg5.fsf@kernel.org> (raw)
In-Reply-To: <20240523081428.2852276-1-s.hauer@pengutronix.de> (Sascha Hauer's message of "Thu, 23 May 2024 10:14:28 +0200")

Sascha Hauer <s.hauer@pengutronix.de> writes:

> params->crypto.n_akm_suites seems to be limited to two AKM suites. Once
> there are more they will be passed as extra elements of type WLAN_EID_RSN
> or WLAN_EID_VENDOR_SPECIFIC.
>
> This takes some snippets from the downstream vendor driver to parse
> these elements and to set the correct protocol and key_mgmt bits to
> enable the desired key managements algorithms in the hardware.
>
> This patch is not a request for inclusion, more a heads up that there's
> something missing and the question if the approach taken is the right
> one or if there are other preferred ways to fix this issue.

Please mark patches like this as "[PATCH RFC]", that way we maintainers
know to drop them automatically.

> --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> @@ -9,6 +9,112 @@
>  #include "11ac.h"
>  #include "11n.h"
>  
> +struct wpa_suite_ucast {
> +        /* count */
> +        u16 count;
> +        /** wpa_suite list */
> +	__be32 suite[1];
> +} __packed;

The comments here are not adding any extra information, please remove.

In general having a some kind of prefix in the struct name would be
nice. I don't know what mwifiex uses (if any) but, for example, in
ath12k we use 'ath12k_'.

> +struct IEEEtypes_Rsn_t {

Lower case, no '_t' and also improve the naming.

> +        /** Rsn : version */
> +        u16 version;
> +        /** Rsn : group cipher */
> +        __be32 group_cipher;
> +        /** Rsn : pairwise cipher */
> +        struct wpa_suite_ucast pairwise_cipher;
> +} __packed;

Useless comments.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  parent reply	other threads:[~2024-05-25  9:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-23  8:14 [PATCH] wifi: mwifiex: fix parsing of more than two AKM suites Sascha Hauer
2024-05-24 22:17 ` kernel test robot
2024-05-25  9:15 ` Kalle Valo [this message]
2024-05-30 12:01   ` Sascha Hauer

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=878qzyntg5.fsf@kernel.org \
    --to=kvalo@kernel.org \
    --cc=briannorris@chromium.org \
    --cc=francesco@dolcini.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=yu-hao.lin@nxp.com \
    /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