diff mbox series

defs: Enclose all structs between the pragma's

Message ID 20230524160704.20197-1-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series defs: Enclose all structs between the pragma's | expand

Commit Message

Andrei Otcheretianski May 24, 2023, 4:07 p.m. UTC
From: Daniel Gabay <daniel.gabay@intel.com>

Many of the STRUCT_PACKED structs are not within the pragma's resulting
in wrong packing using MSVC. Fix it by moving pragma to EOF to ensure
proper packing.

Signed-off-by: Daniel Gabay <daniel.gabay@intel.com>
---
 src/common/ieee802_11_defs.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Jouni Malinen Nov. 3, 2023, 3:27 p.m. UTC | #1
On Wed, May 24, 2023 at 07:07:04PM +0300, Andrei Otcheretianski wrote:
> Many of the STRUCT_PACKED structs are not within the pragma's resulting
> in wrong packing using MSVC. Fix it by moving pragma to EOF to ensure
> proper packing.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index 12789227c4..895dd0ef85 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -1184,9 +1184,6 @@  struct ieee80211_ampe_ie {
 	 */
 } STRUCT_PACKED;
 
-#ifdef _MSC_VER
-#pragma pack(pop)
-#endif /* _MSC_VER */
 
 #define ERP_INFO_NON_ERP_PRESENT BIT(0)
 #define ERP_INFO_USE_PROTECTION BIT(1)
@@ -2856,4 +2853,8 @@  struct ieee80211_neighbor_ap_info {
 	u8 data[0];
 } STRUCT_PACKED;
 
+#ifdef _MSC_VER
+#pragma pack(pop)
+#endif /* _MSC_VER */
+
 #endif /* IEEE802_11_DEFS_H */