opnsense-src/sys/net80211
Bjoern A. Zeeb 871d11b424 net80211: in ieee80211_sta_join() only do_ht if HT is avail
In ieee80211_sta_join() there are currently two ways to set
"do_ht": (1) after checking HT IEs are avail, and (2) after
checking VHT IEs are avail and we are not on 2GHz.

In the latter case no one checks that HT IEs are available and
when we hit ieee80211_ht_updateparams_final() htinfo may be NULL
and we panic.

Avoid this by only checking for VHT if do_ht was set.
No VHT without HT IEs.

While here switch do_ht to be a bool.

Sponsored by:	The FreeBSD Foundation
PR:		287625
Fixes:		51172f62a7
Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D50923

(cherry picked from commit f51c794cbc80682931d47264e3c18329bae0a2c1)
2025-07-16 08:28:22 +02:00
..
_ieee80211.h net80211; LinuxKPI 802.11: introduce IEEE80211_RX_F_ICV_STRIP 2025-04-29 10:49:28 +00:00
ieee80211.c net80211: add driver / crypto methods to set the hardware / software cipher suites 2025-04-29 10:49:28 +00:00
ieee80211.h net80211: add the beginning of the extfield information elements (IE ext) 2025-07-09 10:05:46 +02:00
ieee80211_acl.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_action.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_action.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_adhoc.c net80211: scan/internal: change boolean argument from int to bool 2024-09-28 10:35:12 +00:00
ieee80211_adhoc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_ageq.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_ageq.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_alq.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_alq.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_amrr.c net80211: amrr_init: change order of commands 2024-04-22 17:00:22 +00:00
ieee80211_amrr.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ieee80211_crypto.c net80211: add driver / crypto methods to set the hardware / software cipher suites 2025-04-29 10:49:28 +00:00
ieee80211_crypto.h net80211: add driver / crypto methods to set the hardware / software cipher suites 2025-04-29 10:49:28 +00:00
ieee80211_crypto_ccmp.c net80211: LinuxKPI 802.11: clean up MIC vs. MMIC rx flags 2025-03-19 22:22:15 +00:00
ieee80211_crypto_none.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_crypto_tkip.c net80211: fix TKIP trailer trimming w/ no rx parameters given 2025-07-09 10:05:46 +02:00
ieee80211_crypto_wep.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_ddb.c net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw 2025-02-10 14:52:08 +00:00
ieee80211_dfs.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_dfs.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_freebsd.c net80211: cleanup keyidx argument of ieee80211_notify_michael_failure() 2025-04-18 14:35:58 +00:00
ieee80211_freebsd.h net80211: add IEEE80211_IS_LOCKED() 2025-02-10 14:52:09 +00:00
ieee80211_hostap.c net80211: scan/internal: change boolean argument from int to bool 2024-09-28 10:35:12 +00:00
ieee80211_hostap.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_ht.c net80211: fix VHT160 and VHT80P80 selection and enable in LinuxKPI 802.11 2025-07-09 10:05:46 +02:00
ieee80211_ht.h net80211: HT: add missing bit descriptions for IEEE80211_AGGR_BITS 2025-02-10 14:52:08 +00:00
ieee80211_hwmp.c net80211: Fix a typo in a source code comment 2024-01-25 07:47:45 +01:00
ieee80211_input.c net80211: adjust more VHT structures/fields 2024-02-18 18:31:15 +00:00
ieee80211_input.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_ioctl.c net80211: make sure to not start a BGSCAN if not enabled 2025-07-09 10:05:46 +02:00
ieee80211_ioctl.h net80211: add a new field specifically for announcing specific ciphers 2025-04-29 10:49:28 +00:00
ieee80211_mesh.c net80211: scan/internal: change boolean argument from int to bool 2024-09-28 10:35:12 +00:00
ieee80211_mesh.h sys: Remove $FreeBSD$: one-line .h pattern 2023-08-16 11:54:18 -06:00
ieee80211_monitor.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_monitor.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_node.c net80211: in ieee80211_sta_join() only do_ht if HT is avail 2025-07-16 08:28:22 +02:00
ieee80211_node.h net80211: fill in missing flags to IEEE80211_NODE_BITS 2025-04-18 14:35:59 +00:00
ieee80211_output.c net80211: add IEEE80211_CONF_AMPDU_OFFLOAD for AMPDU[-TX] offload 2025-04-29 10:49:28 +00:00
ieee80211_phy.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_phy.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_power.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_power.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_proto.c net80211: deal with lost state transitions 2024-02-18 18:31:17 +00:00
ieee80211_proto.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_radiotap.c net80211: Correct a comment 2024-06-25 12:25:31 +08:00
ieee80211_radiotap.h net8011: radiotap: add more EHT constants 2024-04-22 16:59:49 +00:00
ieee80211_ratectl.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_ratectl.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_ratectl_none.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_regdomain.c net80211: migrate ic_vhtcaps, ic_vht_mcsinfo, ic_flags_vht 2023-11-30 00:36:58 +00:00
ieee80211_regdomain.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_rssadapt.c sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ieee80211_rssadapt.h sys: Remove $FreeBSD$: one-line .c comment pattern 2023-08-16 11:54:24 -06:00
ieee80211_scan.c net80211: make sure to not start a BGSCAN if not enabled 2025-07-09 10:05:46 +02:00
ieee80211_scan.h net80211: scan/internal: change boolean argument from int to bool 2024-09-28 10:35:12 +00:00
ieee80211_scan_sta.c net80211: rename iv_flags_vht to iv_vht_flags 2023-11-30 00:36:58 +00:00
ieee80211_scan_sw.c net80211: make sure to not start a BGSCAN if not enabled 2025-07-09 10:05:46 +02:00
ieee80211_scan_sw.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_sta.c net80211 / LinuxKPI 802.11: use enum ieee80211_sta_rx_bw for ni_chw 2025-02-10 14:52:08 +00:00
ieee80211_sta.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_superg.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_superg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_tdma.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_tdma.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_var.h net80211: add IEEE80211_CONF_AMPDU_OFFLOAD for AMPDU[-TX] offload 2025-04-29 10:49:28 +00:00
ieee80211_vht.c net80211: 11ac: add options to manage VHT STBC 2025-02-10 14:52:08 +00:00
ieee80211_vht.h net80211: adjust more VHT structures/fields 2024-02-18 18:31:15 +00:00
ieee80211_wds.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00
ieee80211_wds.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_wps.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
ieee80211_xauth.c sys: Remove $FreeBSD$: one-line .c pattern 2023-08-16 11:54:36 -06:00