From: Michael Buesch <mb@bu3sch.de>
To: stable@kernel.org
Cc: John Linville <linville@tuxdriver.com>,
bcm43xx-dev@lists.berlios.de, linux-wireless@vger.kernel.org
Subject: [PATCH stable] b43: Do not return TX_BUSY from op_tx
Date: Thu, 3 Jul 2008 01:04:29 +0200 [thread overview]
Message-ID: <200807030104.30100.mb@bu3sch.de> (raw)
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.
Upstream commit is
66193a7cef2239bfd1b9b96e304770facf7a49c7
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Index: linux-2.6.25.6/drivers/net/wireless/b43/main.c
===================================================================
--- linux-2.6.25.6.orig/drivers/net/wireless/b43/main.c 2008-06-14 22:47:31.000000000 +0200
+++ linux-2.6.25.6/drivers/net/wireless/b43/main.c 2008-07-03 00:50:53.000000000 +0200
@@ -2604,25 +2604,30 @@ static int b43_op_tx(struct ieee80211_hw
struct b43_wl *wl = hw_to_b43_wl(hw);
struct b43_wldev *dev = wl->current_dev;
unsigned long flags;
int err;
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))
err = b43_dma_tx(dev, skb, ctl);
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;
}
static int b43_op_conf_tx(struct ieee80211_hw *hw,
int queue,
const struct ieee80211_tx_queue_params *params)
next reply other threads:[~2008-07-02 23:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-02 23:04 Michael Buesch [this message]
2008-07-03 6:35 ` [PATCH stable] b43: Do not return TX_BUSY from op_tx Kalle Valo
2008-07-03 8:31 ` Michael Buesch
2008-07-03 12:24 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200807030104.30100.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=bcm43xx-dev@lists.berlios.de \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=stable@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.