Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07DC6C433F5 for ; Thu, 18 Nov 2021 16:46:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E539C61266 for ; Thu, 18 Nov 2021 16:46:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233697AbhKRQtK (ORCPT ); Thu, 18 Nov 2021 11:49:10 -0500 Received: from dispatch1-us1.ppe-hosted.com ([148.163.129.48]:55078 "EHLO dispatch1-us1.ppe-hosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233712AbhKRQtJ (ORCPT ); Thu, 18 Nov 2021 11:49:09 -0500 X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us1.ppe-hosted.com (unknown [10.7.64.218]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 67AF11C008A for ; Thu, 18 Nov 2021 16:45:57 +0000 (UTC) Received: from mail3.candelatech.com (mail2.candelatech.com [208.74.158.173]) by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTP id 4619084007D for ; Thu, 18 Nov 2021 16:45:57 +0000 (UTC) Received: from ben-dt4.candelatech.com (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id EB52E13C2B9; Thu, 18 Nov 2021 08:45:56 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com EB52E13C2B9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1637253957; bh=eY0pvuiP1fCVZ3n1Ar5b8hQB+k63wmQJthwFeoBUWfU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O3ZIeputXiI7DD1p6yLh8iqMRSUdwXARL5OFWmzlyGj0kpL3/eC4MBRk03Y11pEtO k3UaaN8RNrHbbZOZVsMe99aeY+GzKCPqLS1G2DhXVewyrroSz2mxuhs/u3Xe18zMCF uIJm43Yqjz9ir8fNCPzn2f+3kE/zk2s/WEl+BUL8= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: Ben Greear Subject: [PATCH 8/8] mt76: mt7915: fix SGI reporting when using tx-overrides Date: Thu, 18 Nov 2021 08:45:49 -0800 Message-Id: <20211118164549.3863-8-greearb@candelatech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211118164549.3863-1-greearb@candelatech.com> References: <20211118164549.3863-1-greearb@candelatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-MDID: 1637253957-hd4uk37a-a7m Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ben Greear The station wtbl logic to read rate-ctrl settings does not work when fixed rates are used. So, read sgi settings from the txo configuration in this case. Signed-off-by: Ben Greear --- drivers/net/wireless/mediatek/mt76/mt7915/mac.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c index c3dfd22d4978..8e5b87af2efb 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mac.c @@ -177,6 +177,15 @@ static void mt7915_mac_sta_poll(struct mt7915_dev *dev) rx_cur); } + /* If we are in tx-override mode, then wtbl doesn't provide useful report + * for the SGI/LGI stuff, so just get it from the override struct. + */ + if (msta->test.txo_active) { + msta->wcid.rate_he_gi = msta->test.tx_rate_sgi; + msta->wcid.rate_short_gi = msta->test.tx_rate_sgi; + continue; + } + /* * We don't support reading GI info from txs packets. * For accurate tx status reporting and AQL improvement, -- 2.20.1