Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp639933pxv; Thu, 15 Jul 2021 12:11:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAysnqBjq6Qu83FW36QTS9oc95cHEG3HzZTcDegFtr+tANx23kg68Ug2JnFHxPflpb+dH6 X-Received: by 2002:a17:906:40a:: with SMTP id d10mr7018978eja.491.1626376315805; Thu, 15 Jul 2021 12:11:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376315; cv=none; d=google.com; s=arc-20160816; b=c6CxtdbEiqqSUzF3LILbD7jFrhc18AG968W+T7lx1r/oqklO4A7wWegwV+g6s86NUU 0grDQmp1xZurfksP6fN7Fe84r6F7d+r7/C88zhd/Ulirv+II+I6TTNC/7rhjiuUliGTb EXfLOdQSUN8MW94kQ5pig8yM+PamY8pURfLw9MhBq9ulMAMYfN3O4NQdBOkT/wNKRKSp GTLv2Ez8YjDHVHeI20KyaBV8DZYuS7YZo0AhENXWptW10x5KGTw5VqOjxY/iWcyRIy4S B2/JByoe7RkT7QtMTC9+yekPnWrkPEKXtPZfnWvIzTSWgH+HvhnwldG0s7s515S8jJpj S2zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dbrPiyQZxxcAJ2XKfBlumMscPT063+dMdQ38koIr7Rg=; b=NiwsvX2YhLKZMmA/ZWYwbkOCpE/uVIr3165ESQlRhc5/mjubOyg56vQ4vOxRX5g/1v JkBtsA+ljUmdget9j/1/xQxZGErme/g6ImnNAyPc5fPjxs1HzgqzO0w8fLNtCSKbls8b w7uKB6z+DNoiAfgbqfTZNADVKavy/G/Qeak/Oul+oUiyF3u9kv3/jl4jMZYcsuiBh5WB SF0skSzz/61/ItCf/PASsgnCJJD6eXGwsAF4jpiEhj9gyNvO4LqY82r5Tp89sx4rwNCQ s7zTv8bZ1Pc8mocizsoPAJdekypYnP9AJGPuL7o/XhTeLHuTd4jM/Wd1bnBIISrw7jBu i95g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bg1Z7RFb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si8198686edt.198.2021.07.15.12.11.21; Thu, 15 Jul 2021 12:11:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bg1Z7RFb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244056AbhGOTND (ORCPT + 99 others); Thu, 15 Jul 2021 15:13:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:38428 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240709AbhGOTAz (ORCPT ); Thu, 15 Jul 2021 15:00:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BB4F9613D1; Thu, 15 Jul 2021 18:57:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375461; bh=LvIRND0UqDC3dQhNJ2Rr52UaAl5IGAeej3QyKJteXq8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bg1Z7RFbnNNPlq0OcA7xxf6rUjZJ+Kqdc6xn2/RqKPjVln6sEb7+8OWpRMT9sP6sg ZimX9FCCMbHXX/ilRt3KdPCAUSywFNl7FySeHKQEonn14fA8QvGnrSF/o44ghJxrOq pLVefAD4me0Ei96AIi9NEc7uS0SARKo7ZHGM4ZRw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Felix Fietkau , Sasha Levin Subject: [PATCH 5.12 096/242] mt76: mt7615: fix fixed-rate tx status reporting Date: Thu, 15 Jul 2021 20:37:38 +0200 Message-Id: <20210715182609.992005742@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Felix Fietkau [ Upstream commit ec8f1a90d006f7cedcf86ef19fd034a406a213d6 ] Rely on the txs fixed-rate bit instead of info->control.rates Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin --- drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index d06e61cadc41..7fd293b4dcf7 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -1194,22 +1194,20 @@ static bool mt7615_fill_txs(struct mt7615_dev *dev, struct mt7615_sta *sta, int first_idx = 0, last_idx; int i, idx, count; bool fixed_rate, ack_timeout; - bool probe, ampdu, cck = false; + bool ampdu, cck = false; bool rs_idx; u32 rate_set_tsf; u32 final_rate, final_rate_flags, final_nss, txs; - fixed_rate = info->status.rates[0].count; - probe = !!(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE); - txs = le32_to_cpu(txs_data[1]); - ampdu = !fixed_rate && (txs & MT_TXS1_AMPDU); + ampdu = txs & MT_TXS1_AMPDU; txs = le32_to_cpu(txs_data[3]); count = FIELD_GET(MT_TXS3_TX_COUNT, txs); last_idx = FIELD_GET(MT_TXS3_LAST_TX_RATE, txs); txs = le32_to_cpu(txs_data[0]); + fixed_rate = txs & MT_TXS0_FIXED_RATE; final_rate = FIELD_GET(MT_TXS0_TX_RATE, txs); ack_timeout = txs & MT_TXS0_ACK_TIMEOUT; @@ -1231,7 +1229,7 @@ static bool mt7615_fill_txs(struct mt7615_dev *dev, struct mt7615_sta *sta, first_idx = max_t(int, 0, last_idx - (count - 1) / MT7615_RATE_RETRY); - if (fixed_rate && !probe) { + if (fixed_rate) { info->status.rates[0].count = count; i = 0; goto out; -- 2.30.2