From: Simon Horman <horms@kernel.org>
To: Marek Vasut <marex@denx.de>
Cc: linux-wireless@vger.kernel.org,
"Ajay Singh" <ajay.kathat@microchip.com>,
"David S. Miller" <davem@davemloft.net>,
"Adham Abozaeid" <adham.abozaeid@microchip.com>,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"Conor Dooley" <conor+dt@kernel.org>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Kalle Valo" <kvalo@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Rob Herring" <robh@kernel.org>,
devicetree@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] wifi: wilc1000: Add WILC3000 support
Date: Thu, 22 Aug 2024 11:26:09 +0100 [thread overview]
Message-ID: <20240822102609.GK2164@kernel.org> (raw)
In-Reply-To: <20240821184356.163816-2-marex@denx.de>
On Wed, Aug 21, 2024 at 08:42:33PM +0200, Marek Vasut wrote:
> From: Ajay Singh <ajay.kathat@microchip.com>
>
> Add support for the WILC3000 chip. The chip is similar to WILC1000,
> except that the register layout is slightly different and it does
> not support WPA3/SAE.
>
> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
> Signed-off-by: Marek Vasut <marex@denx.de>
...
> diff --git a/drivers/net/wireless/microchip/wilc1000/sdio.c b/drivers/net/wireless/microchip/wilc1000/sdio.c
> index 41122199d51eb..7b99fcc450fd3 100644
> --- a/drivers/net/wireless/microchip/wilc1000/sdio.c
> +++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
> @@ -764,9 +764,13 @@ static int wilc_sdio_init(struct wilc *wilc, bool resume)
> * make sure can read back chip id correctly
> **/
> if (!resume) {
> - ret = wilc_sdio_read_reg(wilc, WILC_CHIPID, &chipid);
> - if (ret) {
> - dev_err(&func->dev, "Fail cmd read chip id...\n");
> + chipid = wilc_get_chipid(wilc, true);
> + if (is_wilc3000(chipid)) {
> + wilc->chip = WILC_3000;
> + } else if (is_wilc1000(chipid)) {
> + wilc->chip = WILC_1000;
> + } else {
> + dev_err(&func->dev, "Unsupported chipid: %x\n", chipid);
> return ret;
Hi Marek and Ajay,
It seems that with this change ret will be 0 here.
Perhaps an negative error code should be returned instead?
Flagged by Smatch.
> }
> dev_err(&func->dev, "chipid (%08x)\n", chipid);
...
next prev parent reply other threads:[~2024-08-22 10:26 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-21 18:42 [PATCH 1/2] dt-bindings: wireless: wilc1000: Document WILC3000 compatible string Marek Vasut
2024-08-21 18:42 ` [PATCH 2/2] wifi: wilc1000: Add WILC3000 support Marek Vasut
2024-08-22 10:26 ` Simon Horman [this message]
2024-08-23 1:42 ` Marek Vasut
2024-08-22 12:10 ` Alexis Lothoré
2024-08-23 2:46 ` Marek Vasut
2024-08-23 17:37 ` Ajay.Kathat
2024-08-23 18:00 ` kernel test robot
2024-08-22 8:07 ` [PATCH 1/2] dt-bindings: wireless: wilc1000: Document WILC3000 compatible string Krzysztof Kozlowski
2024-08-23 1:38 ` Marek Vasut
2024-08-23 6:10 ` Krzysztof Kozlowski
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=20240822102609.GK2164@kernel.org \
--to=horms@kernel.org \
--cc=adham.abozaeid@microchip.com \
--cc=ajay.kathat@microchip.com \
--cc=alexis.lothore@bootlin.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=marex@denx.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@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;
as well as URLs for NNTP newsgroup(s).