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 d1df103190)
This commit is contained in:
Bjoern A. Zeeb 2025-08-26 20:37:45 +00:00
parent 3d35647d33
commit 096f1bd897

View file

@ -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;