summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-08 19:46:19 +0000
committerDavid S. Miller <davem@davemloft.net>2008-01-28 15:06:18 -0800
commitf86a93e1b2d05a7a38a48c91f8fb8fc7e8f1c734 (patch)
treecbf3aa632ea3e9d87c4358594065e52e45de9ad2 /drivers/net/wireless/libertas/main.c
parente7deced05f15693cca71bfae747b8d57eadeb1b2 (diff)
libertas: kill TxLockFlag
We don't need this. We can use adapter->currenttxskb instead. Signed-off-by: David Woodhouse <dwmw2@infradead.org> 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.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index d03a2f8710fb..7155f4818167 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -290,8 +290,14 @@ static ssize_t lbs_rtap_set(struct device *dev,
return strlen(buf);
adapter->monitormode = LBS_MONITOR_OFF;
lbs_remove_rtap(priv);
- netif_wake_queue(priv->dev);
- netif_wake_queue(priv->mesh_dev);
+
+ if (adapter->currenttxskb) {
+ dev_kfree_skb_any(adapter->currenttxskb);
+ adapter->currenttxskb = NULL;
+ }
+
+ /* Wake queues, command thread, etc. */
+ lbs_host_to_card_done(priv);
}
lbs_prepare_and_send_command(priv,
@@ -521,7 +527,15 @@ static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
lbs_deb_enter(LBS_DEB_TX);
- if (priv->dnld_sent || priv->adapter->TxLockFlag) {
+ /* We could return NETDEV_TX_BUSY here, but I'd actually
+ like to get the point where we can BUG() */
+ if (priv->dnld_sent) {
+ lbs_pr_err("%s while dnld_sent\n", __func__);
+ priv->stats.tx_dropped++;
+ goto done;
+ }
+ if (priv->adapter->currenttxskb) {
+ lbs_pr_err("%s while TX skb pending\n", __func__);
priv->stats.tx_dropped++;
goto done;
}
@@ -624,6 +638,11 @@ void lbs_host_to_card_done(struct lbs_private *priv)
if (!adapter->cur_cmd)
wake_up_interruptible(&priv->waitq);
+ /* Don't wake netif queues if we're in monitor mode and
+ a TX packet is already pending. */
+ if (priv->adapter->currenttxskb)
+ return;
+
if (priv->dev && adapter->connect_status == LBS_CONNECTED)
netif_wake_queue(priv->dev);