From patchwork Mon Mar 28 11:35:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivo van Doorn X-Patchwork-Id: 668281 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2SBbKe1010811 for ; Mon, 28 Mar 2011 11:37:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753349Ab1C1LhT (ORCPT ); Mon, 28 Mar 2011 07:37:19 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:41176 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753392Ab1C1LhN (ORCPT ); Mon, 28 Mar 2011 07:37:13 -0400 Received: by mail-wy0-f174.google.com with SMTP id 21so2745055wya.19 for ; Mon, 28 Mar 2011 04:37:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:date:user-agent:cc:references :in-reply-to:mime-version:content-type:content-transfer-encoding :message-id; bh=Eq5XbWasdTdUOZQEnUVUjAk7QFMDwD4pvPxqx/tvprA=; b=IVWBuleHBOWLJs3YLKW0HbbZ7RrOy8gt9AT8S1rh7aaoGxeHbPJrG4VCIi1y7fqySX 886N9aF5hrlOC0rubQu/epzPiW4diiinQQyhLqLVe6LvfEr+E7fColdhEfhodWQXzlTq ihzqdObIKczzT3eCqtZNF7GZUAKky83M5Own8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; b=FZrFgza8UrvY3J5B2IgjNjvTWqkj7fOtax+gqFAnpqizd+zEG/8PA08FEPFV82GFwH 4nIBdf01sbHPF4idE8C9LCoWtYm1MC5+vu03VSODwv+/HFdJf0sH7IeUxe32lbe1XSMh a8LE4qeQ5BTjSoq7I4u4mPyE28qPmj/OpA+OY= Received: by 10.227.54.6 with SMTP id o6mr3677517wbg.61.1301312233057; Mon, 28 Mar 2011 04:37:13 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id h11sm1945140wbc.9.2011.03.28.04.37.11 (version=SSLv3 cipher=OTHER); Mon, 28 Mar 2011 04:37:12 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 13/13] rt2x00: Add an error message when trying to send on a full queue Date: Mon, 28 Mar 2011 13:35:51 +0200 User-Agent: KMail/1.13.5 (Linux/2.6.32.26-175.fc12.x86_64; KDE/4.4.5; x86_64; ; ) Cc: linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com References: <201103281329.45470.IvDoorn@gmail.com> <201103281334.52023.IvDoorn@gmail.com> <201103281335.23166.IvDoorn@gmail.com> In-Reply-To: <201103281335.23166.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201103281335.53224.IvDoorn@gmail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 28 Mar 2011 11:37:21 +0000 (UTC) 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))) {