diff mbox series

[29/31] wifi: mwifiex: pass adapter to mwifiex_fw_dump_event()

Message ID 20240820-mwifiex-cleanup-v1-29-320d8de4a4b7@pengutronix.de (mailing list archive)
State Changes Requested
Delegated to: Kalle Valo
Headers show
Series wifi: mwifiex: cleanup driver | expand

Commit Message

Sascha Hauer Aug. 20, 2024, 11:55 a.m. UTC
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@pengutronix.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 mbox series

Patch

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);