summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorBing Zhao <bzhao@marvell.com>2009-06-01 18:04:36 -0700
committerJohn W. Linville <linville@tuxdriver.com>2009-06-03 14:05:16 -0400
commit6bc61f4d8e2fa3d54017c29b58603e8771158a25 (patch)
treea527be05a193d1ef4b223322b4af6d83c69f64cb /drivers/net/wireless/libertas/main.c
parent328d84fb3614d006254c990a6224ce437147a5ac (diff)
downloadblackbird-op-linux-6bc61f4d8e2fa3d54017c29b58603e8771158a25.tar.gz
blackbird-op-linux-6bc61f4d8e2fa3d54017c29b58603e8771158a25.zip
libertas: improve function init/shutdown handling for SD8688
This patch is to incorporate Dan Williams' comments for commit: "libertas: implement function init/shutdown commands for SD8688" 1. remove fn_init_required and fn_shutdown_required variables from lbs_private structure. If required, __lbs_cmd() will be called directly to send function init/shutdown command for SD8688 in if_sdio_probe() or if_sdio_remove() callback. 2. add global variable "user_rmmod" to distinguish between the module removal case and the card removal case. This flag will be checked in if_sdio_remove() against SD8688 card to determine whether or not the function shutdown command needs to be sent. 3. remove "card" from if_sdio_model structure as it cannot store card pointers for multiple cards. Besides, it's no longer needed to store the "card" pointer with changes #1 & #2 above. Signed-off-by: Bing Zhao <bzhao@marvell.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index a58a12352672..89575e448015 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -1002,17 +1002,9 @@ static int lbs_setup_firmware(struct lbs_private *priv)
{
int ret = -1;
s16 curlevel = 0, minlevel = 0, maxlevel = 0;
- struct cmd_header cmd;
lbs_deb_enter(LBS_DEB_FW);
- if (priv->fn_init_required) {
- memset(&cmd, 0, sizeof(cmd));
- if (__lbs_cmd(priv, CMD_FUNC_INIT, &cmd, sizeof(cmd),
- lbs_cmd_copyback, (unsigned long) &cmd))
- lbs_pr_alert("CMD_FUNC_INIT command failed\n");
- }
-
/* Read MAC address from firmware */
memset(priv->current_addr, 0xff, ETH_ALEN);
ret = lbs_update_hw_spec(priv);
@@ -1200,9 +1192,6 @@ struct lbs_private *lbs_add_card(void *card, struct device *dmdev)
priv->mesh_open = 0;
priv->infra_open = 0;
- priv->fn_init_required = 0;
- priv->fn_shutdown_required = 0;
-
/* Setup the OS Interface to our functions */
dev->netdev_ops = &lbs_netdev_ops;
dev->watchdog_timeo = 5 * HZ;
@@ -1384,20 +1373,11 @@ void lbs_stop_card(struct lbs_private *priv)
struct net_device *dev;
struct cmd_ctrl_node *cmdnode;
unsigned long flags;
- struct cmd_header cmd;
lbs_deb_enter(LBS_DEB_MAIN);
if (!priv)
goto out;
-
- if (priv->fn_shutdown_required) {
- memset(&cmd, 0, sizeof(cmd));
- if (__lbs_cmd(priv, CMD_FUNC_SHUTDOWN, &cmd, sizeof(cmd),
- lbs_cmd_copyback, (unsigned long) &cmd))
- lbs_pr_alert("CMD_FUNC_SHUTDOWN command failed\n");
- }
-
dev = priv->dev;
netif_stop_queue(dev);
OpenPOWER on IntegriCloud