aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2009-07-08 09:33:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-07-08 15:24:30 -0400
commit47ab3840a389ff1b9959734995123e5bc94c3443 (patch)
tree10697ee82ea440263ce81acf40bd266c86352a00 /drivers
parent804ef71ee183121de5e9bca1d70d114c97300e17 (diff)
p54: tx refused but queue active
In the mainline kernel, p54usb will fail because the TX queue length can become < 0. This problem has been reported as Bugzilla #13725. The failure is expressed by the following message in the logs: WARNING: at net/mac80211/tx.c:1325 ieee80211_tx+0x23c/0x298 [mac80211]() Hardware name: HP Pavilion dv2700 Notebook PC tx refused but queue active This problem has been recently observed in the wireless-testing tree, where a full solution is being tested. That fix is too invasive for 2.6.31-rcX, but the simple change supplied here will prevent the failure. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/p54/p54common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index 48d81d98e12d..22ca122bd798 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -912,13 +912,14 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb)
912 } 912 }
913 913
914 __skb_unlink(entry, &priv->tx_queue); 914 __skb_unlink(entry, &priv->tx_queue);
915 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
916 915
917 frame_len = entry->len; 916 frame_len = entry->len;
918 entry_hdr = (struct p54_hdr *) entry->data; 917 entry_hdr = (struct p54_hdr *) entry->data;
919 entry_data = (struct p54_tx_data *) entry_hdr->data; 918 entry_data = (struct p54_tx_data *) entry_hdr->data;
920 priv->tx_stats[entry_data->hw_queue].len--; 919 if (priv->tx_stats[entry_data->hw_queue].len)
920 priv->tx_stats[entry_data->hw_queue].len--;
921 priv->stats.dot11ACKFailureCount += payload->tries - 1; 921 priv->stats.dot11ACKFailureCount += payload->tries - 1;
922 spin_unlock_irqrestore(&priv->tx_queue.lock, flags);
922 923
923 /* 924 /*
924 * Frames in P54_QUEUE_FWSCAN and P54_QUEUE_BEACON are 925 * Frames in P54_QUEUE_FWSCAN and P54_QUEUE_BEACON are