From nobody Tue Dec 03 05:32:36 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 4Y2TnK49Ljz5fnDk; Tue, 03 Dec 2024 05:32:37 +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 4Y2TnK2qy1z46T1; Tue, 3 Dec 2024 05:32:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733203957; 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=xzywvnNkdj/pMzjF30SekkUBVOq7mZo4BV416FkMZsg=; b=aEfNry364oyEv4w+/FapF3M9Bri+g2XGbV/tctGXDbCQbNHzEXTQHxeBYKs432MPvf6XE8 8pxIDxsmPn6MFvQcsa9GJrbbAg1p1MTatMEGJadJnAeuInBt5fos2vTqCK3/jQpqeg0wM6 k+DERT6XKzbFIiyCdoGekHyael8Mhrz8md0xqkS6xSjs4nSObBGuERXVXyqRgD/cpEwfFC 6izgmhHigbAvAp/VdQ9hHDSmU9YQ5qQN5NfHtERW72LeBpQ6XHopTmM22okuexn8ngPpGK dmibrHk9nChNsy3YzwjpEt9P4+Jxv0//AVl0fBhMHRZiDKgLFgUxwmBvnhKNFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733203957; 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=xzywvnNkdj/pMzjF30SekkUBVOq7mZo4BV416FkMZsg=; b=jqyMuTYr/7A8Slhc/PCBOcTCmtp58eVjtsPUalO8dggKQrCZGK5qUjabUpA2CjDAIw6xBp mtEBrJk4oHRCgKuoJbkWZb1yYRANrlgvDHXezeLOvjtyo0Lqu/UB5KTLnQ65IsaNkJ0H8T nSuloiA2Z1EmvOvPCLOkhvf38cagACVZqqCzTNTLK5D6222ORzmSoCfMn2ro5pKIxkzKIU R5WltjOnR9l162OzdRUNK2vL0IdxI66z5W1O7X0JqyXR+uU71IzE0DYSalb1SoYxLOFB2T r1f8/dWEzRLEtEDe1iFPTJCToxTTUOORnQD4aysgA3NoYoPO+r5XJbxYD7R23g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733203957; a=rsa-sha256; cv=none; b=tsRUx0RdKHzEsP9qPVzdAEJ8MoDTcQhIRr1Y3ykYIwELKVv96oFU1PhstieELe6VlFzDyz xBgFMyCCL49Smk00em9jrLbN2DC4dPEKpwNeaPRqbY61FfDdB5HRYuLC/2pAuhgsQqslMY 0dHMh3HaJyR0yeQ1+fIm2PtrfkSo2dXB5lzjLXEzJnxr0LK6U6gCmtY9+ulGWfarHKFhEJ yufWRvGi23N2FCrfXnDHSsnhCJPzQMIxFE9qxdAJUQjkAHDt93TD22jYPzhA87bWYYJp3J vUf88iHcpcwyqGFHdGAekfEuN0odoHO7cVnyTyuPKyB20VuuW65hb4M6AS21tg== 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 4Y2TnK0QnZz18gG; Tue, 3 Dec 2024 05:32:37 +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 4B35WaOO042056; Tue, 3 Dec 2024 05:32:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B35WaaS042053; Tue, 3 Dec 2024 05:32:36 GMT (envelope-from git) Date: Tue, 3 Dec 2024 05:32:36 GMT Message-Id: <202412030532.4B35WaaS042053@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: 3f62f8ef5e40 - main - iwn: 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: 3f62f8ef5e4001ba7a2a9324e10a508eea15b68c Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=3f62f8ef5e4001ba7a2a9324e10a508eea15b68c commit 3f62f8ef5e4001ba7a2a9324e10a508eea15b68c Author: Adrian Chadd AuthorDate: 2024-11-25 23:13:32 +0000 Commit: Adrian Chadd CommitDate: 2024-12-03 05:31:39 +0000 iwn: use ieee80211_ht_check_tx_shortgi_20() and ieee80211_ht_check_tx_shortgi_40() Use the new net80211 routines to check the node width and the local / node flags. This should be "more" correct than the previous code. Differential Revision: https://reviews.freebsd.org/D47750 Reviewed by: bz --- sys/dev/iwn/if_iwn.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c index 50d50fdc473c..db3eb37ced9e 100644 --- a/sys/dev/iwn/if_iwn.c +++ b/sys/dev/iwn/if_iwn.c @@ -2812,23 +2812,18 @@ iwn_rate_to_plcp(struct iwn_softc *sc, struct ieee80211_node *ni, */ plcp = IEEE80211_RV(rate) | IWN_RFLAG_MCS; - /* - * XXX the following should only occur if both - * the local configuration _and_ the remote node - * advertise these capabilities. Thus this code - * may need fixing! - */ - /* * Set the channel width and guard interval. + * + * Take into account the local configuration and + * the node/peer advertised abilities. */ if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) { plcp |= IWN_RFLAG_HT40; - if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI40) + if (ieee80211_ht_check_tx_shortgi_40(ni)) plcp |= IWN_RFLAG_SGI; - } else if (ni->ni_htcap & IEEE80211_HTCAP_SHORTGI20) { + } else if (ieee80211_ht_check_tx_shortgi_20(ni)) plcp |= IWN_RFLAG_SGI; - } /* * Ensure the selected rate matches the link quality