lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <89601525-cd39-4a66-8efe-216823a9d766@denx.de>
Date: Fri, 23 Aug 2024 03:42:19 +0200
From: Marek Vasut <marex@...x.de>
To: Simon Horman <horms@...nel.org>
Cc: linux-wireless@...r.kernel.org, Ajay Singh <ajay.kathat@...rochip.com>,
 "David S. Miller" <davem@...emloft.net>,
 Adham Abozaeid <adham.abozaeid@...rochip.com>,
 Alexis Lothoré <alexis.lothore@...tlin.com>,
 Claudiu Beznea <claudiu.beznea@...on.dev>, Conor Dooley
 <conor+dt@...nel.org>, Eric Dumazet <edumazet@...gle.com>,
 Jakub Kicinski <kuba@...nel.org>, Kalle Valo <kvalo@...nel.org>,
 Krzysztof Kozlowski <krzk+dt@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Rob Herring <robh@...nel.org>, devicetree@...r.kernel.org,
 netdev@...r.kernel.org
Subject: Re: [PATCH 2/2] wifi: wilc1000: Add WILC3000 support

On 8/22/24 12:26 PM, Simon Horman wrote:
> On Wed, Aug 21, 2024 at 08:42:33PM +0200, Marek Vasut wrote:
>> From: Ajay Singh <ajay.kathat@...rochip.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@...rochip.com>
>> Signed-off-by: Marek Vasut <marex@...x.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?

Fixed by returning -EINVAL , thanks .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ