From: Kalle Valo <kvalo@kernel.org>
To: David Mosberger-Tang <davidm@egauge.net>
Cc: linux-wireless@vger.kernel.org, Ajay.Kathat@microchip.com,
alexis.lothore@bootlin.com
Subject: Re: [PATCH v5] wifi: wilc1000: validate chip id during bus probe
Date: Mon, 12 Feb 2024 17:15:02 +0200 [thread overview]
Message-ID: <87h6idpvd5.fsf@kernel.org> (raw)
In-Reply-To: <20240207044559.2717200-1-davidm@egauge.net> (David Mosberger-Tang's message of "Wed, 07 Feb 2024 04:49:29 +0000 (UTC)")
David Mosberger-Tang <davidm@egauge.net> writes:
> Previously, the driver created a net device (typically wlan0) as soon
> as the module was loaded. This commit changes the driver to follow
> normal Linux convention of creating the net device only when bus
> probing detects a supported chip.
>
> Signed-off-by: David Mosberger-Tang <davidm@egauge.net>
> ---
> drivers/net/wireless/microchip/wilc1000/spi.c | 69 +++++++++++++++----
> .../net/wireless/microchip/wilc1000/wlan.c | 3 +-
> .../net/wireless/microchip/wilc1000/wlan.h | 1 +
> 3 files changed, 57 insertions(+), 16 deletions(-)
[...]
> --- a/drivers/net/wireless/microchip/wilc1000/wlan.c
> +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
> @@ -12,10 +12,11 @@
>
> #define WAKE_UP_TRIAL_RETRY 10000
>
> -static inline bool is_wilc1000(u32 id)
> +bool is_wilc1000(u32 id)
> {
> return (id & (~WILC_CHIP_REV_FIELD)) == WILC_1000_BASE_ID;
> }
> +EXPORT_SYMBOL_GPL(is_wilc1000);
>
> static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
> {
> diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
> index f02775f7e41f..ebdfb0afaf71 100644
> --- a/drivers/net/wireless/microchip/wilc1000/wlan.h
> +++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
> @@ -409,6 +409,7 @@ struct wilc_cfg_rsp {
>
> struct wilc_vif;
>
> +bool is_wilc1000(u32 id);
I was about to apply this but then noticed the new EXPORT_SYMBOL_GPL().
The overhead for such tiny function sounds too much, much better to move
the static inline function to wlan.h.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2024-02-12 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 4:49 [PATCH v5] wifi: wilc1000: validate chip id during bus probe David Mosberger-Tang
2024-02-07 10:54 ` Alexis Lothoré
2024-02-12 15:15 ` Kalle Valo [this message]
2024-02-12 20:24 ` David Mosberger-Tang
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=87h6idpvd5.fsf@kernel.org \
--to=kvalo@kernel.org \
--cc=Ajay.Kathat@microchip.com \
--cc=alexis.lothore@bootlin.com \
--cc=davidm@egauge.net \
--cc=linux-wireless@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.