From: Brian Norris <briannorris@chromium.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Francesco Dolcini <francesco@dolcini.it>,
Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@pengutronix.de
Subject: Re: [PATCH 03/31] wifi: mwifiex: drop HostCmd_CMD_802_11_MAC_ADDRESS response handling
Date: Thu, 22 Aug 2024 11:07:35 -0700 [thread overview]
Message-ID: <Zsd-ZxscUBmf0xsu@google.com> (raw)
In-Reply-To: <20240820-mwifiex-cleanup-v1-3-320d8de4a4b7@pengutronix.de>
Hi Sascha,
On Tue, Aug 20, 2024 at 01:55:28PM +0200, Sascha Hauer wrote:
> The command response handler copies the new MAC address over to
> priv->curr_addr. The same is done in the code issuing the call
> already, so drop the unnecessary HostCmd_CMD_802_11_MAC_ADDRESS
> handling.
It took a bit to figure out what you meant here -- I guess you're
referring to mwifiex_set_mac_address()? It could help to document what
you mean.
I'm also a bit torn; this command API ostensibly has a (unused so far,
for this command) HostCmd_ACT_GEN_GET mode, in which case this *is*
important.
If anything, I might consider dropping some of the handling in
mwifiex_set_mac_address(), because it seems to presume (and then has to
undo for failure) behavior of the underlying command.
Brian
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c | 20 --------------------
> 1 file changed, 20 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
> index 9c53825f222d1..7f81e709bd6b7 100644
> --- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
> +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
> @@ -473,25 +473,6 @@ static int mwifiex_ret_rf_antenna(struct mwifiex_private *priv,
> return 0;
> }
>
> -/*
> - * This function handles the command response of set/get MAC address.
> - *
> - * Handling includes saving the MAC address in driver.
> - */
> -static int mwifiex_ret_802_11_mac_address(struct mwifiex_private *priv,
> - struct host_cmd_ds_command *resp)
> -{
> - struct host_cmd_ds_802_11_mac_address *cmd_mac_addr =
> - &resp->params.mac_addr;
> -
> - memcpy(priv->curr_addr, cmd_mac_addr->mac_addr, ETH_ALEN);
> -
> - mwifiex_dbg(priv->adapter, INFO,
> - "info: set mac address: %pM\n", priv->curr_addr);
> -
> - return 0;
> -}
> -
> /*
> * This function handles the command response of set/get MAC multicast
> * address.
> @@ -1232,7 +1213,6 @@ int mwifiex_process_sta_cmdresp(struct mwifiex_private *priv, u16 cmdresp_no,
> case HostCmd_CMD_MAC_CONTROL:
> break;
> case HostCmd_CMD_802_11_MAC_ADDRESS:
> - ret = mwifiex_ret_802_11_mac_address(priv, resp);
> break;
> case HostCmd_CMD_MAC_MULTICAST_ADR:
> ret = mwifiex_ret_mac_multicast_adr(priv, resp);
>
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-08-22 18:07 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 11:55 [PATCH 00/31] wifi: mwifiex: cleanup driver Sascha Hauer
2024-08-20 11:55 ` [PATCH 01/31] wifi: mwifiex: remove unnecessary checks for valid priv Sascha Hauer
2024-08-22 17:58 ` Brian Norris
2024-08-20 11:55 ` [PATCH 02/31] wifi: mwifiex: use adapter as context pointer for mwifiex_hs_activated_event() Sascha Hauer
2024-08-20 11:55 ` [PATCH 03/31] wifi: mwifiex: drop HostCmd_CMD_802_11_MAC_ADDRESS response handling Sascha Hauer
2024-08-22 18:07 ` Brian Norris [this message]
2024-08-26 9:07 ` Sascha Hauer
2024-08-26 22:44 ` Brian Norris
2024-08-20 11:55 ` [PATCH 04/31] wifi: mwifiex: drop unnecessary initialization Sascha Hauer
2024-08-20 11:55 ` [PATCH 05/31] wifi: mwifiex: make region_code_mapping_t const Sascha Hauer
2024-08-20 11:55 ` [PATCH 06/31] wifi: mwifiex: use mwifiex_deauthenticate_all() Sascha Hauer
2024-08-20 11:55 ` [PATCH 07/31] wifi: mwifiex: pass adapter to mwifiex_dnld_cmd_to_fw() Sascha Hauer
2024-08-20 11:55 ` [PATCH 08/31] wifi: mwifiex: simplify mwifiex_setup_ht_caps() Sascha Hauer
2024-08-20 11:55 ` [PATCH 09/31] wifi: mwifiex: deduplicate code in mwifiex_cmd_tx_rate_cfg() Sascha Hauer
2024-08-20 11:55 ` [PATCH 10/31] wifi: mwifiex: fix indention Sascha Hauer
2024-08-22 9:36 ` [EXT] " David Lin
2024-08-22 9:53 ` Marc Kleine-Budde
2024-08-22 10:44 ` Marc Kleine-Budde
2024-08-22 11:59 ` David Lin
2024-08-22 12:05 ` Marc Kleine-Budde
2024-08-22 12:11 ` David Lin
2024-08-22 12:20 ` Marc Kleine-Budde
2024-08-26 9:37 ` Sascha Hauer
2024-08-26 9:48 ` David Lin
2024-08-26 10:17 ` Sascha Hauer
2024-08-20 11:55 ` [PATCH 11/31] wifi: mwifiex: use priv index as bss_num Sascha Hauer
2024-08-22 5:48 ` Sascha Hauer
2024-08-22 23:38 ` kernel test robot
2024-08-20 11:55 ` [PATCH 12/31] wifi: mwifiex: fix MAC address handling Sascha Hauer
2024-08-20 11:55 ` [PATCH 13/31] wifi: mwifiex: drop driver internal AP/STA limit counting Sascha Hauer
2024-08-20 11:55 ` [PATCH 14/31] wifi: mwifiex: iterate over privs in mwifiex_process_assoc_resp() Sascha Hauer
2024-08-20 11:55 ` [PATCH 15/31] wifi: mwifiex: add missing locking Sascha Hauer
2024-08-20 11:55 ` [PATCH 16/31] wifi: mwifiex: make locally used function static Sascha Hauer
2024-08-20 11:55 ` [PATCH 17/31] wifi: mwifiex: fix multiple station handling Sascha Hauer
2024-08-20 11:55 ` [PATCH 18/31] wifi: mwifiex: make mwifiex_enable_hs() safe for multiple station mode Sascha Hauer
2024-08-20 11:55 ` [PATCH 19/31] wifi: mwifiex: add function to send command specific to the adapter Sascha Hauer
2024-08-20 11:55 ` [PATCH 20/31] wifi: mwifiex: pass adapter to host sleep functions Sascha Hauer
2024-08-20 11:55 ` [PATCH 21/31] wifi: mwifiex: associate tx_power to the adapter Sascha Hauer
2024-08-20 11:55 ` [PATCH 22/31] wifi: mwifiex: pass adapter to mwifiex_init_shutdown_fw() Sascha Hauer
2024-08-20 11:55 ` [PATCH 23/31] wifi: mwifiex: pass adapter to mwifiex_disable_auto_ds() Sascha Hauer
2024-08-20 11:55 ` [PATCH 24/31] wifi: mwifiex: make txpwr specific to adapter Sascha Hauer
2024-08-20 11:55 ` [PATCH 25/31] wifi: mwifiex: return error on unexpected bss_num Sascha Hauer
2024-08-20 11:55 ` [PATCH 26/31] wifi: mwifiex: coalesce rules are adapter specific Sascha Hauer
2024-08-20 11:55 ` [PATCH 27/31] wifi: mwifiex: do not use mwifiex_get_priv() in mwifiex_dnld_sleep_confirm_cmd() Sascha Hauer
2024-08-20 11:55 ` [PATCH 28/31] wifi: mwifiex: move rx_ant/tx_ant to adapter Sascha Hauer
2024-08-20 11:55 ` [PATCH 29/31] wifi: mwifiex: pass adapter to mwifiex_fw_dump_event() Sascha Hauer
2024-08-20 11:55 ` [PATCH 30/31] wifi: mwifiex: move common settings out of switch/case Sascha Hauer
2024-08-20 11:55 ` [PATCH 31/31] wifi: mwifiex: allow to set MAC address in add_virtual_intf() Sascha Hauer
2024-08-20 13:34 ` [PATCH 00/31] wifi: mwifiex: cleanup driver Francesco Dolcini
2024-08-21 11:11 ` Sascha Hauer
2024-08-21 11:33 ` Sascha Hauer
2024-08-20 17:42 ` Kalle Valo
2024-08-21 11:12 ` Sascha Hauer
2024-08-21 14:07 ` Kalle Valo
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=Zsd-ZxscUBmf0xsu@google.com \
--to=briannorris@chromium.org \
--cc=francesco@dolcini.it \
--cc=kernel@pengutronix.de \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).