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: <20250212-wilc3000_bt-v1-4-9609b784874e@bootlin.com>
Date: Wed, 12 Feb 2025 16:46:23 +0100
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Alexis Lothoré <alexis.lothore@...tlin.com>, 
 Marcel Holtmann <marcel@...tmann.org>, 
 Luiz Augusto von Dentz <luiz.dentz@...il.com>, 
 Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, 
 Conor Dooley <conor+dt@...nel.org>, Ajay Singh <ajay.kathat@...rochip.com>, 
 Claudiu Beznea <claudiu.beznea@...on.dev>, Kalle Valo <kvalo@...nel.org>, 
 "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
 Simon Horman <horms@...nel.org>, 
 Nicolas Ferre <nicolas.ferre@...rochip.com>, 
 Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: Marek Vasut <marex@...x.de>, 
 Thomas Petazzoni <thomas.petazzoni@...tlin.com>, 
 linux-bluetooth@...r.kernel.org, devicetree@...r.kernel.org, 
 linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org, 
 netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: [PATCH 04/12] wifi: wilc1000: allow to use acquire/release bus in
 other parts of driver

acquire_bus/release_bus is currently used only in wlan.c when needing to
access the main bus (SDIO or SPI). For wilc3000, the bluetooth part will
also need to perform some operations on the main bus (eg: bluetooth
firmware loading), so expose acquire/release_bus.

Signed-off-by: Alexis Lothoré <alexis.lothore@...tlin.com>
---
 drivers/net/wireless/microchip/wilc1000/wlan.c | 5 +++--
 drivers/net/wireless/microchip/wilc1000/wlan.h | 3 +++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c
index f2b13bd44273ebe2ee474eda047e82bf1287bd6e..a697caf73ac3ed06602c029c17773f50e3f8edb5 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.c
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.c
@@ -743,7 +743,7 @@ static int chip_wakeup(struct wilc *wilc)
 		return chip_wakeup_wilc3000(wilc);
 }
 
-static inline int acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
+int acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
 {
 	int ret = 0;
 
@@ -757,12 +757,13 @@ static inline int acquire_bus(struct wilc *wilc, enum bus_acquire acquire)
 	return ret;
 }
 
-static inline int release_bus(struct wilc *wilc, enum bus_release release)
+int release_bus(struct wilc *wilc, enum bus_release release)
 {
 	int ret = 0;
 
 	if (release == WILC_BUS_RELEASE_ALLOW_SLEEP && wilc->power_save_mode)
 		ret = chip_allow_sleep(wilc);
+
 	mutex_unlock(&wilc->hif_cs);
 
 	return ret;
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.h b/drivers/net/wireless/microchip/wilc1000/wlan.h
index 65e79371014d9e60755cb0aa38e04d351e67bcfb..e45c2db0f5cd2de6844993dde15034ebbd93e73b 100644
--- a/drivers/net/wireless/microchip/wilc1000/wlan.h
+++ b/drivers/net/wireless/microchip/wilc1000/wlan.h
@@ -475,4 +475,7 @@ int wilc_wlan_init(struct net_device *dev);
 int wilc_get_chipid(struct wilc *wilc);
 int wilc_load_mac_from_nv(struct wilc *wilc);
 
+int acquire_bus(struct wilc *wilc, enum bus_acquire acquire);
+int release_bus(struct wilc *wilc, enum bus_release release);
+
 #endif

-- 
2.48.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ