From patchwork Tue Jul 26 10:18:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 1007722 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 p6QAIiVj007032 for ; Tue, 26 Jul 2011 10:18:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426Ab1GZKSm (ORCPT ); Tue, 26 Jul 2011 06:18:42 -0400 Received: from mail-ey0-f171.google.com ([209.85.215.171]:57311 "EHLO mail-ey0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192Ab1GZKSm (ORCPT ); Tue, 26 Jul 2011 06:18:42 -0400 Received: by eye22 with SMTP id 22so398866eye.2 for ; Tue, 26 Jul 2011 03:18:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; bh=Q6OxjV9lmS4HIIZUYzMnPc98L3kP/VNdcj8j/yLMDaU=; b=QsJ8lRpbySylEnqH8YZSqqP6yeQp+PePmrJI0AV4RYd+WV8XxE9HZgf6nNkpA4cJlC 5p+yLm5yRFxYHERNaJR5rigEoARAl6pzp+bmBOEa1UUNqp5AHmVGzvytKkxTxXAiGjGg ULU/jAdXwqtD2GXUa29+Z3VnfoH8rwBWJ6sWw= Received: by 10.213.9.66 with SMTP id k2mr2135472ebk.82.1311675520812; Tue, 26 Jul 2011 03:18:40 -0700 (PDT) Received: from localhost.localdomain (p5495C91B.dip.t-dialin.net [84.149.201.27]) by mx.google.com with ESMTPS id s48sm249786ees.9.2011.07.26.03.18.38 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 26 Jul 2011 03:18:39 -0700 (PDT) From: Helmut Schaa To: John Linville Cc: linux-wireless@vger.kernel.org, Johannes Berg , Helmut Schaa Subject: [PATCH 1/2] mac80211: Stop TX BA session if buf_size is zero Date: Tue, 26 Jul 2011 12:18:27 +0200 Message-Id: <1311675508-29005-1-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.7.3.4 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]); Tue, 26 Jul 2011 10:18:45 +0000 (UTC) If we receive an ADDBA response with status code 0 and a buf_size of 0 we should stop the TX BA session as otherwise we'll end up queuing frames in ieee80211_tx_prep_agg forever instead of sending them out as non AMPDUs. This fixes a problem with AVM Fritz Stick N wireless devices where frames to this device are not transmitted anymore by mac80211. Signed-off-by: Helmut Schaa Acked-by: Johannes Berg --- net/mac80211/agg-tx.c | 18 +++++++----------- 1 files changed, 7 insertions(+), 11 deletions(-) diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c index c8be8ef..b7075f3 100644 --- a/net/mac80211/agg-tx.c +++ b/net/mac80211/agg-tx.c @@ -777,18 +777,14 @@ void ieee80211_process_addba_resp(struct ieee80211_local *local, #ifdef CONFIG_MAC80211_HT_DEBUG printk(KERN_DEBUG "switched off addBA timer for tid %d\n", tid); #endif - + /* + * IEEE 802.11-2007 7.3.1.14: + * In an ADDBA Response frame, when the Status Code field + * is set to 0, the Buffer Size subfield is set to a value + * of at least 1. + */ if (le16_to_cpu(mgmt->u.action.u.addba_resp.status) - == WLAN_STATUS_SUCCESS) { - /* - * IEEE 802.11-2007 7.3.1.14: - * In an ADDBA Response frame, when the Status Code field - * is set to 0, the Buffer Size subfield is set to a value - * of at least 1. - */ - if (!buf_size) - goto out; - + == WLAN_STATUS_SUCCESS && buf_size) { if (test_and_set_bit(HT_AGG_STATE_RESPONSE_RECEIVED, &tid_tx->state)) { /* ignore duplicate response */