From nobody Wed Dec 18 23:49:00 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YD9PT3Wsdz5h7PV; Wed, 18 Dec 2024 23:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YD9PT0zCPz45Bf; Wed, 18 Dec 2024 23:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734565741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbhG149hFoJ8IgKrmxyQOLkRAUum2FnLbm79O6bhDxw=; b=S8dbIpOnPEEVJizYrM/SeUSp0X82RZVKngLziHHezt/PBMR1kHWpfzDd06lAVGzwoiwdAn 4PdhcE0CnI7Jq8ZQRqiXJvI/Cm5CFE6j67YvHVvJAzW94Pyg8IkAVuj5HX2xL3o5LvGT4a iKaIWVa9u+j3PRIRiRbnBOyXJhXANVkLI4SfGmZQDPhGfT9KTcbjZRM+8lLF1CJOJCOzi+ 0JjsiQMxxYfMDkrrLaTnTkDaoDWaO0XFWWhOuwwC4MfCugL/kM0U7kq2yFmQOUKGM1UVtd epBwMEjuwIBD5ZQ0mVd9RUgQc3KN0UmBlgScu6gIgdavDAQPM55Yf/Fih8yFeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734565741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GbhG149hFoJ8IgKrmxyQOLkRAUum2FnLbm79O6bhDxw=; b=QsB8pRLRHnMnIpjzYUoqRSP+YbbPri9OXO+4UHD36fhnu30gxky9tAJFniknuu5uR+HsbR DJBpanSFSAwABSBmltquaczR8THKCMKQQNJ8oVoC4LtTwAilCW2sfIgCi1mK3292vW84mc d2zUEP6hNneOVVcV8haE5YRPnt74B5f0d+Ep6xZWfkggUsvp7iHEmNRVtgF4OXoAtXGbAm IHPcvb1gmbaN1fet1eFsaHWdRGU8T/weB9XacDAvNHtKmHFmbQyDhVqdg8Pt+uG63BqugL RyCJHT/QPf4OmF1KJLf6NxqXD/+AAlqm0d5CQDfwTbNMRzaUXV/cUeyS9J+hKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734565741; a=rsa-sha256; cv=none; b=KuKTJHa7U8eGCwlUYlfAPl2pJ3drXyXgzaycLUOarKnIA8gq0Qs7Wn19r6qLgV/o6T8+22 xCpFuPUrixX/JAZOvBf4cKDyKKFCVLLTY6epIXCqzIG1HHZI/A7a0WszfUlUB2O+04Kjue CYvT/5T5BFjQRr/IIhWDMl3rYpLkDfZ0rI8gLv8bbK++lAGmpb3CKioDf9xeTnUe0zoxlI k4muNUFlv9mwsCgcNcEATav8qMir+cSHAbnn1/PGcBIcn+X0IqcXLGctJZXVmTd2UyaZYu uLtJ0UdX8Fi5OPA3BKiqV++ePTJjgZj1gW4cGpjVbtE91VbSyhLf8+bO0ZJN7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YD9PT0P5TzTFW; Wed, 18 Dec 2024 23:49:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BINn0HF038191; Wed, 18 Dec 2024 23:49:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BINn0VL038188; Wed, 18 Dec 2024 23:49:00 GMT (envelope-from git) Date: Wed, 18 Dec 2024 23:49:00 GMT Message-Id: <202412182349.4BINn0VL038188@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 25af78d0bdcf - main - ath_rate_sample: correct the "best rate" calculation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25af78d0bdcfda995de27afc602fd86abdbef346 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=25af78d0bdcfda995de27afc602fd86abdbef346 commit 25af78d0bdcfda995de27afc602fd86abdbef346 Author: Adrian Chadd AuthorDate: 2024-12-08 17:09:55 +0000 Commit: Adrian Chadd CommitDate: 2024-12-18 23:46:52 +0000 ath_rate_sample: correct the "best rate" calculation This should be a *9 rather than a *10 so higher stream MCS rates (eg comparing MCS0 and MCS8) that have slightly longer average transmit times (but better burst transmit times) get considered. This mirrors what the later code does when considering if a rate change is needed. Locally tested: * AR9280, AP mode * AR9380, AP mode Differential Revision: https://reviews.freebsd.org/D47988 Reviewed by: imp --- sys/dev/ath/ath_rate/sample/sample.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c index 58eea8f64993..58df9ad1c1cd 100644 --- a/sys/dev/ath/ath_rate/sample/sample.c +++ b/sys/dev/ath/ath_rate/sample/sample.c @@ -397,7 +397,8 @@ pick_best_rate(struct ath_node *an, const HAL_RATE_TABLE *rt, * be abstracted out and properly handled. */ if (an->an_node.ni_flags & IEEE80211_NODE_HT) { - if (best_rate_tt == 0 || ((tt * 10) <= (best_rate_tt * 10))) { + if (best_rate_tt == 0 || + ((tt * 9) <= (best_rate_tt * 10))) { best_rate_tt = tt; best_rate_rix = rix; best_rate_pct = pct;