rt2x00: Add an error message when trying to send on a full queue
authorHelmut Schaa <helmut.schaa@googlemail.com>
Mon, 28 Mar 2011 11:35:51 +0000 (13:35 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Apr 2011 20:20:04 +0000 (16:20 -0400)
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@googlemail.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2x00queue.c

index 5d8925991ffba1050e822cb6fdef51e51c325708..9fc4a1ec4b432e31a5ff565f73b7c55e57c17e0b 100644 (file)
@@ -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))) {