@@ -1493,8 +1493,6 @@ static void mwifiex_uninit_sw(struct mwifiex_adapter *adapter)
*/
int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter)
{
- struct mwifiex_private *priv;
-
if (!adapter)
return 0;
@@ -1502,10 +1500,9 @@ int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter)
/* Caller should ensure we aren't suspending while this happens */
reinit_completion(adapter->fw_done);
- priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
mwifiex_deauthenticate_all(adapter);
- mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
+ mwifiex_init_shutdown_fw(adapter, MWIFIEX_FUNC_SHUTDOWN);
mwifiex_uninit_sw(adapter);
adapter->is_up = false;
@@ -1436,7 +1436,7 @@ static inline void mwifiex_enable_wake(struct mwifiex_adapter *adapter)
}
}
-int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
+int mwifiex_init_shutdown_fw(struct mwifiex_adapter *adapter,
u32 func_init_shutdown);
int mwifiex_add_card(void *card, struct completion *fw_done,
@@ -452,7 +452,7 @@ static void mwifiex_pcie_remove(struct pci_dev *pdev)
mwifiex_disable_auto_ds(priv);
- mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
+ mwifiex_init_shutdown_fw(adapter, MWIFIEX_FUNC_SHUTDOWN);
}
mwifiex_remove_card(adapter);
@@ -867,7 +867,7 @@ mwifiex_sdio_remove(struct sdio_func *func)
priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
mwifiex_disable_auto_ds(priv);
- mwifiex_init_shutdown_fw(priv, MWIFIEX_FUNC_SHUTDOWN);
+ mwifiex_init_shutdown_fw(adapter, MWIFIEX_FUNC_SHUTDOWN);
}
mwifiex_remove_card(adapter);
@@ -656,9 +656,7 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf)
if (card->udev->state != USB_STATE_NOTATTACHED && !adapter->mfg_mode) {
mwifiex_deauthenticate_all(adapter);
- mwifiex_init_shutdown_fw(mwifiex_get_priv(adapter,
- MWIFIEX_BSS_ROLE_ANY),
- MWIFIEX_FUNC_SHUTDOWN);
+ mwifiex_init_shutdown_fw(adapter, MWIFIEX_FUNC_SHUTDOWN);
}
mwifiex_dbg(adapter, FATAL,
@@ -137,7 +137,7 @@ int mwifiex_init_fw_complete(struct mwifiex_adapter *adapter)
* This function sends init/shutdown command
* to firmware.
*/
-int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
+int mwifiex_init_shutdown_fw(struct mwifiex_adapter *adapter,
u32 func_init_shutdown)
{
u16 cmd;
@@ -147,12 +147,12 @@ int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
} else if (func_init_shutdown == MWIFIEX_FUNC_SHUTDOWN) {
cmd = HostCmd_CMD_FUNC_SHUTDOWN;
} else {
- mwifiex_dbg(priv->adapter, ERROR,
+ mwifiex_dbg(adapter, ERROR,
"unsupported parameter\n");
return -1;
}
- return mwifiex_send_cmd(priv, cmd, HostCmd_ACT_GEN_SET, 0, NULL, true);
+ return mwifiex_adapter_send_cmd(adapter, cmd, HostCmd_ACT_GEN_SET, 0, NULL, true);
}
EXPORT_SYMBOL_GPL(mwifiex_init_shutdown_fw);
mwifiex_init_shutdown_fw() shuts down the firmware of the whole adapter, not of a single priv, so pass the adapter to this function and use mwifiex_adapter_send_cmd(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> --- drivers/net/wireless/marvell/mwifiex/main.c | 5 +---- drivers/net/wireless/marvell/mwifiex/main.h | 2 +- drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- drivers/net/wireless/marvell/mwifiex/sdio.c | 2 +- drivers/net/wireless/marvell/mwifiex/usb.c | 4 +--- drivers/net/wireless/marvell/mwifiex/util.c | 6 +++--- 6 files changed, 8 insertions(+), 13 deletions(-)