From: "Jonas Dreßler" <verdre@v0yd.nl>
To: Brian Norris <briannorris@chromium.org>
Cc: "Amitkumar Karwar" <amitkarwar@gmail.com>,
"Ganapathi Bhat" <ganapathi017@gmail.com>,
"Xinming Hu" <huxinming820@gmail.com>,
"Kalle Valo" <kvalo@codeaurora.org>,
"David S. Miller" <davem@davemloft.net>,
"Jakub Kicinski" <kuba@kernel.org>,
"Tsuchiya Yuto" <kitakar@gmail.com>,
linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Maximilian Luz" <luzmaximilian@gmail.com>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Pali Rohár" <pali@kernel.org>
Subject: Re: [PATCH] mwifiex: Add quirk to disable deep sleep with certain hardware revision
Date: Wed, 3 Nov 2021 14:37:53 +0100 [thread overview]
Message-ID: <b2aaf6f7-9f22-926a-963b-cfd0d4fca31d@v0yd.nl> (raw)
In-Reply-To: <cc7432f4-824a-abe2-e304-5ba019ac8c89@v0yd.nl>
On 11/3/21 13:25, Jonas Dreßler wrote:
>
>>
>>> --- a/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
>>> +++ b/drivers/net/wireless/marvell/mwifiex/sta_cmdresp.c
>>> @@ -708,6 +708,22 @@ static int mwifiex_ret_ver_ext(struct mwifiex_private *priv,
>>> {
>>> struct host_cmd_ds_version_ext *ver_ext = &resp->params.verext;
>>>
>>> + if (test_and_clear_bit(MWIFIEX_IS_REQUESTING_FW_VEREXT, &priv->adapter->work_flags)) {
>>> + if (strncmp(ver_ext->version_str, "ChipRev:20, BB:9b(10.00), RF:40(21)", 128) == 0) {
>>
>> Rather than memorize the 128-size array here, maybe use
>> sizeof(ver_ext->version_str) ?
>
> Sounds like a good idea, yeah.
Nevermind, the reason I did this was for consistency in the
function, right underneath in the same function it also assumes
a fixed size of 128 characters, so I'd rather use the same
length.
> memcpy(version_ext->version_str, ver_ext->version_str,
> sizeof(char) * 128);
> memcpy(priv->version_str, ver_ext->version_str, 128);
Might be a good idea to #define it as MWIFIEX_VERSION_STR_LENGTH
in fw.h though...
next prev parent reply other threads:[~2021-11-03 13:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-28 7:37 Jonas Dreßler
2021-10-28 8:07 ` Andy Shevchenko
2021-10-28 12:14 ` Denis Kirjanov
2021-10-28 21:27 ` Brian Norris
2021-11-03 12:25 ` Jonas Dreßler
2021-11-03 12:29 ` Jonas Dreßler
2021-11-03 13:37 ` Jonas Dreßler [this message]
2021-11-03 14:15 ` Andy Shevchenko
2021-11-03 17:21 ` Brian Norris
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=b2aaf6f7-9f22-926a-963b-cfd0d4fca31d@v0yd.nl \
--to=verdre@v0yd.nl \
--cc=amitkarwar@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=briannorris@chromium.org \
--cc=davem@davemloft.net \
--cc=ganapathi017@gmail.com \
--cc=huxinming820@gmail.com \
--cc=kitakar@gmail.com \
--cc=kuba@kernel.org \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=luzmaximilian@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pali@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®