From nobody Wed Jul 16 15:21:50 2025 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 4bj0CM2rYjz61dMv; Wed, 16 Jul 2025 15:21:51 +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 4bj0CL6gjHz4MGM; Wed, 16 Jul 2025 15:21:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752679310; 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=MZhoT58UlqKhU1slfCaWbpIQTlDTlfkyCY6pIy2CXWw=; b=NgQn1Hue8JvsSJcImEyn8ZZ3q1jvhp6xn6/uPwoWTde4jOdTj5lnSasQI0aG6jau2H8FdF hu1wDOW+/LqxkQpuhty1KLBMJLJLedj1Cm4xY5d4gXP132gicuehK6i6xAAZYuANMaS1J5 3K4nG5Ah3qTgYPgosVXkYws5qnD6T/eCH1Ghak1Q/cvmtnkehZcEsSzpAbciYK3knX91Zo 4vaVvZa9CRdKOZ65pCA5xn6lVHCdTTOLZ4TK44pQ1RWlaANjWWpa/pRobqdRKTTGsp5Um1 c6xD2k/9tn42mXD17aAd12P/BFoDcgCw5U3jhQccrElFHwLlxenRz+7AWRFOlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1752679310; 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=MZhoT58UlqKhU1slfCaWbpIQTlDTlfkyCY6pIy2CXWw=; b=d4MIWRsQ/POHCeoNBV3RndEHU3lmQSXiHsYBQc+veq7kJjnYiUd2a175rzfKljrntCYS4n Oy0YmrkqNE7C/V/E/xv6O4jjZUzrc8w2bt/MOcxlTkkYoFMT0T3QjJpnmrIr+iaS/ZY7N3 Te3CI+UKvzHD3MI/ilxVm1XYsLusqrvRvhQirbYJKqsEC9DJ6p+42b9/7sghCuGOZyyuWZ Z2LSnd7dpvEAgCqUjJdVZlCr+53ad34ryaUX73mzKRoqM898vl8UyU73Xb1wYenDaugtDP 8yiS6Qqg1c82O7iw1dpgzQPuS6Ki8yMtF/7uIswDPebduqKK8FrP47IpLMN3mg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1752679310; a=rsa-sha256; cv=none; b=OOIoYlbXl5KkWkS41n7Am7kIxWiy9G0ZKrKLN1P3UJhs+ocp66wpa1AIMvYFqEVgD3aqA6 bI3Hq81bw4Yx1DJbOMf82smBHflkhzm0wE3J1FXF280YWk4GiN7kyjJhV+by00rZn1XbKr yhc34+Qz/J7dWwhTDZlBbiUI2XMLDjk1KHMcqAPKSXIBuOYNDZsYhbJsWk5bWVVLAAIph0 /j0OazHNoCElQaguEt8e600facn6RH5aukkgMC89YXyTzrmHmxKdr1wlUY5BzCH0NP+4Jy YRuqB4UN7+mWIGFSEMMMQiQ6NmQMSbTNZ3dHJrQVXJKfBpapA6NfKZjvwYiIuA== 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 4bj0CL6DdczSX; Wed, 16 Jul 2025 15:21:50 +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 56GFLoV5041698; Wed, 16 Jul 2025 15:21:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56GFLo0h041695; Wed, 16 Jul 2025 15:21:50 GMT (envelope-from git) Date: Wed, 16 Jul 2025 15:21:50 GMT Message-Id: <202507161521.56GFLo0h041695@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: 4e78b9b5afe9 - main - net80211: fix VHT node setup in hostap mode 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: 4e78b9b5afe9c1ebe93ccd8a0767fda39b26da4a Auto-Submitted: auto-generated The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4e78b9b5afe9c1ebe93ccd8a0767fda39b26da4a commit 4e78b9b5afe9c1ebe93ccd8a0767fda39b26da4a Author: Adrian Chadd AuthorDate: 2025-06-11 04:59:30 +0000 Commit: Adrian Chadd CommitDate: 2025-07-16 15:12:03 +0000 net80211: fix VHT node setup in hostap mode Way back in 2017 I wrote the initial VHT hostap support, and then added a NULL check here to stop it from panicing. However, there is no VHTINFO IE in an ASSOC_REQ management frame. Thus, the node would never have VHT state initialised. This mirrors what HT node setup does (which again doesn't have HTINFO IE's in an ASSOC_REQ frame), the upgrade will happen once the exchange completes. Fixes: 2023566223a4020d832bd4e25dc7dadfd660b836 Differential Revision: https://reviews.freebsd.org/D50787 --- sys/net80211/ieee80211_hostap.c | 7 ++----- sys/net80211/ieee80211_vht.c | 4 +--- sys/net80211/ieee80211_vht.h | 3 +-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index c5a478533313..9074878e17e4 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -2214,12 +2214,9 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, /* VHT */ if (IEEE80211_IS_CHAN_VHT(ni->ni_chan) && - vhtcap != NULL && - vhtinfo != NULL) { - /* XXX TODO; see below */ - net80211_vap_printf(vap, "%s: VHT TODO!\n", __func__); + vhtcap != NULL) { ieee80211_vht_node_init(ni); - ieee80211_vht_update_cap(ni, vhtcap, vhtinfo); + ieee80211_vht_update_cap(ni, vhtcap); } else if (ni->ni_flags & IEEE80211_NODE_VHT) ieee80211_vht_node_cleanup(ni); diff --git a/sys/net80211/ieee80211_vht.c b/sys/net80211/ieee80211_vht.c index e91977f1ef98..de0b691d4d2a 100644 --- a/sys/net80211/ieee80211_vht.c +++ b/sys/net80211/ieee80211_vht.c @@ -838,12 +838,10 @@ ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node *ni) } void -ieee80211_vht_update_cap(struct ieee80211_node *ni, const uint8_t *vhtcap_ie, - const uint8_t *vhtop_ie) +ieee80211_vht_update_cap(struct ieee80211_node *ni, const uint8_t *vhtcap_ie) { ieee80211_parse_vhtcap(ni, vhtcap_ie); - ieee80211_parse_vhtopmode(ni, vhtop_ie); } static struct ieee80211_channel * diff --git a/sys/net80211/ieee80211_vht.h b/sys/net80211/ieee80211_vht.h index 2964de63c343..a1529df4a85b 100644 --- a/sys/net80211/ieee80211_vht.h +++ b/sys/net80211/ieee80211_vht.h @@ -52,8 +52,7 @@ uint8_t * ieee80211_add_vhtinfo(uint8_t *frm, struct ieee80211_node *); uint8_t *ieee80211_add_vhtcap_ch(uint8_t *, struct ieee80211vap *, struct ieee80211_channel *); -void ieee80211_vht_update_cap(struct ieee80211_node *, - const uint8_t *, const uint8_t *); +void ieee80211_vht_update_cap(struct ieee80211_node *, const uint8_t *); struct ieee80211_channel * ieee80211_vht_adjust_channel(struct ieee80211com *,