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: <20240820-mwifiex-cleanup-v1-29-320d8de4a4b7@pengutronix.de>
Date: Tue, 20 Aug 2024 13:55:54 +0200
From: Sascha Hauer <s.hauer@...gutronix.de>
To: Brian Norris <briannorris@...omium.org>, 
 Francesco Dolcini <francesco@...cini.it>, Kalle Valo <kvalo@...nel.org>
Cc: linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org, 
 kernel@...gutronix.de, Sascha Hauer <s.hauer@...gutronix.de>
Subject: [PATCH 29/31] wifi: mwifiex: pass adapter to
 mwifiex_fw_dump_event()

The only caller of mwifiex_fw_dump_event() gets the priv * by calling
mwifiex_get_priv(card->adapter, MWIFIEX_BSS_ROLE_ANY) which is the same
as mwifiex_adapter_send_cmd() does internally. Use this function instead
of mwifiex_send_cmd() and pass the adapter as context pointer to
mwifiex_fw_dump_event().

Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
---
 drivers/net/wireless/marvell/mwifiex/main.h | 2 +-
 drivers/net/wireless/marvell/mwifiex/usb.c  | 3 +--
 drivers/net/wireless/marvell/mwifiex/util.c | 6 +++---
 3 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
index 0098bae832885..e8aa498657c39 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.h
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
@@ -1640,7 +1640,7 @@ void mwifiex_drv_info_dump(struct mwifiex_adapter *adapter);
 void mwifiex_prepare_fw_dump_info(struct mwifiex_adapter *adapter);
 void mwifiex_upload_device_dump(struct mwifiex_adapter *adapter);
 void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags);
-void mwifiex_fw_dump_event(struct mwifiex_private *priv);
+void mwifiex_fw_dump_event(struct mwifiex_adapter *adapter);
 void mwifiex_queue_main_work(struct mwifiex_adapter *adapter);
 int mwifiex_get_wakeup_reason(struct mwifiex_private *priv, u16 action,
 			      int cmd_type,
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c b/drivers/net/wireless/marvell/mwifiex/usb.c
index e082c26003cd7..0a1a67fdaa59e 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -671,8 +671,7 @@ static void mwifiex_usb_coredump(struct device *dev)
 	struct usb_interface *intf = to_usb_interface(dev);
 	struct usb_card_rec *card = usb_get_intfdata(intf);
 
-	mwifiex_fw_dump_event(mwifiex_get_priv(card->adapter,
-					       MWIFIEX_BSS_ROLE_ANY));
+	mwifiex_fw_dump_event(card->adapter);
 }
 
 static struct usb_driver mwifiex_usb_driver = {
diff --git a/drivers/net/wireless/marvell/mwifiex/util.c b/drivers/net/wireless/marvell/mwifiex/util.c
index a8c44cc14f8a2..312a83327cac4 100644
--- a/drivers/net/wireless/marvell/mwifiex/util.c
+++ b/drivers/net/wireless/marvell/mwifiex/util.c
@@ -857,9 +857,9 @@ void *mwifiex_alloc_dma_align_buf(int rx_len, gfp_t flags)
 }
 EXPORT_SYMBOL_GPL(mwifiex_alloc_dma_align_buf);
 
-void mwifiex_fw_dump_event(struct mwifiex_private *priv)
+void mwifiex_fw_dump_event(struct mwifiex_adapter *adapter)
 {
-	mwifiex_send_cmd(priv, HostCmd_CMD_FW_DUMP_EVENT, HostCmd_ACT_GEN_SET,
-			 0, NULL, true);
+	mwifiex_adapter_send_cmd(adapter, HostCmd_CMD_FW_DUMP_EVENT,
+				 HostCmd_ACT_GEN_SET, 0, NULL, true);
 }
 EXPORT_SYMBOL_GPL(mwifiex_fw_dump_event);

-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ