From patchwork Thu Sep 8 12:38:36 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: 1129492 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p88CdUIp026435 for ; Thu, 8 Sep 2011 12:39:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932661Ab1IHMjh (ORCPT ); Thu, 8 Sep 2011 08:39:37 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:38572 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932621Ab1IHMjf (ORCPT ); Thu, 8 Sep 2011 08:39:35 -0400 Received: by mail-ew0-f46.google.com with SMTP id 4so268175ewy.19 for ; Thu, 08 Sep 2011 05:39:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; 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; bh=xUlTD4qDdIEbUOUN5sIYoF1Tg6OLrMq0zghsyeoPG4c=; b=RJ5QgrJXfL5h/sIBYIUh5OwHEwax/7hWVbCsZvEdQTm/CmY+8iImIMu99Mzwgjmcm9 TII5yVRUiCX/6yaiX4RJREMCbQLaNPvcIEQAgUY5J8e7loSCvSnrv0OOaHv4s3jDmgLJ yrHvnMlIH1QNglBXHJ0JFxDEZ1MetZvLW6v8Q= Received: by 10.213.30.18 with SMTP id s18mr278430ebc.114.1315485574785; Thu, 08 Sep 2011 05:39:34 -0700 (PDT) Received: from localhost.localdomain (g121037.upc-g.chello.nl [80.57.121.37]) by mx.google.com with ESMTPS id d12sm6401406eeb.8.2011.09.08.05.39.33 (version=SSLv3 cipher=OTHER); Thu, 08 Sep 2011 05:39:33 -0700 (PDT) From: Ivo van Doorn To: "John W. Linville" Subject: [PATCH 6/7] rt2x00: Forbid aggregation for STAs not programmed into the hw Date: Thu, 8 Sep 2011 14:38:36 +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: <201109081434.23635.IvDoorn@gmail.com> <201109081437.20667.IvDoorn@gmail.com> <201109081438.02330.IvDoorn@gmail.com> In-Reply-To: <201109081438.02330.IvDoorn@gmail.com> MIME-Version: 1.0 Message-Id: <201109081438.37130.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]); Thu, 08 Sep 2011 12:39:43 +0000 (UTC) From: Helmut Schaa If a STA is not known by the hw (i.e. has no WCID assigned) don't allow aggregation since this might mess up tx status reports and we won't be able to distinguish the reports of multiple WCID-less STAs. Signed-off-by: Helmut Schaa Signed-off-by: Ivo van Doorn --- drivers/net/wireless/rt2x00/rt2800lib.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index 7edd487..2f4d51a 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c @@ -4489,8 +4489,19 @@ int rt2800_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_sta *sta, u16 tid, u16 *ssn, u8 buf_size) { + struct rt2x00_sta *sta_priv = (struct rt2x00_sta *)sta->drv_priv; int ret = 0; + /* + * Don't allow aggregation for stations the hardware isn't aware + * of because tx status reports for frames to an unknown station + * always contain wcid=255 and thus we can't distinguish between + * multiple stations which leads to unwanted situations when the + * hw reorders frames due to aggregation. + */ + if (sta_priv->wcid < 0) + return 1; + switch (action) { case IEEE80211_AMPDU_RX_START: case IEEE80211_AMPDU_RX_STOP: