Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3622068ybd; Tue, 25 Jun 2019 05:54:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0r6qQZO6ck2QdraFL7jpdh1xWmRTFuD8thn5HBIMOJDowDEnP1IHi+je2Tbac3Gi0bu8t X-Received: by 2002:a63:1322:: with SMTP id i34mr39430080pgl.424.1561467264713; Tue, 25 Jun 2019 05:54:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561467264; cv=none; d=google.com; s=arc-20160816; b=PUDfh0JUQrXxE4ZY7Kd1cd7sVELuKOZ9n1etmbyY7qbAiMv2YW30YTJm2qJ9o7piUI jj/c4aaG9bRWsacVGrN9qZM5HA99waYRytGfrKetrsgq+eP4csOqar4u+PH2R0jL4eAc 6lLKbP5Y3U7IlEYOAkyNWQ0N9xq3NNvve7D3OpIVH0pC8r9gC5Q1s9cwD+iQOBmj1Wf/ FiehiBuVsjqvxWM7NS1rgqRUEVdL6y//xlKv1diAdZTJT3BlPhU2uzcPocc3ZPeQd52h ePqdJWJm/KGstXXjVHqhaB/ob1GO8RXzb6CjE6JTD1lnzg0dLPB5LLI4S55gRPq8stNI mhGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:to:from:dkim-signature; bh=VD1PtIB2Zg/LDHXQFp/zt3ZA5HelH5AA1RvvecntbBc=; b=VWt8FxyMcbvMkIyQZQol/RBszH3P/shsK6Qn3kWUAYE3bnNdzxJnEPwekZneWkg8nE ezWdfs0K6kli9X2EMwxJUzkmk6e2k5s+MgRURaSUoJaTsbTpi47wMN/grjRMgw67flP/ WjYSl0lEM+whBs2DVw13GxEeR4cIDIh7OghQiLksH05P4L/KX2ABWUIvJAeqV6uSSg9e nTt8tuwMbcSliOx93yU4ZnlcTzw3S8trZ6WlzLmLsj06ij3/TCwo5qmKEsW2nTvrM3lG bHl57ArDDmtjp6Iwxr6vv8mz3qQiltlNpY695H6DAtqj49pmIH7ersym2KMzu3QLxtkj Ehuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=cVrY6zrp; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g2si283455plg.336.2019.06.25.05.54.09; Tue, 25 Jun 2019 05:54:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=cVrY6zrp; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729566AbfFYLBa (ORCPT + 99 others); Tue, 25 Jun 2019 07:01:30 -0400 Received: from nbd.name ([46.4.11.11]:33640 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727835AbfFYLBa (ORCPT ); Tue, 25 Jun 2019 07:01:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=References:In-Reply-To:Message-Id:Date:Subject:To:From:Sender: Reply-To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=VD1PtIB2Zg/LDHXQFp/zt3ZA5HelH5AA1RvvecntbBc=; b=cVrY6zrpyL2Q8t12JZCM9zZXk/ eQKmVbmDaiitkpDZu2INGAxxrNJWDDp7yZeVSXJLl92JKzchPk7gXsU4s/bOOG5djBu56HlYkFSiu fsLas6R0mE9tY4j6//G33w0iUTduJPBsUf/qL+PlDf8QkUOmaZRlOl1+V4Xy2idAbP3k=; Received: from p5b2063ee.dip0.t-ipconnect.de ([91.32.99.238] helo=maeck-3.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfjCb-0004oF-CK for linux-wireless@vger.kernel.org; Tue, 25 Jun 2019 13:01:29 +0200 Received: by maeck-3.local (Postfix, from userid 501) id DE3725F9A1A0; Tue, 25 Jun 2019 13:01:23 +0200 (CEST) From: Felix Fietkau To: linux-wireless@vger.kernel.org Subject: [PATCH 2/2] mt76: mt7603: improve hardware rate switching configuration Date: Tue, 25 Jun 2019 13:01:23 +0200 Message-Id: <20190625110123.12979-2-nbd@nbd.name> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20190625110123.12979-1-nbd@nbd.name> References: <20190625110123.12979-1-nbd@nbd.name> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Now that tx status reporting can figure out the first attempted rate, we can make switching from lower rates to higher rates more conservative. This reduces retries under bad link conditions and ensures that fallback rates get more test coverage Signed-off-by: Felix Fietkau --- drivers/net/wireless/mediatek/mt76/mt7603/init.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/init.c b/drivers/net/wireless/mediatek/mt76/mt7603/init.c index d666e26afe90..357db811ad32 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/init.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/init.c @@ -227,7 +227,16 @@ mt7603_mac_init(struct mt7603_dev *dev) mt76_rmw_field(dev, MT_LPON_BTEIR, MT_LPON_BTEIR_MBSS_MODE, 2); mt76_rmw_field(dev, MT_WF_RMACDR, MT_WF_RMACDR_MBSSID_MASK, 2); - mt76_wr(dev, MT_AGG_ARUCR, FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), 7)); + mt76_wr(dev, MT_AGG_ARUCR, + FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), 7) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(1), 2) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(2), 2) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(3), 2) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(4), 1) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(5), 1) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(6), 1) | + FIELD_PREP(MT_AGG_ARxCR_LIMIT(7), 1)); + mt76_wr(dev, MT_AGG_ARDCR, FIELD_PREP(MT_AGG_ARxCR_LIMIT(0), MT7603_RATE_RETRY - 1) | FIELD_PREP(MT_AGG_ARxCR_LIMIT(1), MT7603_RATE_RETRY - 1) | -- 2.17.0