The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=4e78b9b5afe9c1ebe93ccd8a0767fda39b26da4a
commit 4e78b9b5afe9c1ebe93ccd8a0767fda39b26da4a Author: Adrian Chadd <adr...@freebsd.org> AuthorDate: 2025-06-11 04:59:30 +0000 Commit: Adrian Chadd <adr...@freebsd.org> 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 *,