All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH v2 2/4] ie: add ie_akm_suite_to_string
Date: Thu, 25 Mar 2021 10:47:48 -0500	[thread overview]
Message-ID: <683a4052-1db6-447b-4d36-ed928a86e66e@gmail.com> (raw)
In-Reply-To: <20210324230538.583325-2-prestwoj@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1710 bytes --]

Hi James,

On 3/24/21 6:05 PM, James Prestwood wrote:
> Converts ie_rsn_akm_suite values into strings
> ---
>   src/ie.c | 33 +++++++++++++++++++++++++++++++++
>   src/ie.h |  2 ++
>   2 files changed, 35 insertions(+)
> 
> diff --git a/src/ie.c b/src/ie.c
> index 46f7496e..80c6e5e4 100644
> --- a/src/ie.c
> +++ b/src/ie.c
> @@ -2636,3 +2636,36 @@ int ie_build_hs20_indication(uint8_t version, uint8_t *to)
>   
>   	return 0;
>   }
> +
> +const char *ie_akm_suite_to_string(enum ie_rsn_akm_suite akm)
> +{
> +	switch (akm) {
> +	case IE_RSN_AKM_SUITE_8021X:

How are you distinguishing between WPA1 and WPA2?

> +	case IE_RSN_AKM_SUITE_8021X_SHA256:
> +		return "WPA2-Enterprise";
> +	case IE_RSN_AKM_SUITE_PSK:
> +	case IE_RSN_AKM_SUITE_PSK_SHA256:
> +		return "WPA2-Personal";
> +	case IE_RSN_AKM_SUITE_FT_OVER_8021X:
> +	case IE_RSN_AKM_SUITE_FT_OVER_8021X_SHA384:
> +		return "WPA2-Enterprise + FT";
> +	case IE_RSN_AKM_SUITE_FT_USING_PSK:
> +		return "WPA2-Personal + FT";
> +	case IE_RSN_AKM_SUITE_SAE_SHA256:
> +		return "WPA3-Personal";
> +	case IE_RSN_AKM_SUITE_FT_OVER_SAE_SHA256:
> +		return "WPA3-Personal + FT";
> +	case IE_RSN_AKM_SUITE_OWE:
> +		return "OWE";
> +	case IE_RSN_AKM_SUITE_FILS_SHA256:
> +	case IE_RSN_AKM_SUITE_FILS_SHA384:
> +		return "FILS";
> +	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA256:
> +	case IE_RSN_AKM_SUITE_FT_OVER_FILS_SHA384:
> +		return "FILS + FT";
> +	case IE_RSN_AKM_SUITE_OSEN:
> +		return "OSEN";
> +	default:
> +		return NULL;
> +	}
> +}

Also, for reasons mentioned in patch 1, I'd rather keep this specific to the 
diagnostics interface.  So this probably belongs in diagnostics.c ?

Regards,
-Denis

  reply	other threads:[~2021-03-25 15:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 23:05 [PATCH v2 1/4] doc: document AKMSuite diagnostic value James Prestwood
2021-03-24 23:05 ` [PATCH v2 2/4] ie: add ie_akm_suite_to_string James Prestwood
2021-03-25 15:47   ` Denis Kenzior [this message]
2021-03-24 23:05 ` [PATCH v2 3/4] station: add AKMSuite to GetDiagnostics James Prestwood
2021-03-24 23:05 ` [PATCH v2 4/4] client: add AKMSuite to diagnostics James Prestwood
2021-03-25 15:45 ` [PATCH v2 1/4] doc: document AKMSuite diagnostic value 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=683a4052-1db6-447b-4d36-ed928a86e66e@gmail.com \
    --to=denkenz@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 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.