[rt2x00-users] [PATCH] rt2x00: Add an error message when trying to send on a full queue

Helmut Schaa helmut.schaa at googlemail.com
Sat Mar 26 01:13:03 EST 2011


We already tell mac80211 to stop the queue when we hit a certain
threshold. Hence, it shouldn't happen at all that a frame gets queued
for tx on a full queue. Add an error message for this case.

Signed-off-by: Helmut Schaa <helmut.schaa at googlemail.com>
---

While playing with queues in rt2x00 I somehow broke the queue mapping but didn't
notice it since it triggered exactly this path :)

Ivo, Gertjan, if you are aware of any possibilities that this case can happen
during normal operation this should be decreased to a warning maybe.

Thanks,
Helmut

 drivers/net/wireless/rt2x00/rt2x00queue.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 5d89259..9fc4a1e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -482,8 +482,11 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	struct skb_frame_desc *skbdesc;
 	u8 rate_idx, rate_flags;
 
-	if (unlikely(rt2x00queue_full(queue)))
+	if (unlikely(rt2x00queue_full(queue))) {
+		ERROR(queue->rt2x00dev,
+		      "Dropping frame due to full tx queue %d.\n", queue->qid);
 		return -ENOBUFS;
+	}
 
 	if (unlikely(test_and_set_bit(ENTRY_OWNER_DEVICE_DATA,
 				      &entry->flags))) {
-- 
1.7.3.4




More information about the users mailing list