From nobody Tue Dec 03 22:11:28 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 4Y2vxr2XDDz5gqh9; Tue, 03 Dec 2024 22:11:28 +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 4Y2vxr21jNz4yrW; Tue, 3 Dec 2024 22:11:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733263888; 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=K49hXXepRkpZeqScsZW8xI3sb4eNLn/p/x1kzOY/RD8=; b=YMjAVTRqB06HDkaUxM3FMVRHl7+LXcVpTuJdYcp18drFbGuOvnTmezCvk1n8jTQdSdt+/8 5NsIIW/aWS8EYf4v5HOhVjN2Wzofh7rpABQZ7OtJ74aZLb55JoZ/qwt1ABU5Kk2MroCY5/ rdjmzHBoCaeEkZoD4sYF6Pn4SKECC7OfCXaPqCn2hcGH/oNIsVVC7C2g1axodqeNWhfPdo vERm4R7Kr/MXuGS+qexFEfSgl45xnKRPaDN+kyxLzjFunKozhyreb5PSDk5c4jR+VfXFE8 2pEjiCccf+33CjOkd5ZvKtVaphgZBFRTwl8trrnUf3uTgrSUiX4UGwH65pg9Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733263888; 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=K49hXXepRkpZeqScsZW8xI3sb4eNLn/p/x1kzOY/RD8=; b=aZMgmUCdGT/4dKQLMk0m8kPDhxjQVieOkcsynLyraghqsuZRtb3n4BN84RZbyFtqvF4Yam n4CW6K39kpU9d3feBLAswyab6+foy13qdoM3jkbpxQr/fjgMuQ+nKqMLeXQ8U0U/Tzfeng DK8tltTubAQuebCKIhQhPJ/tUox1OkpU4oh5iIM1HV/Zpp9+JwGazqZviTNSYyDbm4Th22 76wKX1WIh2VCvGvplbqQvPTwscDgNmPvG76CugnJ68oFtMj1Ro5+RjS5SrJuee/BvdARhn +LqQ3ZlmpLOIQ8jY9wIQFj13DrZHBqTiJJuQpcFSmPgk3737nEUjGoYISY48Gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733263888; a=rsa-sha256; cv=none; b=oYYLuxICsdA7w57G2TYxTcA70ihedZfhEo7/LYk1UgCCe6A8HmobcwC9NYZHjuw2Vnz9WF +fBcjF/TEFcA6cJ23PLkI4kq1HeT8yryQZjzv04jR5fTlJnxsMVCPg90ThOASC2OY0UPP+ pHht2Jki6arYJvI9bFFXIz2W7cUEdeoBc9vBWKhssSQzfzOJkH+Mgo0gbKQPcUwnBQGmJl ktp3Ir1t37OhYJpgmyiaK8wChZvMJo/vQrvrxOhtZNi2QI2+QmsZsI+scN1RGmhHEEJTX6 ovYKjGHzYfDJL1cAXos3/6fwr8EEch+q5Nsu5MPTxWSpVI0ZfzyulLPgAg5MSw== 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 4Y2vxr1LFtzgsV; Tue, 3 Dec 2024 22:11:28 +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 4B3MBSTi098915; Tue, 3 Dec 2024 22:11:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B3MBSaR098912; Tue, 3 Dec 2024 22:11:28 GMT (envelope-from git) Date: Tue, 3 Dec 2024 22:11:28 GMT Message-Id: <202412032211.4B3MBSaR098912@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: e1eff81ea99c - main - rtwn: use ieee80211_ht_check_tx_shortgi_20() and ieee80211_ht_check_tx_shortgi_40() 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: e1eff81ea99c1000ad74436a54c54ec9e777282a Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=e1eff81ea99c1000ad74436a54c54ec9e777282a commit e1eff81ea99c1000ad74436a54c54ec9e777282a Author: Adrian Chadd AuthorDate: 2024-11-25 23:20:42 +0000 Commit: Adrian Chadd CommitDate: 2024-12-03 22:10:49 +0000 rtwn: use ieee80211_ht_check_tx_shortgi_20() and ieee80211_ht_check_tx_shortgi_40() Use the new net80211 routines rather than rolling our own. Differential Revision: https://reviews.freebsd.org/D47751 Reviewed by: bz --- sys/dev/rtwn/rtl8192c/r92c_tx.c | 11 ++++------- sys/dev/rtwn/rtl8812a/r12a_tx.c | 13 ++++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/sys/dev/rtwn/rtl8192c/r92c_tx.c b/sys/dev/rtwn/rtl8192c/r92c_tx.c index 15beca776b61..5c8b2e114727 100644 --- a/sys/dev/rtwn/rtl8192c/r92c_tx.c +++ b/sys/dev/rtwn/rtl8192c/r92c_tx.c @@ -171,15 +171,12 @@ static void r92c_tx_set_sgi(struct rtwn_softc *sc, void *buf, struct ieee80211_node *ni) { struct r92c_tx_desc *txd = (struct r92c_tx_desc *)buf; - struct ieee80211vap *vap = ni->ni_vap; - if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) && /* HT20 */ - (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)) + if (IEEE80211_IS_CHAN_HT40(ni->ni_chan) + && ieee80211_ht_check_tx_shortgi_40(ni)) txd->txdw5 |= htole32(R92C_TXDW5_SGI); - else if (ni->ni_chan != IEEE80211_CHAN_ANYC && /* HT40 */ - IEEE80211_IS_CHAN_HT40(ni->ni_chan) && - (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) && - (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40)) + else if (IEEE80211_IS_CHAN_HT20(ni->ni_chan) + && ieee80211_ht_check_tx_shortgi_20(ni)) txd->txdw5 |= htole32(R92C_TXDW5_SGI); } diff --git a/sys/dev/rtwn/rtl8812a/r12a_tx.c b/sys/dev/rtwn/rtl8812a/r12a_tx.c index 9e0d8e85c0cf..7a8a7d3679b1 100644 --- a/sys/dev/rtwn/rtl8812a/r12a_tx.c +++ b/sys/dev/rtwn/rtl8812a/r12a_tx.c @@ -199,15 +199,14 @@ static void r12a_tx_set_sgi(struct rtwn_softc *sc, void *buf, struct ieee80211_node *ni) { struct r12a_tx_desc *txd = (struct r12a_tx_desc *)buf; - struct ieee80211vap *vap = ni->ni_vap; - if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) && /* HT20 */ - (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20)) + /* TODO: VHT 20/40/80 checks */ + + if (IEEE80211_IS_CHAN_HT40(ni->ni_chan) + && ieee80211_ht_check_tx_shortgi_40(ni)) txd->txdw5 |= htole32(R12A_TXDW5_DATA_SHORT); - else if (ni->ni_chan != IEEE80211_CHAN_ANYC && /* HT40 */ - IEEE80211_IS_CHAN_HT40(ni->ni_chan) && - (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) && - (vap->iv_flags_ht & IEEE80211_FHT_SHORTGI40)) + else if (IEEE80211_IS_CHAN_HT20(ni->ni_chan) + && ieee80211_ht_check_tx_shortgi_20(ni)) txd->txdw5 |= htole32(R12A_TXDW5_DATA_SHORT); }