From patchwork Mon Apr 18 13:30:01 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: 715261 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 p3IDZmER000691 for ; Mon, 18 Apr 2011 13:36:10 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754029Ab1DRNgA (ORCPT ); Mon, 18 Apr 2011 09:36:00 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:53097 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754023Ab1DRNf7 (ORCPT ); Mon, 18 Apr 2011 09:35:59 -0400 Received: by mail-fx0-f46.google.com with SMTP id 17so2833789fxm.19 for ; Mon, 18 Apr 2011 06:35:58 -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=tbwDV5ZIIbO4MyV1+u/LCuu2bkGdoTwolbGoZjEvmlM=; b=Ou4QgFkoVmvQnW1DZoIFpPjvBp1ppELLYQvH+0y78zE7jx/PqIImHEa2I5X0REu4h+ ELyOAZrT3uOC1KVisvA2f+BWfZR8WMMgkElxWYh5qrxk8gQ+3Ni6qbVR0GJWgU5we5qI HidTqz+2bhcuag96tz6srLtwyoIiG85cOlhwE= 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=R1AbcNu4+t+MTb/NcmCFMR11W8YmKNw5/xIVvJUYL7CAXMBYZCaQqWQW++TqVkIHi2 vJr9bRayuDpDojbQfRzUODF7R0LoxU5I6zCfF4YZ9ObR+nlwWHXFFuSYGONuSo+gbdZn N4ezu7Qa1RvKbmFAE4adfgMReVgvx6bxDCoQM= Received: by 10.223.6.198 with SMTP id a6mr4906207faa.130.1303133758756; Mon, 18 Apr 2011 06:35:58 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id c21sm1673551fac.46.2011.04.18.06.35.57 (version=SSLv3 cipher=OTHER); Mon, 18 Apr 2011 06:35:58 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 10/23] rt2800usb: handle TX status timeouts Date: Mon, 18 Apr 2011 15:30:01 +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: <201104181526.01722.IvDoorn@gmail.com> <201104181529.13131.IvDoorn@gmail.com> <201104181529.39237.IvDoorn@gmail.com> In-Reply-To: <201104181529.39237.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201104181530.02029.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, 18 Apr 2011 13:36:11 +0000 (UTC) From: Johannes Stezenbach The watchdog just triggers rt2800usb_work_txdone() when it detects a TX status timeout, thus rt2800usb_work_txdone() needs to handle this case. Signed-off-by: Johannes Stezenbach Signed-off-by: Ivo van Doorn --- drivers/net/wireless/rt2x00/rt2800usb.c | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 862430e..69004b9 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -449,11 +449,14 @@ static void rt2800usb_work_txdone(struct work_struct *work) while (!rt2x00queue_empty(queue)) { entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); - if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags) || - !test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) + if (test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags)) + break; + if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags)) + rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); + else if (rt2x00queue_status_timeout(entry)) + rt2x00lib_txdone_noinfo(entry, TXDONE_UNKNOWN); + else break; - - rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE); } } }