From patchwork Mon Mar 28 11:35:21 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: 668271 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 p2SBbIl0010802 for ; Mon, 28 Mar 2011 11:37:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753408Ab1C1LhO (ORCPT ); Mon, 28 Mar 2011 07:37:14 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:63099 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750802Ab1C1LhM (ORCPT ); Mon, 28 Mar 2011 07:37:12 -0400 Received: by mail-wy0-f174.google.com with SMTP id 21so2744896wya.19 for ; Mon, 28 Mar 2011 04:37:11 -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=V57o9OVswvNKFfsxmWwuKsuceVFBSYlI0kCeEhOhEiU=; b=xHIHlho1gXhuLIR46iL6eEIuwoeCb5trnu+mWLRhVy+XSqCdqOr7e51wge5wOrzX0i x/6DaOrbgg2cu5aZpUam2u4JzMktOteYXa7uKNolglu4zPmrfIjRzQigzZ36rFfj3IYj x3eNt7p7S5ob3OetCCHe4JHvPc2Vw15zsu5eA= 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=L4stQGLhJzpNDvpPxPc9Rw3rhQGfliR+o3j/0mQfFQJRts3Ox0WYdXmIuQ4ifG5CCF wHgK7d2uGA67pHocsgfIzUI8uBFRNaMVEemmm/Ups6tWZKKiTHYJdZjMEsN8DzZJiOvm vV3mEcDSyO/7QetXWgOnIMA4GQ62wKsTJfsN4= Received: by 10.227.10.141 with SMTP id p13mr3666946wbp.75.1301312231328; Mon, 28 Mar 2011 04:37:11 -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.09 (version=SSLv3 cipher=OTHER); Mon, 28 Mar 2011 04:37:10 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 12/13] rt2x00: Fix tx aggregation problems with some clients Date: Mon, 28 Mar 2011 13:35:21 +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.16711.IvDoorn@gmail.com> <201103281334.52023.IvDoorn@gmail.com> In-Reply-To: <201103281334.52023.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201103281335.23166.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:18 +0000 (UTC) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 59302fa..769c05c 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -687,6 +687,9 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status) mcs = real_mcs; } + if (aggr == 1 || ampdu == 1) + __set_bit(TXDONE_AMPDU, &txdesc.flags); + /* * Ralink has a retry mechanism using a global fallback * table. We setup this fallback table to try the immediate diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index a98c434..83252d94 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c @@ -353,10 +353,14 @@ void rt2x00lib_txdone(struct queue_entry *entry, * which would allow the rc algorithm to better decide on * which rates are suitable. */ - if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) { + if (test_bit(TXDONE_AMPDU, &txdesc->flags) || + tx_info->flags & IEEE80211_TX_CTL_AMPDU) { tx_info->flags |= IEEE80211_TX_STAT_AMPDU; tx_info->status.ampdu_len = 1; tx_info->status.ampdu_ack_len = success ? 1 : 0; + + if (!success) + tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; } if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) { diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 0c8b0c6..6ae8200 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h @@ -217,6 +217,7 @@ enum txdone_entry_desc_flags { TXDONE_FALLBACK, TXDONE_FAILURE, TXDONE_EXCESSIVE_RETRY, + TXDONE_AMPDU, }; /**