Date: Fri, 16 Jan 2026 19:40:40 +0000 From: Bjoern A. Zeeb <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 096f1bd89746 - stable/14 - LinuxKPI: 802.11: mark all structs in struct ieee80211_mgmt __packed Message-ID: <696a9438.ca56.35247eb4@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=096f1bd897464edfd115f7dd2272e3488cbca191 commit 096f1bd897464edfd115f7dd2272e3488cbca191 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2025-08-26 20:37:45 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2026-01-16 19:37:45 +0000 LinuxKPI: 802.11: mark all structs in struct ieee80211_mgmt __packed These structs as part of the union are used to handle raw packet data so mark them all __packed. Sponsored by: The FreeBSD Foundation (cherry picked from commit d1df103190c12a63a1f718bc3cf6a1afe1ece759) --- sys/compat/linuxkpi/common/include/linux/ieee80211.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/ieee80211.h b/sys/compat/linuxkpi/common/include/linux/ieee80211.h index b9161c586d07..33850359869f 100644 --- a/sys/compat/linuxkpi/common/include/linux/ieee80211.h +++ b/sys/compat/linuxkpi/common/include/linux/ieee80211.h @@ -524,24 +524,24 @@ struct ieee80211_mgmt { uint16_t beacon_int; uint16_t capab_info; uint8_t variable[0]; - } beacon; + } __packed beacon; /* 9.3.3.5 Association Request frame format */ struct { uint16_t capab_info; uint16_t listen_interval; uint8_t variable[0]; - } assoc_req; + } __packed assoc_req; /* 9.3.3.10 Probe Request frame format */ struct { uint8_t variable[0]; - } probe_req; + } __packed probe_req; /* 9.3.3.11 Probe Response frame format */ struct { uint64_t timestamp; uint16_t beacon_int; uint16_t capab_info; uint8_t variable[0]; - } probe_resp; + } __packed probe_resp; /* 9.3.3.14 Action frame format */ struct { /* 9.4.1.11 Action field */ @@ -557,7 +557,7 @@ struct ieee80211_mgmt { uint8_t tpc_elem_length; uint8_t tpc_elem_tx_power; uint8_t tpc_elem_link_margin; - } tpc_report; + } __packed tpc_report; /* 9.6.8.33 Fine Timing Measurement frame format */ struct { uint8_t dialog_token; @@ -567,7 +567,7 @@ struct ieee80211_mgmt { uint16_t tod_error; uint16_t toa_error; uint8_t variable[0]; - } ftm; + } __packed ftm; /* 802.11-2016, 9.6.5.2 ADDBA Request frame format */ struct { uint8_t action_code; @@ -577,16 +577,16 @@ struct ieee80211_mgmt { uint16_t start_seq_num; /* Optional follows... */ uint8_t variable[0]; - } addba_req; + } __packed addba_req; /* XXX */ struct { uint8_t dialog_token; - } wnm_timing_msr; + } __packed wnm_timing_msr; } u; - } action; + } __packed action; DECLARE_FLEX_ARRAY(uint8_t, body); } u; -}; +} __packed __aligned(2); struct ieee80211_cts { /* net80211::ieee80211_frame_cts */ __le16 frame_control;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?696a9438.ca56.35247eb4>
