From nobody Sat Dec 14 02:17:58 2024 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 4Y98xf4pHnz5gWQv; Sat, 14 Dec 2024 02:17:58 +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 4Y98xf3LqXz4X0v; Sat, 14 Dec 2024 02:17:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734142678; 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=8z4p1IcPUJ6vDcnBtlTuMLeSnCXxqKPbM12I77dJOQY=; b=ScfDcmMRN42gmplha5OptIOnTdlFkozT+8kr5LqIMni6uWuTXFj77MotcKYsVeQP45EWtB 6ZBdoKkv7stOVP+H5X+031f5nWVovnF1ORWapQVHZqEOpHQzapKZRhwId7qVeUBr1k56fw 7d6GyzDCbP95ltEAFykB455N0TIJh8SJ9Vn6USE4NKlcwuJHqmZ73zdzsk/JjtU92oQ4uc 5rFWou8QfUahNvdiCKrvYejFT/q2Hn/SvUQi0KTntWaVa8FksS/oiteTkcjhS5JVoWoeLJ 6pNx1rkl/KhMOmr0Qr6ulTmJ4k4UDgVP12KYim+VKg0hFvSKd3NE/bSnjs01Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734142678; 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=8z4p1IcPUJ6vDcnBtlTuMLeSnCXxqKPbM12I77dJOQY=; b=M1LTyNeXn94te0Ev4B4HT1W45SvDwdeTnqkf9Zdx28iTV7C0F9+2pBW6HxuYUblRNi9HUQ GnJy4WmguonuN2MlFI15Ic1s0wG//A7fcWMOElyceV6+3Lqlg20bOQPPfeX2La7D3wjeTF ND7pZHm9/NaJDB0m54MQQy7ydaQxQcqWQSJRWPgFRkQWwsKiOG4BsouW+MO99hFSbYxp1R hulkiy/pX/D79G1Qp3VTY26bDM86fb8XZJjTbNAbdG2J5cQw1FnuW6AODUGl6dLsIRYOJk 6yzGF9qVRpnRhId/8gNx/YLJD8sG7TMSdycydPRbY6wXJmnqOwgNZMQVPQYDRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734142678; a=rsa-sha256; cv=none; b=K7ZLAWQkDUNWAoG9F9f8uoYuQ4xg0StB35K9r221EgSjKbd1NbjwFe3qD6eC1TNrnT+suT WB386Wxu+4pQA0Q325Z9fqiMozp+FoJzeC6DANp31wr3Cibcr1LbcGMuGTZXi6V73ulXd7 LdLKAihWU6crCDNb402VW1upRU9JIsufLMT32mnLrAIPg5stJGTDk2XDU5BkTvoCsQOnYS j1g1Db5qmHr/gUfSFB+eMGI3BMQW7LMlVKaWQtfFpIZrbYviMg+8uM8Dmpjd75Z16v3WHd 5dP6JEfTlwgZl4rydtckGL4miSf21WG7TGPVCrUgXvF4qvlw1AeqKRzNPXJB+g== 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 4Y98xf2yTlz13Hy; Sat, 14 Dec 2024 02:17:58 +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 4BE2HwL3085922; Sat, 14 Dec 2024 02:17:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BE2HwHD085919; Sat, 14 Dec 2024 02:17:58 GMT (envelope-from git) Date: Sat, 14 Dec 2024 02:17:58 GMT Message-Id: <202412140217.4BE2HwHD085919@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: 7b71689c9ccd - main - rtwn: update RTL8812AU/RTL8821AU receive path to include VHT info 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: 7b71689c9ccd71d9683e6d55d42e090e292d13d2 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=7b71689c9ccd71d9683e6d55d42e090e292d13d2 commit 7b71689c9ccd71d9683e6d55d42e090e292d13d2 Author: Adrian Chadd AuthorDate: 2024-12-04 06:26:09 +0000 Commit: Adrian Chadd CommitDate: 2024-12-14 02:17:40 +0000 rtwn: update RTL8812AU/RTL8821AU receive path to include VHT info * RX frames with short-GI can be either HT or VHT * Add placeholders for RX VHT rate, PHY type, etc Differential Revision: https://reviews.freebsd.org/D47902 --- sys/dev/rtwn/rtl8812a/r12a_rx.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/rtwn/rtl8812a/r12a_rx.c b/sys/dev/rtwn/rtl8812a/r12a_rx.c index 482e4ee38c81..805775033fd1 100644 --- a/sys/dev/rtwn/rtl8812a/r12a_rx.c +++ b/sys/dev/rtwn/rtl8812a/r12a_rx.c @@ -246,7 +246,8 @@ r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, rxs->c_pktflags |= IEEE80211_RX_F_AMPDU_MORE; } - if ((rxdw4 & R12A_RXDW4_SPLCP) && RTWN_RATE_IS_HT(rate)) + if ((rxdw4 & R12A_RXDW4_SPLCP) && + (RTWN_RATE_IS_HT(rate) || RTWN_RATE_IS_VHT(rate))) rxs->c_pktflags |= IEEE80211_RX_F_SHORTGI; switch (MS(rxdw4, R12A_RXDW4_BW)) { @@ -277,11 +278,14 @@ r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, rxs->c_phytype = IEEE80211_RX_FP_11A; else rxs->c_phytype = IEEE80211_RX_FP_11G; - } else { + } else if (RTWN_RATE_IS_HT(rate)) { if (is5ghz) rxs->c_phytype = IEEE80211_RX_FP_11NA; else rxs->c_phytype = IEEE80211_RX_FP_11NG; + } else if (RTWN_RATE_IS_VHT(rate)) { + /* TODO: there's no FP_VHT_5GHZ yet */ + rxs->c_phytype = IEEE80211_RX_FP_11NA; } } @@ -292,11 +296,15 @@ r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs, rxs->c_pktflags |= IEEE80211_RX_F_CCK; else rxs->c_pktflags |= IEEE80211_RX_F_OFDM; - } else { /* MCS0~15. */ - /* TODO: VHT rates */ + } else if (RTWN_RATE_IS_HT(rate)) { /* MCS0~15. */ rxs->c_rate = IEEE80211_RATE_MCS | RTWN_RIDX_TO_MCS(rate); rxs->c_pktflags |= IEEE80211_RX_F_HT; + } else if (RTWN_RATE_IS_VHT(rate)) { + /* XXX: need to revisit VHT rate representation */ + rxs->c_vhtnss = (rate - RTWN_RIDX_VHT_MCS_SHIFT) / 10; + rxs->c_rate = (rate - RTWN_RIDX_VHT_MCS_SHIFT) % 10; + rxs->c_pktflags |= IEEE80211_RX_F_VHT; } /*