* [PATCH] b43: Do not return TX_BUSY from op_tx
@ 2008-06-15 13:17 Michael Buesch
0 siblings, 0 replies; only message in thread
From: Michael Buesch @ 2008-06-15 13:17 UTC (permalink / raw)
To: John Linville; +Cc: bcm43xx-dev, linux-wireless
Never return TX_BUSY from op_tx. It doesn't make sense to return
TX_BUSY, if we can not transmit the packet.
Drop the packet and return TX_OK.
This will fix the resume hang.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
---
John, this is a bugfix for 2.6.26.
Index: wireless-testing/drivers/net/wireless/b43/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/b43/main.c 2008-06-15 14:33:49.000000000 +0200
+++ wireless-testing/drivers/net/wireless/b43/main.c 2008-06-15 14:36:31.000000000 +0200
@@ -2973,18 +2973,17 @@ static int b43_op_tx(struct ieee80211_hw
struct b43_wldev *dev = wl->current_dev;
unsigned long flags;
int err;
if (unlikely(skb->len < 2 + 2 + 6)) {
/* Too short, this can't be a valid frame. */
- dev_kfree_skb_any(skb);
- return NETDEV_TX_OK;
+ goto drop_packet;
}
B43_WARN_ON(skb_shinfo(skb)->nr_frags);
if (unlikely(!dev))
- return NETDEV_TX_BUSY;
+ goto drop_packet;
/* Transmissions on seperate queues can run concurrently. */
read_lock_irqsave(&wl->tx_lock, flags);
err = -ENODEV;
if (likely(b43_status(dev) >= B43_STAT_STARTED)) {
@@ -2994,13 +2993,18 @@ static int b43_op_tx(struct ieee80211_hw
err = b43_dma_tx(dev, skb);
}
read_unlock_irqrestore(&wl->tx_lock, flags);
if (unlikely(err))
- return NETDEV_TX_BUSY;
+ goto drop_packet;
+ return NETDEV_TX_OK;
+
+drop_packet:
+ /* We can not transmit this packet. Drop it. */
+ dev_kfree_skb_any(skb);
return NETDEV_TX_OK;
}
/* Locking: wl->irq_lock */
static void b43_qos_params_upload(struct b43_wldev *dev,
const struct ieee80211_tx_queue_params *p,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-06-15 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-15 13:17 [PATCH] b43: Do not return TX_BUSY from op_tx Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).