From: Brian Norris <briannorris@chromium.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Kalle Valo <kvalo@kernel.org>,
linux-wireless@vger.kernel.org,
Francesco Dolcini <francesco@dolcini.it>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/31] wifi: mwifiex: drop HostCmd_CMD_802_11_MAC_ADDRESS response handling
Date: Mon, 26 Aug 2024 15:44:43 -0700 [thread overview]
Message-ID: <Zs0FW-LPW0ShGXV5@google.com> (raw)
In-Reply-To: <ZsxFt19nQs4D7Q7t@pengutronix.de>
Hi Sascha,
On Mon, Aug 26, 2024 at 11:07:03AM +0200, Sascha Hauer wrote:
> On Thu, Aug 22, 2024 at 11:07:35AM -0700, Brian Norris wrote:
> > 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.
>
> Ok, I can clarify this a bit when sending this next time.
>
> Right now what we have is:
>
> 1) mwifiex_set_mac_address() sets priv->curr_addr to the desired new MAC
> address
> 2) mwifiex_cmd_802_11_mac_address() (called from mwifiex_send_cmd())
> constructs the HostCmd_CMD_802_11_MAC_ADDRESS command, using the MAC
> address in priv->curr_addr
> 3) mwifiex_ret_802_11_mac_address(), called from the response handler,
> sets priv->curr_addr to the MAC address received with the command
> response, which of course is the same as we initially copied there
> in step 1), which makes 3) redundant and unnecessary
Ack, that's the understanding I got, but it took a bit of reading to get
there.
> > 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.
>
> What we could do instead of dropping 3) is:
>
> 1) pass the new MAC address in the data_buf argument to
> mwifiex_send_cmd()
> 2) instead of priv->curr_addr use data_buf in
> mwifiex_cmd_802_11_mac_address()
>
> With this the response handler would still set priv->curr_addr in case
> the command went through successfully. No need to undo priv->curr_addr
> to the previous MAC address in case the command failed.
>
> Sounds good to me. Is that where you aiming at?
Yes, that seems about right.
Brian
next prev parent reply other threads:[~2024-08-26 22:44 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
2024-08-26 9:07 ` Sascha Hauer
2024-08-26 22:44 ` Brian Norris [this message]
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=Zs0FW-LPW0ShGXV5@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).