From nobody Wed Jan 08 02:59:16 2025 X-Original-To: dev-commits-src-main@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 4YSXgm51Vdz5kRNG; Wed, 08 Jan 2025 02:59:16 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YSXgm43j8z4cYb; Wed, 8 Jan 2025 02:59:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736305156; 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=0RPr2SrKg674AtO+AZyIhPvzfK5r9ZohxIMxWDvzf9o=; b=Wo76Ho9sJaXIOs2zS94Iio0r38snXhIUEb8AzkhDXwVIgRT30rBu+MCiIGRzDrCH2Ueht3 +9rCS6U00+WZd+gfYohN0ViNo2tbzGuXXLM95yQb3wmNqd1eUoJ6PJCVWMCBudtD9DsKH9 YmUgYdhMy9EbKOy0dNRLUOqBDaTaQUXj0ba6BcetE13VVA7JcWdC1WnUNE6iBdj+COUGAX /wJP42Rb7fGqboIglvIik6sFZSHy/XSWbtz2/A50MfQ2OPpM0Fl0vw6ApihjJwisjbi4K0 4tmgZhfFPiyMC4zAnbaC2dqixU3z1OBQb+bAYooN8YyZBkOAeTPnlllRDYIWxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736305156; 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=0RPr2SrKg674AtO+AZyIhPvzfK5r9ZohxIMxWDvzf9o=; b=bKBsnPKErf7970AyLWrnCKjrvfcNV6sXlJNs75g4voKdy556itkfy+7j0969EyS+dm2+PP eB1C16i89lp+OT6YNrCSA7P29M0ybKlDKQSuXdmlECjonJG+dBP4oHT5vzBjMw6JeKyKP6 qOp3s31SxMnfUromh32tcTP32R0lhEl9wSI8teKuEO8ZPsZqfUeN2oE+2UcnE1qByxq0Qg vw4Ee6T3/8evOW7rvInMiqTRcR5ZcAJArh7J1x/HB/gQm9ljjVQXeEByTtL6PxvU/CDevh vZkHwnf5sId37SdVQGUtHPkqMrKfsn9AiyxYVQnZPpvli4DWvOUNL41VPyAxEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736305156; a=rsa-sha256; cv=none; b=MIok2KdmmvlNfxqBVQjPFRd55O07Js4DFwUMQjIyRPByGX21K+H6Ppx/btfWUChwmuJCUi OO/epKtyg/lvXGqbcq7WIDbK0lUwXfWpYxnAXGOiuR2wjgbRTJVLAWGUEBeSk56NhdCwxQ e1Hcn+UOTiMq74Q936BD/rx+3zKoTGj/73ZrVHRQ6404mNClBuYruP+kaV4opcr3m0IYCi RqHyVG1JDC+xlG9bQeEGRtGjOdLyyd1bmFNDa4nHpWpLTbDQmwtoiDLa7pDZsrEYNlq+PB ZbAbTx056U5mqUvIVjOkBx1ShNb92dkqohXsH/HLqXMrHdVnlbr+M/ZuUk2TDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YSXgm2rD4zfDy; Wed, 08 Jan 2025 02:59:16 +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 5082xG7k002346; Wed, 8 Jan 2025 02:59:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5082xG6U002343; Wed, 8 Jan 2025 02:59:16 GMT (envelope-from git) Date: Wed, 8 Jan 2025 02:59:16 GMT Message-Id: <202501080259.5082xG6U002343@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: d82bfe73a3f4 - main - rtwn: don't set the RTS/CTS primary channel field for RTL8812AU/RTL8821AU List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: d82bfe73a3f4f3f38757c2e064047f09629ec7b7 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=d82bfe73a3f4f3f38757c2e064047f09629ec7b7 commit d82bfe73a3f4f3f38757c2e064047f09629ec7b7 Author: Adrian Chadd AuthorDate: 2024-12-16 20:11:16 +0000 Commit: Adrian Chadd CommitDate: 2025-01-08 02:32:42 +0000 rtwn: don't set the RTS/CTS primary channel field for RTL8812AU/RTL8821AU According to the rtl8812au reference driver, this seems to control the bandwidth used by lower-bandwidth frames when transmitted in a higher bandwidth channel. For example, transmitting a 20MHz frame on an 80MHz channel (eg in hostap mode) is doable, but you may want to at least duplicate the RTS/CTS exchange across all four 20MHz subchannels, AND perhaps duplicate the 20MHz frame. I haven't fired this up with a spectrum analyser to see what the result is. The vendor driver doesn't bother with this and it doesn't change performance. My guess is that for modes like AP mode we MAY wantto be able to control the RTS/CTS bandwidth choices rather than letting the firmare do it, but we're not there yet. The rtl8812au code in hal/rtl8812a_xmit.c:SCMapping_8812() has the gory details, but then the one place it's used just has it commented out and 0 (ie "do not care") is always programmed in. Differential Revision: https://reviews.freebsd.org/D48113 Obtained from: https://github.com/lwfinger/rtl8812au Reviewed by: bz --- sys/dev/rtwn/rtl8812a/r12a_tx.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/sys/dev/rtwn/rtl8812a/r12a_tx.c b/sys/dev/rtwn/rtl8812a/r12a_tx.c index 582e6e0ddaf4..336ad75a0b1f 100644 --- a/sys/dev/rtwn/rtl8812a/r12a_tx.c +++ b/sys/dev/rtwn/rtl8812a/r12a_tx.c @@ -56,14 +56,35 @@ #include #include +/* + * This function actually handles the secondary channel mapping, + * not the primary channel mapping. It hints to the MAC where + * to handle duplicate transmission of the RTS/CTS and payload + * frames when the requested transmit channel width is less than + * the configured channel width. + * + * Note: the vendor driver and linux rtw88 driver both leave this + * field currently set to 0. + * + * See the rtl8812au vendor driver, hal/rtl8812a_xmit.c:SCMapping_8812() + * and where it's used (and ignored.) + */ static int r12a_get_primary_channel(struct rtwn_softc *sc, struct ieee80211_channel *c) { +#if 0 /* XXX VHT80; VHT40 */ if (IEEE80211_IS_CHAN_HT40U(c)) return (R12A_TXDW5_PRIM_CHAN_20_80_2); else return (R12A_TXDW5_PRIM_CHAN_20_80_3); +#endif + + /* + * For now just return the VHT_DATA_SC_DONOT_CARE value + * from the reference driver. + */ + return (0); } static void