From patchwork Mon Nov 24 14:34:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 5367651 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 24DADC11AC for ; Mon, 24 Nov 2014 14:43:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FC7720426 for ; Mon, 24 Nov 2014 14:43:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E6F792041F for ; Mon, 24 Nov 2014 14:43:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754566AbaKXOnO (ORCPT ); Mon, 24 Nov 2014 09:43:14 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:49911 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754144AbaKXOfi (ORCPT ); Mon, 24 Nov 2014 09:35:38 -0500 Received: by mail-wi0-f178.google.com with SMTP id hi2so5935486wib.17 for ; Mon, 24 Nov 2014 06:35:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iKoIOp25v94WUsmwgaNO3GrlWsEGTWIBmGxmimdKr6s=; b=kyPJFtgU8xMLLeam71+6nu/fXkSKfDV/eZLaHbIj4Js2/KTobF8m0EDjF3XTUxo38X 8wLtz+91pQ3MZu61bgOwP055Z9Rwlals1jgGFLXCi7ykew/fU2QXsxfeI6o5inFZnQy5 MlQyDtd6yV+rzo1igigh+/4Q0/JrH80Rc+KomGdVaMbqXiXzAFK6vT4t+yI5aa3riMm6 I0KkiaMx6BojuKuQS8tX98RY/ro9/UKSkHFl0ABRwfFuByLbSHEjcFh8ul3Fcp5ICYtl nu6JVBhHGVfJCL5y3fKaE82z4HkcKT07rbwrNOqZ7ofL2oJMzrVOOixN1eCMw8a2/A5A DxMg== X-Received: by 10.180.98.169 with SMTP id ej9mr22359627wib.1.1416839737617; Mon, 24 Nov 2014 06:35:37 -0800 (PST) Received: from localhost.localdomain (46-116-150-134.bb.netvision.net.il. [46.116.150.134]) by mx.google.com with ESMTPSA id n3sm21274744wjz.21.2014.11.24.06.35.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Nov 2014 06:35:37 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Eyal Shapira , Eyal Shapira , Eliad Peller , Emmanuel Grumbach Subject: [PATCH 25/75] iwlwifi: mvm: rs: consider a missing BA as a single tx failure Date: Mon, 24 Nov 2014 16:34:01 +0200 Message-Id: <1416839691-28533-25-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eyal Shapira The fw now indicates missing BA with ampdu_ack_len=0. This will make the whole aggregation being marked as failed, although it's most likely not the case (and only the BA itself was failed). Consider this case as a single tx failure. Signed-off-by: Eyal Shapira Signed-off-by: Eliad Peller Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/rs.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c index c05f5a5..30ceb67 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rs.c +++ b/drivers/net/wireless/iwlwifi/mvm/rs.c @@ -1204,6 +1204,13 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta, * first index into rate scale table. */ if (info->flags & IEEE80211_TX_STAT_AMPDU) { + /* ampdu_ack_len = 0 marks no BA was received. In this case + * treat it as a single frame loss as we don't want the success + * ratio to dip too quickly because a BA wasn't received + */ + if (info->status.ampdu_ack_len == 0) + info->status.ampdu_len = 1; + ucode_rate = le32_to_cpu(table->rs_table[0]); rs_rate_from_ucode_rate(ucode_rate, info->band, &rate); rs_collect_tx_data(lq_sta, curr_tbl, rate.index,