From: Francesco Dolcini <francesco@dolcini.it>
To: David Lin <yu-hao.lin@nxp.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
briannorris@chromium.org, kvalo@kernel.org, francesco@dolcini.it,
tsung-hsien.hsieh@nxp.com
Subject: Re: [PATCH v8 2/2] wifi: mwifiex: add host mlme for AP mode
Date: Tue, 27 Feb 2024 18:53:26 +0100 [thread overview]
Message-ID: <20240227175326.GC11034@francesco-nb> (raw)
In-Reply-To: <20231222032123.1036277-3-yu-hao.lin@nxp.com>
On Fri, Dec 22, 2023 at 11:21:23AM +0800, David Lin wrote:
> Add host based MLME to enable WPA3 functionalities in AP mode.
> This feature required a firmware with the corresponding V2 Key API
> support. The feature (WPA3) is currently enabled and verified only
> on IW416. Also, verified no regression with change when host MLME
> is disabled.
>
> Signed-off-by: David Lin <yu-hao.lin@nxp.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
with the same disclaimer from patch 1/2, I'm not a wireless driver expert.
> ---
>
> v8:
> - first full and complete patch to support host based MLME for AP
> mode.
>
> ---
> .../net/wireless/marvell/mwifiex/cfg80211.c | 79 +++++++-
> drivers/net/wireless/marvell/mwifiex/cmdevt.c | 2 +
> drivers/net/wireless/marvell/mwifiex/fw.h | 21 +++
> drivers/net/wireless/marvell/mwifiex/ioctl.h | 5 +
> .../wireless/marvell/mwifiex/sta_cmdresp.c | 2 +
> .../net/wireless/marvell/mwifiex/uap_cmd.c | 171 ++++++++++++++++++
> drivers/net/wireless/marvell/mwifiex/util.c | 24 +++
> 7 files changed, 301 insertions(+), 3 deletions(-)
>
...
> diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> index e78a201cd150..1e7f4afe9960 100644
> --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> @@ -760,6 +786,144 @@ static int mwifiex_cmd_uap_sta_deauth(struct mwifiex_private *priv,
> return 0;
> }
>
> +/* This function prepares AP specific add station command.
> + */
> +static int mwifiex_cmd_uap_add_station(struct mwifiex_private *priv,
> + struct host_cmd_ds_command *cmd,
> + u16 cmd_action, void *data_buf)
> +{
> + struct host_cmd_ds_add_station *new_sta = &cmd->params.sta_info;
> + struct mwifiex_sta_info *add_sta = (struct mwifiex_sta_info *)data_buf;
> + struct station_parameters *params = add_sta->params;
> + struct mwifiex_sta_node *sta_ptr;
> + u8 *pos;
> + u8 qos_capa;
> + u16 header_len = sizeof(struct mwifiex_ie_types_header);
> + u16 tlv_len;
> + int size;
> + struct mwifiex_ie_types_data *tlv;
> + struct mwifiex_ie_types_sta_flag *sta_flag;
> + int i;
> +
> + cmd->command = cpu_to_le16(HostCmd_CMD_ADD_NEW_STATION);
> + new_sta->action = cpu_to_le16(cmd_action);
> + size = sizeof(struct host_cmd_ds_add_station) + S_DS_GEN;
> +
> + if (cmd_action == HostCmd_ACT_ADD_STA)
> + sta_ptr = mwifiex_add_sta_entry(priv, add_sta->peer_mac);
> + else
> + sta_ptr = mwifiex_get_sta_entry(priv, add_sta->peer_mac);
> +
> + if (!sta_ptr)
> + return -1;
> +
> + memcpy(new_sta->peer_mac, add_sta->peer_mac, ETH_ALEN);
> +
> + if (cmd_action == HostCmd_ACT_REMOVE_STA)
> + goto done;
This goto here, skipping lot of code, just to do
cmd->size = cpu_to_le16(size);
return 0;
is not really nice for my personal taste, but fine like that.
Francesco
next prev parent reply other threads:[~2024-02-27 17:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-22 3:21 [PATCH v8 0/2] wifi: mwifiex: add code to support host mlme David Lin
2023-12-22 3:21 ` [PATCH v8 1/2] wifi: mwifiex: add host mlme for client mode David Lin
2024-02-27 17:53 ` Francesco Dolcini
2024-02-29 3:52 ` [EXT] " David Lin
2024-03-05 7:25 ` David Lin
2024-05-23 0:51 ` Brian Norris
2023-12-22 3:21 ` [PATCH v8 2/2] wifi: mwifiex: add host mlme for AP mode David Lin
2024-02-27 17:53 ` Francesco Dolcini [this message]
2024-02-29 3:56 ` [EXT] " David Lin
2024-01-18 17:08 ` [PATCH v8 0/2] wifi: mwifiex: add code to support host mlme Rafael Beims
2024-01-22 2:35 ` [EXT] " David Lin
2024-01-30 7:19 ` David Lin
2024-02-07 21:30 ` Rafael Beims
2024-02-08 7:25 ` Francesco Dolcini
2024-02-15 2:07 ` David Lin
2024-02-15 12:11 ` Rafael Beims
2024-02-16 1:40 ` David Lin
2024-02-16 1:48 ` David Lin
2024-02-16 10:10 ` Rafael Beims
2024-02-22 8:01 ` David Lin
2024-02-22 10:04 ` Rafael Beims
2024-02-27 17:52 ` Francesco Dolcini
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=20240227175326.GC11034@francesco-nb \
--to=francesco@dolcini.it \
--cc=briannorris@chromium.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=tsung-hsien.hsieh@nxp.com \
--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