From: Kalle Valo <kvalo@kernel.org>
To: <Ajay.Kathat@microchip.com>
Cc: <marex@denx.de>, <linux-wireless@vger.kernel.org>,
<davem@davemloft.net>, <alexis.lothore@bootlin.com>,
<claudiu.beznea@tuxon.dev>, <conor+dt@kernel.org>,
<edumazet@google.com>, <kuba@kernel.org>, <krzk+dt@kernel.org>,
<pabeni@redhat.com>, <robh@kernel.org>,
<devicetree@vger.kernel.org>, <netdev@vger.kernel.org>
Subject: Re: [PATCH v4 5/5] wifi: wilc1000: Add WILC3000 support
Date: Mon, 09 Sep 2024 20:31:23 +0300 [thread overview]
Message-ID: <87le00g2dw.fsf@kernel.org> (raw)
In-Reply-To: <7205210d-8bf8-41ba-9462-38e619027a45@microchip.com> (Ajay Kathat's message of "Mon, 9 Sep 2024 16:51:35 +0000")
<Ajay.Kathat@microchip.com> writes:
> On 9/9/24 02:35, Kalle Valo wrote:
>
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> Marek Vasut <marex@denx.de> writes:
>>
>>> 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>
>>
>> [...]
>>
>>> --- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
>>> +++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
>>> @@ -313,6 +313,13 @@ static int connect(struct wiphy *wiphy, struct net_device *dev,
>>>
>>> vif->connecting = true;
>>>
>>> + if (sme->auth_type == NL80211_AUTHTYPE_SAE &&
>>> + is_wilc3000(vif->wilc->chipid)) {
>>> + netdev_err(dev, "WILC3000: WPA3 not supported\n");
>>> + ret = -EOPNOTSUPP;
>>> + goto out_error;
>>> + }
>>
>> This looks wrong. If wilc3000 doesn't support SAE you shouldn't
>> advertise NL80211_FEATURE_SAE to user space. I think the check for
>> wilc3000 should be in wilc_create_wiphy():
>>
>
> Actually, the chip ID is not available when wilc_create_wiphy() is called but
> is set later in the device probe function. Therefore, adding the
> 'is_wilc3000(vif->wilc->chipid)' condition may not work as expected.
> Also, I think there is no API to change "wiphy->features" after wiphy is
> registered to set it later when chip ID information is available.
Sounds like the driver is doing something funky in the registration, the
idea is that the device capabilities are probed before calling
wiphy_register().
> Does it make sense to add a module parameter for device type(wilc1000 or
> wilc3000) to address device-specific featurization.
We don't do hacks like that in upstream, it's expected that the driver
does this all automatically.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-09-09 17:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-29 0:44 [PATCH v4 1/5] dt-bindings: wireless: wilc1000: Document WILC3000 compatible string Marek Vasut
2024-08-29 0:45 ` [PATCH v4 2/5] wifi: wilc1000: Fold wilc_get_chipid() into wlan.c Marek Vasut
2024-08-29 0:45 ` [PATCH v4 3/5] wifi: wilc1000: Fold chip_allow_sleep()/chip_wakeup() " Marek Vasut
2024-08-29 0:45 ` [PATCH v4 4/5] wifi: wilc1000: Fill in missing error handling Marek Vasut
2024-08-29 0:45 ` [PATCH v4 5/5] wifi: wilc1000: Add WILC3000 support Marek Vasut
2024-09-09 9:35 ` Kalle Valo
2024-09-09 14:46 ` Marek Vasut
2024-09-09 15:04 ` Kalle Valo
2024-09-09 19:54 ` Marek Vasut
2024-09-09 16:51 ` Ajay.Kathat
2024-09-09 17:31 ` Kalle Valo [this message]
2024-09-09 21:11 ` Ajay.Kathat
2024-09-09 22:02 ` Marek Vasut
2024-09-10 5:03 ` Kalle Valo
2024-09-03 16:09 ` [PATCH v4 1/5] dt-bindings: wireless: wilc1000: Document WILC3000 compatible string Alexis Lothoré
2024-09-03 18:47 ` Krzysztof Kozlowski
2024-09-04 14:32 ` Alexis Lothoré
2024-09-03 19:30 ` Marek Vasut
2024-09-04 14:50 ` Alexis Lothoré
2024-09-04 17:45 ` Marek Vasut
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=87le00g2dw.fsf@kernel.org \
--to=kvalo@kernel.org \
--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=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).