summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-06 15:36:11 +0100
committerDavid S. Miller <davem@davemloft.net>2008-01-29 00:06:01 +0100
commite775ed7c677b163c80643036c32e23d3e59b9429 (patch)
tree909af580ca37910f462b613ba60a4e97e3035209 /drivers/net/wireless/libertas/main.c
parentlibertas: Remove cmd_oid from struct cmd_ctrl_node (diff)
downloadlinux-e775ed7c677b163c80643036c32e23d3e59b9429.tar.xz
linux-e775ed7c677b163c80643036c32e23d3e59b9429.zip
libertas: Consolidate lbs_host_to_card_done() function.
As we move towards having this done by a state machine, start by having a single 'stuff sent' function, which is called by if_usb/if_sdio/if_cs after sending both data and commands. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to '')
-rw-r--r--drivers/net/wireless/libertas/main.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index 67b6d7959e17..ed02c02c96da 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -616,6 +616,24 @@ static void lbs_tx_timeout(struct net_device *dev)
lbs_deb_leave(LBS_DEB_TX);
}
+void lbs_host_to_card_done(struct lbs_private *priv)
+{
+ struct lbs_adapter *adapter = priv->adapter;
+
+ priv->dnld_sent = DNLD_RES_RECEIVED;
+
+ /* Wake main thread if commands are pending */
+ if (!adapter->cur_cmd)
+ wake_up_interruptible(&priv->waitq);
+
+ if (priv->dev && adapter->connect_status == LBS_CONNECTED)
+ netif_wake_queue(priv->dev);
+
+ if (priv->mesh_dev && adapter->mesh_connect_status == LBS_CONNECTED)
+ netif_wake_queue(priv->mesh_dev);
+}
+EXPORT_SYMBOL_GPL(lbs_host_to_card_done);
+
/**
* @brief This function returns the network statistics
*