diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-08 14:46:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:06:18 -0500 |
commit | f86a93e1b2d05a7a38a48c91f8fb8fc7e8f1c734 (patch) | |
tree | cbf3aa632ea3e9d87c4358594065e52e45de9ad2 /drivers/net/wireless/libertas/main.c | |
parent | e7deced05f15693cca71bfae747b8d57eadeb1b2 (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.c | 25 |
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, | |||
290 | return strlen(buf); | 290 | return strlen(buf); |
291 | adapter->monitormode = LBS_MONITOR_OFF; | 291 | adapter->monitormode = LBS_MONITOR_OFF; |
292 | lbs_remove_rtap(priv); | 292 | lbs_remove_rtap(priv); |
293 | netif_wake_queue(priv->dev); | 293 | |
294 | netif_wake_queue(priv->mesh_dev); | 294 | if (adapter->currenttxskb) { |
295 | dev_kfree_skb_any(adapter->currenttxskb); | ||
296 | adapter->currenttxskb = NULL; | ||
297 | } | ||
298 | |||
299 | /* Wake queues, command thread, etc. */ | ||
300 | lbs_host_to_card_done(priv); | ||
295 | } | 301 | } |
296 | 302 | ||
297 | lbs_prepare_and_send_command(priv, | 303 | lbs_prepare_and_send_command(priv, |
@@ -521,7 +527,15 @@ static int lbs_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
521 | 527 | ||
522 | lbs_deb_enter(LBS_DEB_TX); | 528 | lbs_deb_enter(LBS_DEB_TX); |
523 | 529 | ||
524 | if (priv->dnld_sent || priv->adapter->TxLockFlag) { | 530 | /* We could return NETDEV_TX_BUSY here, but I'd actually |
531 | like to get the point where we can BUG() */ | ||
532 | if (priv->dnld_sent) { | ||
533 | lbs_pr_err("%s while dnld_sent\n", __func__); | ||
534 | priv->stats.tx_dropped++; | ||
535 | goto done; | ||
536 | } | ||
537 | if (priv->adapter->currenttxskb) { | ||
538 | lbs_pr_err("%s while TX skb pending\n", __func__); | ||
525 | priv->stats.tx_dropped++; | 539 | priv->stats.tx_dropped++; |
526 | goto done; | 540 | goto done; |
527 | } | 541 | } |
@@ -624,6 +638,11 @@ void lbs_host_to_card_done(struct lbs_private *priv) | |||
624 | if (!adapter->cur_cmd) | 638 | if (!adapter->cur_cmd) |
625 | wake_up_interruptible(&priv->waitq); | 639 | wake_up_interruptible(&priv->waitq); |
626 | 640 | ||
641 | /* Don't wake netif queues if we're in monitor mode and | ||
642 | a TX packet is already pending. */ | ||
643 | if (priv->adapter->currenttxskb) | ||
644 | return; | ||
645 | |||
627 | if (priv->dev && adapter->connect_status == LBS_CONNECTED) | 646 | if (priv->dev && adapter->connect_status == LBS_CONNECTED) |
628 | netif_wake_queue(priv->dev); | 647 | netif_wake_queue(priv->dev); |
629 | 648 | ||