summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/microchip/wilc1000/wlan.c
diff options
context:
space:
mode:
authorDavid Mosberger-Tang <davidm@egauge.net>2024-02-12 21:22:30 +0100
committerKalle Valo <kvalo@kernel.org>2024-02-15 12:09:16 +0100
commitdd2f633eafa4ce5b9cb2ee09bf5d709535a02e79 (patch)
treefb7fb62b961922408699375dd33dc71caf584ba9 /drivers/net/wireless/microchip/wilc1000/wlan.c
parentwifi: wilc1000: prevent use-after-free on vif when cleaning up all interfaces (diff)
downloadlinux-dd2f633eafa4ce5b9cb2ee09bf5d709535a02e79.tar.xz
linux-dd2f633eafa4ce5b9cb2ee09bf5d709535a02e79.zip
wifi: wilc1000: validate chip id during bus probe
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> Tested-By: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20240212202057.3468714-1-davidm@egauge.net
Diffstat (limited to 'drivers/net/wireless/microchip/wilc1000/wlan.c')
-rw-r--r--drivers/net/wireless/microchip/wilc1000/wlan.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index 6b2f2269ddf8..68be233c36ce 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -12,11 +12,6 @@
#define WAKE_UP_TRIAL_RETRY 10000
-static inline bool is_wilc1000(u32 id)
-{
- return (id & (~WILC_CHIP_REV_FIELD)) == WILC_1000_BASE_ID;
-}
-
static inline void acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
{
mutex_lock(&wilc->hif_cs);