From nobody Thu Dec 19 16:08:35 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 4YDb7l6dYtz5hNxR; Thu, 19 Dec 2024 16:08:35 +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 4YDb7l5yNNz4nh5; Thu, 19 Dec 2024 16:08:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734624515; 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=3Xw5ml3Teuj/9oUPhIEo9Pr5BUd59AFf0wtD9l7if2w=; b=lOR+6GjSEHXEkwFDltlv+DR6VKv32ABzhm4qyWzY3rVhNAdE2z1SjGUSZmwrCCbuVfJdvF P6paAGyI2XK6qIad5QQEs8uiLKYjQRXx087l6YpKfltTIu4tAU4T8D7e4V6gmkWFIGw/yC 4Y2MXmiPtvPoH11dBfNE1ZA/YXDEWGV1He3q9FQm/FPpX/7GDyF7mXNG1Ai2pTtZBv2/wc /rstBXwCzrru/Vutda3/pCO/XOJsFc4d5o/fCF2vhYVAaj3Dtni3eW3nMhw/tiDhHCjiIH E0e76cy3kbaFzHBrWMp/bpq/m9vgB69lwSY1MSs4iQdWG4kuBTwsWf1lNMXZ3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734624515; 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=3Xw5ml3Teuj/9oUPhIEo9Pr5BUd59AFf0wtD9l7if2w=; b=ZsMSntalZUpAx5XkRyVisFfLWLLH1dAi6Cn7zg9ehIYacnJf8ee85jQ5iCk3hdA87i5odE 63OzC+++cjRA9TS22BgvIHbGwhsn8BHb39twT0mX9qbPDGLJ22ujfnYOHMKx4tGFfDNb56 63ia80SY05+0/VWRm71otBIacwcto9QV5GWJZeZuoENqaGV2DxyWjQAtf3IxdX/DAsug9c bqqXCiGi7yKjeIPTSLCODWBNnq0V5s1Pv9kAemfa+7ReHT9atFsKOrSofQG8zMoshogh1v lt1QaihdG3d+bGA7sZhffpLrCNGNuvWKuPGMwlldEC09YO7HAyC+gQb1u7aMKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734624515; a=rsa-sha256; cv=none; b=lYzdrCMlJTPxvM/8xirGqT2z7wd5Pb1skErfhEoNfgCIjXP15nYKUGBjsgr0LIor4mfLQ9 Bmjygu5Mv4yohfAg0ZQfPB/oyYWjpZrG6M5oGEH0yPjk3aERPbJvfn96MxAuz39d09RM9T 9sKZY671ID/j6VCVrLrMMauigR5v2b5+IFsXaF7saYldk7GJo+hntwfMMKIEiC7tj0W3ue pZS9/x1fp9NULwxTYi+xWw0aIalTKh9iirFJwnPsiFy4rUhF8/tgSjs9Br05tdf6jJNMWZ Wdtw/5TcFLwYGee7nuIz4eYdogNP2IwzSpiNZlqB9qPnaRBSHDrf24SIJV248w== 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 4YDb7l5Vpyz10kW; Thu, 19 Dec 2024 16:08:35 +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 4BJG8ZDN072947; Thu, 19 Dec 2024 16:08:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BJG8ZFq072944; Thu, 19 Dec 2024 16:08:35 GMT (envelope-from git) Date: Thu, 19 Dec 2024 16:08:35 GMT Message-Id: <202412191608.4BJG8ZFq072944@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: 4e2bd8cf08f4 - main - rtwn: set the shortgi flag in the RTL8192C rate control setup message 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: 4e2bd8cf08f4c803f93a4d9d5c9479fa72372869 Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4e2bd8cf08f4c803f93a4d9d5c9479fa72372869 commit 4e2bd8cf08f4c803f93a4d9d5c9479fa72372869 Author: Adrian Chadd AuthorDate: 2024-12-10 05:47:07 +0000 Commit: Adrian Chadd CommitDate: 2024-12-19 16:05:26 +0000 rtwn: set the shortgi flag in the RTL8192C rate control setup message Enable the short-GI flag configuring the rate mask. Obtained from: * Realtek vendor driver, rtl8192cu Differential Revision: https://reviews.freebsd.org/D48013 Reviewed by: bz, imp --- sys/dev/rtwn/rtl8192c/r92c_fw.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/dev/rtwn/rtl8192c/r92c_fw.c b/sys/dev/rtwn/rtl8192c/r92c_fw.c index 1ca37df7d0f4..939cd942f5e2 100644 --- a/sys/dev/rtwn/rtl8192c/r92c_fw.c +++ b/sys/dev/rtwn/rtl8192c/r92c_fw.c @@ -164,7 +164,7 @@ r92c_fw_download_enable(struct rtwn_softc *sc, int enable) #ifndef RTWN_WITHOUT_UCODE static int r92c_send_ra_cmd(struct rtwn_softc *sc, int macid, uint32_t rates, - int maxrate) + int maxrate, bool shortgi) { struct r92c_fw_cmd_macid_cfg cmd; uint8_t mode; @@ -178,6 +178,8 @@ r92c_send_ra_cmd(struct rtwn_softc *sc, int macid, uint32_t rates, else mode = R92C_RAID_11B; cmd.macid = macid | R92C_CMD_MACID_VALID; + if (shortgi) + cmd.macid |= R92C_CMD_MACID_SGI; cmd.mask = htole32(mode << 28 | rates); error = r92c_fw_cmd(sc, R92C_CMD_MACID_CONFIG, &cmd, sizeof(cmd)); if (error != 0) { @@ -222,10 +224,18 @@ r92c_init_ra(struct rtwn_softc *sc, int macid) #ifndef RTWN_WITHOUT_UCODE if (sc->sc_ratectl == RTWN_RATECTL_FW) { uint32_t fw_rates; + bool shortgi; /* Add HT rates after normal rates; limit to MCS0..15 */ fw_rates = rates | ((htrates & 0xffff) << RTWN_RIDX_HT_MCS_SHIFT); - r92c_send_ra_cmd(sc, macid, fw_rates, maxrate); + /* Re-calculate short-gi based on op mode */ + if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) + shortgi = ieee80211_ht_check_tx_shortgi_40(ni); + else if (IEEE80211_IS_CHAN_HT20(ni->ni_chan)) + shortgi = ieee80211_ht_check_tx_shortgi_20(ni); + else + shortgi = false; + r92c_send_ra_cmd(sc, macid, fw_rates, maxrate, shortgi); } #endif