[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240820-mwifiex-cleanup-v1-23-320d8de4a4b7@pengutronix.de>
Date: Tue, 20 Aug 2024 13:55:48 +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 23/31] wifi: mwifiex: pass adapter to
mwifiex_disable_auto_ds()
mwifiex_disable_auto_ds() has effect on the whole adapter and not
to a priv, so pass the adapter to this function and use
mwifiex_adapter_send_cmd() instead of mwifiex_send_cmd().
Signed-off-by: Sascha Hauer <s.hauer@...gutronix.de>
---
drivers/net/wireless/marvell/mwifiex/main.h | 2 +-
drivers/net/wireless/marvell/mwifiex/pcie.c | 5 +----
drivers/net/wireless/marvell/mwifiex/sdio.c | 4 +---
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c | 6 +++---
4 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/main.h b/drivers/net/wireless/marvell/mwifiex/main.h
index 114e0141dc01a..298726c663724 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.h
+++ b/drivers/net/wireless/marvell/mwifiex/main.h
@@ -1456,7 +1456,7 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
struct cfg80211_ssid *req_ssid);
int mwifiex_cancel_hs(struct mwifiex_adapter *adapter, int cmd_type);
int mwifiex_enable_hs(struct mwifiex_adapter *adapter);
-int mwifiex_disable_auto_ds(struct mwifiex_private *priv);
+int mwifiex_disable_auto_ds(struct mwifiex_adapter *adapter);
int mwifiex_drv_get_data_rate(struct mwifiex_private *priv, u32 *rate);
int mwifiex_request_scan(struct mwifiex_private *priv,
struct cfg80211_ssid *req_ssid);
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 2a7ed2aad1a34..caa3a383dd56d 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -427,7 +427,6 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
{
struct pcie_service_card *card;
struct mwifiex_adapter *adapter;
- struct mwifiex_private *priv;
const struct mwifiex_pcie_card_reg *reg;
u32 fw_status;
@@ -448,9 +447,7 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
if (fw_status == FIRMWARE_READY_PCIE && !adapter->mfg_mode) {
mwifiex_deauthenticate_all(adapter);
- priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
-
- mwifiex_disable_auto_ds(priv);
+ mwifiex_disable_auto_ds(adapter);
mwifiex_init_shutdown_fw(adapter, MWIFIEX_FUNC_SHUTDOWN);
}
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c
index e3a995514efc7..6a33afc8a9d97 100644
--- a/drivers/net/wireless/marvell/mwifiex/sdio.c
+++ b/drivers/net/wireless/marvell/mwifiex/sdio.c
@@ -844,7 +844,6 @@ mwifiex_sdio_remove(struct sdio_func *func)
{
struct sdio_mmc_card *card;
struct mwifiex_adapter *adapter;
- struct mwifiex_private *priv;
int ret = 0;
u16 firmware_stat;
@@ -865,8 +864,7 @@ mwifiex_sdio_remove(struct sdio_func *func)
!adapter->mfg_mode) {
mwifiex_deauthenticate_all(adapter);
- priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
- mwifiex_disable_auto_ds(priv);
+ mwifiex_disable_auto_ds(adapter);
mwifiex_init_shutdown_fw(adapter, MWIFIEX_FUNC_SHUTDOWN);
}
diff --git a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
index ed9f75adcdea3..3586def45adae 100644
--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -610,14 +610,14 @@ int mwifiex_get_bss_info(struct mwifiex_private *priv,
/*
* The function disables auto deep sleep mode.
*/
-int mwifiex_disable_auto_ds(struct mwifiex_private *priv)
+int mwifiex_disable_auto_ds(struct mwifiex_adapter *adapter)
{
struct mwifiex_ds_auto_ds auto_ds = {
.auto_ds = DEEP_SLEEP_OFF,
};
- return mwifiex_send_cmd(priv, HostCmd_CMD_802_11_PS_MODE_ENH,
- DIS_AUTO_PS, BITMAP_AUTO_DS, &auto_ds, true);
+ return mwifiex_adapter_send_cmd(adapter, HostCmd_CMD_802_11_PS_MODE_ENH,
+ DIS_AUTO_PS, BITMAP_AUTO_DS, &auto_ds, true);
}
EXPORT_SYMBOL_GPL(mwifiex_disable_auto_ds);
--
2.39.2
Powered by blists - more mailing lists