From: Francesco Dolcini <francesco@dolcini.it>
To: Jeff Chen <jeff.chen_1@nxp.com>
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
briannorris@chromium.org, johannes@sipsolutions.net,
francesco@dolcini.it, tsung-hsien.hsieh@nxp.com,
s.hauer@pengutronix.de
Subject: Re: [PATCH v3 1/2] wifi: mwifiex: Part A of resolving the failure in downloading calibration data.
Date: Thu, 6 Mar 2025 11:43:46 +0100 [thread overview]
Message-ID: <20250306104346.GC19853@francesco-nb> (raw)
In-Reply-To: <20250220061143.1417420-2-jeff.chen_1@nxp.com>
Hello Jeff,
On Thu, Feb 20, 2025 at 02:11:42PM +0800, Jeff Chen wrote:
> This patch corrects the command format used for downloading RF
> calibration data to the firmware.
Do we need any fixes tag? is this supposed to be backported to stable?
Was the command format always broken? Do this format depends on the
firmware version? We would need to explain why changing the format of
this command here is safe.
>
> This patch is a split from the previous submission.
>
> Signed-off-by: Jeff Chen <jeff.chen_1@nxp.com>
> ---
> drivers/net/wireless/marvell/mwifiex/fw.h | 7 +++++++
> drivers/net/wireless/marvell/mwifiex/sta_cmd.c | 14 +++++++++-----
> 2 files changed, 16 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/fw.h b/drivers/net/wireless/marvell/mwifiex/fw.h
> index 4a96281792cc..0c75a574a7ee 100644
> --- a/drivers/net/wireless/marvell/mwifiex/fw.h
> +++ b/drivers/net/wireless/marvell/mwifiex/fw.h
> @@ -2352,6 +2352,12 @@ struct host_cmd_ds_add_station {
> u8 tlv[];
> } __packed;
>
> +struct host_cmd_ds_802_11_cfg_data {
> + __le16 action;
> + __le16 type;
> + __le16 data_len;
> +} __packed;
> +
> struct host_cmd_ds_command {
> __le16 command;
> __le16 size;
> @@ -2431,6 +2437,7 @@ struct host_cmd_ds_command {
> struct host_cmd_ds_pkt_aggr_ctrl pkt_aggr_ctrl;
> struct host_cmd_ds_sta_configure sta_cfg;
> struct host_cmd_ds_add_station sta_info;
> + struct host_cmd_ds_802_11_cfg_data cfg_data;
> } params;
> } __packed;
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> index e2800a831c8e..6e7b2b5c7dc5 100644
> --- a/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmd.c
> @@ -1500,18 +1500,19 @@ int mwifiex_dnld_dt_cfgdata(struct mwifiex_private *priv,
>
> /* This function prepares command of set_cfg_data. */
> static int mwifiex_cmd_cfg_data(struct mwifiex_private *priv,
> - struct host_cmd_ds_command *cmd, void *data_buf)
> + struct host_cmd_ds_command *cmd, void *data_buf, u16 cmd_action)
> {
> struct mwifiex_adapter *adapter = priv->adapter;
> struct property *prop = data_buf;
> u32 len;
> u8 *data = (u8 *)cmd + S_DS_GEN;
> int ret;
> + struct host_cmd_ds_802_11_cfg_data *pcfg_data = &cmd->params.cfg_data;
>
> if (prop) {
> len = prop->length;
> ret = of_property_read_u8_array(adapter->dt_node, prop->name,
> - data, len);
> + data + sizeof(*pcfg_data), len);
> if (ret)
> return ret;
> mwifiex_dbg(adapter, INFO,
> @@ -1519,15 +1520,18 @@ static int mwifiex_cmd_cfg_data(struct mwifiex_private *priv,
> prop->name);
> } else if (adapter->cal_data->data && adapter->cal_data->size > 0) {
> len = mwifiex_parse_cal_cfg((u8 *)adapter->cal_data->data,
> - adapter->cal_data->size, data);
> + adapter->cal_data->size, data + sizeof(*pcfg_data));
> mwifiex_dbg(adapter, INFO,
> "download cfg_data from config file\n");
> } else {
> return -1;
> }
>
> + pcfg_data->action = cpu_to_le16(cmd_action);
> + pcfg_data->type = cpu_to_le16(2);
> + pcfg_data->data_len = cpu_to_le16(len);
> cmd->command = cpu_to_le16(HostCmd_CMD_CFG_DATA);
> - cmd->size = cpu_to_le16(S_DS_GEN + len);
> + cmd->size = cpu_to_le16(S_DS_GEN + sizeof(*pcfg_data) + len);
>
> return 0;
> }
> @@ -1949,7 +1953,7 @@ int mwifiex_sta_prepare_cmd(struct mwifiex_private *priv, uint16_t cmd_no,
> ret = mwifiex_cmd_get_hw_spec(priv, cmd_ptr);
> break;
> case HostCmd_CMD_CFG_DATA:
> - ret = mwifiex_cmd_cfg_data(priv, cmd_ptr, data_buf);
> + ret = mwifiex_cmd_cfg_data(priv, cmd_ptr, data_buf, cmd_action);
> break;
> case HostCmd_CMD_MAC_CONTROL:
> ret = mwifiex_cmd_mac_control(priv, cmd_ptr, cmd_action,
> --
> 2.34.1
>
next prev parent reply other threads:[~2025-03-06 10:43 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-05 1:28 [PATCH v2 1/2] wifi: mwifiex: Resolve the failure in downloading calibration data Jeff Chen
2025-02-05 1:28 ` [PATCH v2 2/2] wifi: mwifiex: Fix HT40 bandwidth issue Jeff Chen
2025-03-06 10:37 ` Francesco Dolcini
2025-03-14 3:06 ` [EXT] " Jeff Chen
2025-02-11 13:31 ` [PATCH v2 1/2] wifi: mwifiex: Resolve the failure in downloading calibration data Johannes Berg
2025-02-20 6:11 ` [PATCH v3 0/2] Resolve the failure in downloading Jeff Chen
2025-02-20 6:11 ` [PATCH v3 1/2] wifi: mwifiex: Part A of resolving the failure in downloading calibration data Jeff Chen
2025-03-06 10:43 ` Francesco Dolcini [this message]
2025-03-07 16:40 ` [EXT] " Jeff Chen
2025-03-18 5:07 ` [PATCH v4 0/2] wifi: mwifiex: Fix RF calibration data handling issues Jeff Chen
2025-03-18 5:07 ` [PATCH v4 1/2] wifi: mwifiex: Fix premature release of RF calibration data Jeff Chen
2025-03-19 16:28 ` Francesco Dolcini
2025-03-25 16:43 ` [EXT] " Jeff Chen
2025-03-25 16:45 ` Johannes Berg
2025-03-25 22:55 ` Brian Norris
2025-03-26 12:18 ` Francesco Dolcini
2025-03-26 15:23 ` Brian Norris
2025-03-27 17:26 ` Jeff Chen
2025-03-18 5:07 ` [PATCH v4 2/2] wifi: mwifiex: Fix RF calibration data download from file Jeff Chen
2025-03-19 16:31 ` Francesco Dolcini
2025-03-24 16:47 ` [EXT] " Jeff Chen
2025-03-24 7:02 ` Sascha Hauer
2025-03-24 16:57 ` [EXT] " Jeff Chen
2025-02-20 6:11 ` [PATCH v3 2/2] wifi: mwifiex: Part B of resolving the failure in downloading calibration data Jeff Chen
2025-02-20 8:21 ` [PATCH v3 0/2] Resolve the failure in downloading Johannes Berg
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=20250306104346.GC19853@francesco-nb \
--to=francesco@dolcini.it \
--cc=briannorris@chromium.org \
--cc=jeff.chen_1@nxp.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tsung-hsien.hsieh@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